]> asedeno.scripts.mit.edu Git - linux.git/log
linux.git
6 years agoMAINTAINERS: update two greybus sections
Johan Hovold [Mon, 11 Jun 2018 07:42:02 +0000 (09:42 +0200)]
MAINTAINERS: update two greybus sections

Fix a file entry typo and drop the obsolete timesync entries, which were
all caught by:

scripts/get_maintainer.pl --self-test=patterns

Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: replace while with shorter for loop
Michael Straube [Sat, 7 Jul 2018 11:22:50 +0000 (13:22 +0200)]
staging: rtl8188eu: replace while with shorter for loop

Simplify rtw_get_rateset_len() by replacing the while loop
with a shorter for loop. Also replace tabs with spaces in
the definition line.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8723bs: remove rtw_beamforming.h
Michael Straube [Sat, 7 Jul 2018 11:38:41 +0000 (13:38 +0200)]
staging: rtl8723bs: remove rtw_beamforming.h

The header rtw_beamforming.h is not used anywhere.
'git grep rtw_beamforming.h' returns nothing, remove the file.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8723bs: remove rtw_br_ext.h
Michael Straube [Sat, 7 Jul 2018 11:38:40 +0000 (13:38 +0200)]
staging: rtl8723bs: remove rtw_br_ext.h

The header rtw_br_ext.h is not used anywhere.
'git grep rtw_br_ext.h' returns nothing, remove the file.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wlan-ng: remove unneeded parentheses from prism2mgmt.c
Tim Collier [Fri, 6 Jul 2018 19:38:15 +0000 (20:38 +0100)]
staging: wlan-ng: remove unneeded parentheses from prism2mgmt.c

remove parentheses reported as unnecessary by checkpatch

Signed-off-by: Tim Collier <osdevtc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wlan-ng: fix expression continuation in prism2mgmt.c
Tim Collier [Fri, 6 Jul 2018 19:38:14 +0000 (20:38 +0100)]
staging: wlan-ng: fix expression continuation in prism2mgmt.c

checkpatch reports "CHECK: Logical continuations should be on the
previous line" when a continuation line begins with an
operator. Reformat the code so that the operator appears at the end of
the line being continued.

Signed-off-by: Tim Collier <osdevtc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wlan-ng: fix expression continuation in prism2fw.c
Tim Collier [Fri, 6 Jul 2018 19:38:13 +0000 (20:38 +0100)]
staging: wlan-ng: fix expression continuation in prism2fw.c

checkpatch reports "CHECK: Logical continuations should be on the
previous line" when a continuation line begins with an
operator. Reformat the code so that the operator appears at the end of
the line being continued.

Signed-off-by: Tim Collier <osdevtc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging/rtl8192u: fix defined but not used build warnings
Randy Dunlap [Sat, 7 Jul 2018 03:54:37 +0000 (20:54 -0700)]
staging/rtl8192u: fix defined but not used build warnings

Fix build warnings in rtl8192u when CONFIG_PROC_FS is not enabled
by marking the unused functions as __maybe_unused.

../drivers/staging/rtl8192u/r8192U_core.c:508:12: warning: 'proc_get_stats_ap' defined but not used [-Wunused-function]
../drivers/staging/rtl8192u/r8192U_core.c:527:12: warning: 'proc_get_registers' defined but not used [-Wunused-function]
../drivers/staging/rtl8192u/r8192U_core.c:568:12: warning: 'proc_get_stats_tx' defined but not used [-Wunused-function]
../drivers/staging/rtl8192u/r8192U_core.c:627:12: warning: 'proc_get_stats_rx' defined but not used [-Wunused-function]

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Jerry chuang <wlanfae@realtek.com>
Cc: devel@driverdev.osuosl.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pci: Move open-braces to match kernel code style
Peter Vernia [Sat, 7 Jul 2018 07:10:22 +0000 (03:10 -0400)]
staging: mt7621-pci: Move open-braces to match kernel code style

Moves some open-braces to the end of the conditional statement to match the
kernel's coding style

Signed-off-by: Peter Vernia <peter.vernia@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pci: Add spaces after commas in pci-mt7621.c
Peter Vernia [Sat, 7 Jul 2018 07:09:19 +0000 (03:09 -0400)]
staging: mt7621-pci: Add spaces after commas in pci-mt7621.c

Adds spaces after commas in parameter lists in pci-mt7621.c

Signed-off-by: Peter Vernia <peter.vernia@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pci: Fix spacing around equals sign
Peter Vernia [Sat, 7 Jul 2018 07:08:36 +0000 (03:08 -0400)]
staging: mt7621-pci: Fix spacing around equals sign

Add spaces in front of the equals sign in assignment operations

Signed-off-by: Peter Vernia <peter.vernia@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pci: Fix spaces around parenthesis in pci-7621.c
Peter Vernia [Sat, 7 Jul 2018 07:07:55 +0000 (03:07 -0400)]
staging: mt7621-pci: Fix spaces around parenthesis in pci-7621.c

Adds spaces before open parenthesis, and removes spaces after open parenthesis

Signed-off-by: Peter Vernia <peter.vernia@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agodrivers/staging/gasket: Use refcount_read()
Todd Poynor [Sat, 7 Jul 2018 06:43:10 +0000 (23:43 -0700)]
drivers/staging/gasket: Use refcount_read()

Use the refcount_read accessor function, avoid reaching into refcount
and atomic struct fields.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8192u: Add space after ', ' character - Coding Style
John Whitmore [Wed, 4 Jul 2018 14:20:56 +0000 (15:20 +0100)]
staging: rtl8192u: Add space after ', ' character - Coding Style

checkpatch requires a space after ',' - Added.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8192u: Add required space around '=' operator - Style
John Whitmore [Wed, 4 Jul 2018 14:20:55 +0000 (15:20 +0100)]
staging: rtl8192u: Add required space around '=' operator - Style

checkpatch requires spaces around '=' operator so added.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8192u: Remove space after cast - Coding Style
John Whitmore [Wed, 4 Jul 2018 14:20:54 +0000 (15:20 +0100)]
staging: rtl8192u: Remove space after cast - Coding Style

According to checkpatch - No space is necessary after a cast.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8192u: Add required spaces around '||' operator - Sytle
John Whitmore [Wed, 4 Jul 2018 14:20:53 +0000 (15:20 +0100)]
staging: rtl8192u: Add required spaces around '||' operator - Sytle

Additon of the coding style required spaces around the '||' operator.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8192u: Add space required around '==' opeartor - Style
John Whitmore [Wed, 4 Jul 2018 14:20:52 +0000 (15:20 +0100)]
staging: rtl8192u: Add space required around '==' opeartor - Style

Simple addition of the coding style required spaces around '==' operator.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8192u: Remove superfluous blank lines - Coding Style
John Whitmore [Wed, 4 Jul 2018 14:20:51 +0000 (15:20 +0100)]
staging: rtl8192u: Remove superfluous blank lines - Coding Style

Removal of extra blank lines from the ieee80211_softmac.c file

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8192u: Remove redundant definitions in header
John Whitmore [Wed, 4 Jul 2018 14:20:50 +0000 (15:20 +0100)]
staging: rtl8192u: Remove redundant definitions in header

Truncated header file removing definitions which aren't used.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8192u: Use memset to initialize memory, instead of loop.
John Whitmore [Wed, 4 Jul 2018 14:20:49 +0000 (15:20 +0100)]
staging: rtl8192u: Use memset to initialize memory, instead of loop.

Replaced memory initialising loop with memset instead.

Suggested-by: Andy Shevchenko
Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8192u: Use __func__ instead of hardcoded string - Style
John Whitmore [Wed, 4 Jul 2018 11:59:21 +0000 (12:59 +0100)]
staging: rtl8192u: Use __func__ instead of hardcoded string - Style

Changed logging statements to use %s and __func__ instead of hard coding the
function name in a string.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: rename Hal8188ERateAdaptive
Michael Straube [Wed, 4 Jul 2018 11:37:41 +0000 (13:37 +0200)]
staging: rtl8188eu: rename Hal8188ERateAdaptive

Rename header and source file to avoid CamelCase.

Hal8188ERateAdaptive.h -> hal8188e_rate_adaptive.h
Hal8188ERateAdaptive.c -> hal8188e_rate_adaptive.c

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: rename Hal8188EPhyReg.h
Michael Straube [Wed, 4 Jul 2018 11:37:40 +0000 (13:37 +0200)]
staging: rtl8188eu: rename Hal8188EPhyReg.h

Rename header file to avoid CamelCase.

Hal8188EPhyReg.h -> hal8188e_phy_reg.h

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: rename Hal8188EPhyCfg.h
Michael Straube [Wed, 4 Jul 2018 11:37:39 +0000 (13:37 +0200)]
staging: rtl8188eu: rename Hal8188EPhyCfg.h

Rename header file to avoid CamelCase.

Hal8188EPhyCfg.h -> hal8188e_phy_cfg.h

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8723bs: remove rtl8192c_rf.h
Michael Straube [Fri, 6 Jul 2018 14:56:01 +0000 (16:56 +0200)]
staging: rtl8723bs: remove rtl8192c_rf.h

All functions declared in rtl8192c_rf.h have no definition/are not used
in any other file/anywhere. Checked with 'git grep <function_name>'.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix static checker warning to unlock mutex in wilc_deinit()
Ajay Singh [Thu, 5 Jul 2018 09:22:35 +0000 (14:52 +0530)]
staging: wilc1000: fix static checker warning to unlock mutex in wilc_deinit()

Fix for static checker warning inconsistent returns of
'hif_deinit_lock'(more details [1]).

"drivers/staging/wilc1000/host_interface.c:3390 wilc_deinit()
              warn: inconsistent returns 'hif_deinit_lock'."

Fixes: ff52a57a7a42 ("staging: wilc1000: move the allocation of cmd out
of wilc_enqueue_cmd()")

[1]. https://www.spinics.net/lists/linux-driver-devel/msg114216.html

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: remove rtw_mp_phy_regdef.h
Michael Straube [Mon, 2 Jul 2018 19:35:07 +0000 (21:35 +0200)]
staging: rtl8188eu: remove rtw_mp_phy_regdef.h

The header rtw_mp_phy_regdef.h is not used anywhere.
'git grep rtw_mp_phy_regdef.h' returns nothing, remove the file.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: fsl-dpaa2/ethsw: Update maintainers for Ethernet Switch driver
Razvan Stefanescu [Wed, 4 Jul 2018 08:17:44 +0000 (11:17 +0300)]
staging: fsl-dpaa2/ethsw: Update maintainers for Ethernet Switch driver

Removing myself as the maintainer for this driver and adding Ioana R.
and Ioana C.

Signed-off-by: Razvan Stefanescu <razvan.stefanescu@nxp.com>
Acked-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Acked-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rts5208: fix missing error check on call to rtsx_write_register
Colin Ian King [Mon, 2 Jul 2018 13:27:35 +0000 (14:27 +0100)]
staging: rts5208: fix missing error check on call to rtsx_write_register

Currently the check on error return from the call to rtsx_write_register
is checking the error status from the previous call. Fix this by adding
in the missing assignment of retval.

Detected by CoverityScan, CID#709877

Fixes: fa590c222fba ("staging: rts5208: add support for rts5208 and rts5288")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoStaging: Gasket: shift wrapping bug in gasket_read_modify_write_64()
Dan Carpenter [Fri, 6 Jul 2018 08:39:21 +0000 (11:39 +0300)]
Staging: Gasket: shift wrapping bug in gasket_read_modify_write_64()

This function only has one caller so mask_width is 1 and mask_shift is
32.  Shifting an int by 32 bits is undefined, but I guess on GCC it
wraps to 0x1?  Anyway it's supposed to be 0x100000000.

Fixes: 9a69f5087ccc ("drivers/staging: Gasket driver framework + Apex driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoStaging: Gasket: fix a couple off by one bugs
Dan Carpenter [Fri, 6 Jul 2018 08:38:25 +0000 (11:38 +0300)]
Staging: Gasket: fix a couple off by one bugs

The > should be >= or we end up writing one element beyond the end of
the interrupt_data->eventfd_ctxs[] array.

Fixes: 9a69f5087ccc ("drivers/staging: Gasket driver framework + Apex driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoStaging: Gasket: uninitialized return in gasket_mmap()
Dan Carpenter [Fri, 6 Jul 2018 08:37:56 +0000 (11:37 +0300)]
Staging: Gasket: uninitialized return in gasket_mmap()

We forgot to set the error code on this error path so ret can be
uninitialized.

Fixes: 9a69f5087ccc ("drivers/staging: Gasket driver framework + Apex driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agodrivers/staging/gasket: Use 2-factor allocator calls
Kees Cook [Wed, 4 Jul 2018 17:31:25 +0000 (10:31 -0700)]
drivers/staging/gasket: Use 2-factor allocator calls

As already done treewide, switch from open-coded multiplication to using
2-factor allocator helpers.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pinctrl: replace core_initcall_sync with builtin_platform_driver
Sergio Paracuellos [Thu, 28 Jun 2018 19:03:09 +0000 (21:03 +0200)]
staging: mt7621-pinctrl: replace core_initcall_sync with builtin_platform_driver

We don't really need initialization of this at such an early stage.
Just use builtin_platform_driver to initialize this driver.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pinctrl: remove 'rt2880_pinctrl_pin_dbg_show' callback
Sergio Paracuellos [Thu, 28 Jun 2018 19:03:08 +0000 (21:03 +0200)]
staging: mt7621-pinctrl: remove 'rt2880_pinctrl_pin_dbg_show' callback

The debug information provided by this function does not make
sense at all, so just remove it.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pinctrl: use ternary operator return in rt2880_get_group_name
Sergio Paracuellos [Thu, 28 Jun 2018 19:03:07 +0000 (21:03 +0200)]
staging: mt7621-pinctrl: use ternary operator return in rt2880_get_group_name

Trivial change to have only one return in 'rt2880_get_group_name'
function using a ternary operator instead of an if statement and
two returns.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pinctrl: refactor rt2880_pinctrl_dt_node_to_map function
Sergio Paracuellos [Thu, 28 Jun 2018 19:03:06 +0000 (21:03 +0200)]
staging: mt7621-pinctrl: refactor rt2880_pinctrl_dt_node_to_map function

Using 'function' and 'group' bindings in the device tree give the
posibility of refactor 'rt2880_pinctrl_dt_node_to_map' and simplify
it a lot. Make use of 'for_each_node_with_property' function to count
number of groups for the node and iterate over the groups using
'of_property_for_each_string' calling 'pinctrl_utils_add_map_mux'
function which is the same of the custom function in this driver code
'rt2880_pinctrl_dt_subnode_to_map' which is not needed anymore.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-dts: use 'function' and 'group' for pinctrl bindings
Sergio Paracuellos [Thu, 28 Jun 2018 19:03:05 +0000 (21:03 +0200)]
staging: mt7621-dts: use 'function' and 'group' for pinctrl bindings

According to documentation 'pinctrl-bindings.txt' bindings 'group'
and 'function' can be used directly. So replace all of them.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pinctrl: make use of pinctrl_utils_reserve_map
Sergio Paracuellos [Thu, 28 Jun 2018 19:03:04 +0000 (21:03 +0200)]
staging: mt7621-pinctrl: make use of pinctrl_utils_reserve_map

Function rt2880_pinctrl_dt_node_to_map was using 'kzalloc' to
reserve map memory. There is a 'pinctrl_utils_reserve_map' to
do this function. Just use it.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pinctrl: replace uint8_t type with u8 for 'gpio' field
Sergio Paracuellos [Thu, 28 Jun 2018 19:03:03 +0000 (21:03 +0200)]
staging: mt7621-pinctrl: replace uint8_t type with u8 for 'gpio' field

Struct 'rt2880_priv' contains a field 'gpio' which is defined
as uint8_t and should be defined with 'u8' which is preferred.
Update some cast along the code related with this new change.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pinctrl: make use of pinctrl_utils_free_map
Sergio Paracuellos [Thu, 28 Jun 2018 19:03:02 +0000 (21:03 +0200)]
staging: mt7621-pinctrl: make use of pinctrl_utils_free_map

There was a custom 'rt2880_pinctrl_dt_free_map' function which
it was doing the same as pinctrl_utils_free_map defined in
'pinctrl-utils.h' header file. Use it instead avoiding
code duplications.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pinctrl: use tabs instead of spaces in some indentations
Sergio Paracuellos [Thu, 28 Jun 2018 19:03:01 +0000 (21:03 +0200)]
staging: mt7621-pinctrl: use tabs instead of spaces in some indentations

Kernel coding style use tabs for indent code instead of spaces.
Fix some places where spaces were being used silencing also
checkpatch script complains.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pinctrl: align function parameters in some functions
Sergio Paracuellos [Thu, 28 Jun 2018 19:03:00 +0000 (21:03 +0200)]
staging: mt7621-pinctrl: align function parameters in some functions

Function parameters along the code has different alignment styles.
Just unify all of them making style consistent.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pinctrl: replace seq_printf with seq_puts
Sergio Paracuellos [Thu, 28 Jun 2018 19:02:59 +0000 (21:02 +0200)]
staging: mt7621-pinctrl: replace seq_printf with seq_puts

For a constant format without additional arguments, use seq_puts()
instead of seq_printf() fixing also the following checkpatch.pl
warning: 'Prefer seq_puts to seq_printf'

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pinctrl: avoid lines over 80 chars
Sergio Paracuellos [Thu, 28 Jun 2018 19:02:58 +0000 (21:02 +0200)]
staging: mt7621-pinctrl: avoid lines over 80 chars

This commit silence checkpatch warnings about lines which
exceeds 80 chars.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pinctrl: avoid space after if condition
Sergio Paracuellos [Thu, 28 Jun 2018 19:02:57 +0000 (21:02 +0200)]
staging: mt7621-pinctrl: avoid space after if condition

Adding spaces between if condition and parenthesis are not
needed at all and checkpatch script complains about them.
Fix one in driver code.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-mmc: Fix printk() facility level
Sergej Perschin [Thu, 5 Jul 2018 12:41:01 +0000 (14:41 +0200)]
staging: mt7621-mmc: Fix printk() facility level

The patch fixes the following issue:
WARNING: printk() should include KERN_<LEVEL> facility level

Signed-off-by: Sergej Perschin <ser.perschin@gmail.com>
Signed-off-by: Marcel Budoj <marcel.budoj@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-gpio: use devm_kasprintf to set gpio banks labels
Sergio Paracuellos [Thu, 5 Jul 2018 06:00:29 +0000 (08:00 +0200)]
staging: mt7621-gpio: use devm_kasprintf to set gpio banks labels

Instead of using a custom function to return desired name for gpio
use the default assigned one and concat it '-bankN' suffix using
devm_kasprintf kernel function.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-gpio: assign gpio chip custom changes after bgpio_init
Sergio Paracuellos [Thu, 5 Jul 2018 06:00:28 +0000 (08:00 +0200)]
staging: mt7621-gpio: assign gpio chip custom changes after bgpio_init

bgpio_init function set different data of the gpio chip, like the name.
We want specific name for each bank so to get that not overwritten
move all custom changes after the bgpio_init function call.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-gpio: use custom xlate function
Sergio Paracuellos [Thu, 5 Jul 2018 06:00:27 +0000 (08:00 +0200)]
staging: mt7621-gpio: use custom xlate function

The default gpio.of_xlate function assumes there is one gpio chip
for each devicetree node. Device tree had changed to only use one node,
which corresponds to 3 different gpio chips now. For that approach
to work we need a custom xlate function.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-gpio: set irq chip name only once
Sergio Paracuellos [Thu, 5 Jul 2018 06:00:26 +0000 (08:00 +0200)]
staging: mt7621-gpio: set irq chip name only once

There is only one irq chip so set its name only once
in driver probe function.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: fbtft: indent fbtft_device_display - last entry - pdev - dev
Radek Dostál [Mon, 2 Jul 2018 07:28:49 +0000 (09:28 +0200)]
staging: fbtft: indent fbtft_device_display - last entry - pdev - dev

The dev section was opening curly bracket, but not adding ident, which
resulted in two times "}," after each other with same indentation. Add
ident at the right place fixes this problem.

This formatting issue is not detectable by checkpatch.pl

Signed-off-by: Radek Dostál <radek.dostal@streamunlimited.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: fix block comments - coding style
Michael Straube [Sat, 30 Jun 2018 18:14:40 +0000 (20:14 +0200)]
staging: rtl8188eu: fix block comments - coding style

Write multiple single line comments as block comments to
follow kernel coding style and improve readability.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: move return type to functions definition line
Michael Straube [Sat, 30 Jun 2018 18:14:39 +0000 (20:14 +0200)]
staging: rtl8188eu: move return type to functions definition line

The return type of a function should be on the same line as the
definition.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: reorder switch cases and remove default break
Michael Straube [Sat, 30 Jun 2018 18:14:38 +0000 (20:14 +0200)]
staging: rtl8188eu: reorder switch cases and remove default break

Reorder the cases of a switch statement to be in ascending order.
Remove unrequired break from default case.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8723bs: simplify if else statement
Michael Straube [Sat, 30 Jun 2018 11:36:28 +0000 (13:36 +0200)]
staging: rtl8723bs: simplify if else statement

Simplify if else statement to a single function call
by passing the variable.

Suggested-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8723bs: fix comparsion to true/false and brace issues
Michael Straube [Sat, 30 Jun 2018 11:36:27 +0000 (13:36 +0200)]
staging: rtl8723bs: fix comparsion to true/false and brace issues

Use if(x) and if(!x) instead of comparsion to true/false.
Reported by checkpatch.

Remove unrequired braces from single if else statement.
Add missing space after else: else{ -> else {

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8192u Remove redundant #include directive
John Whitmore [Fri, 29 Jun 2018 18:10:06 +0000 (19:10 +0100)]
staging: rtl8192u Remove redundant #include directive

The file includes the file rtl819x_HT.h, which has already been included by
the previously included file ieee80211.h

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:r8188eu: Use lib80211 to encrypt (WEP) tx frames
Ivan Safonov [Sat, 30 Jun 2018 17:25:29 +0000 (20:25 +0300)]
staging:r8188eu: Use lib80211 to encrypt (WEP) tx frames

Put data to skb, decrypt with lib80211_crypt_wep, and place back to tx buffer.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8723bs: remove pointless if else in rtw_sdio_resume()
Michael Straube [Thu, 28 Jun 2018 17:02:52 +0000 (19:02 +0200)]
staging: rtl8723bs: remove pointless if else in rtw_sdio_resume()

Whether any of the conditions is true or not, the return variable
is always set to rtw_resume_process(padapter). Replace the if else
construct with a single call to rtw_resume_process(). Also remove
the now unused local variable pwrpriv.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: remove unnecessary parentheses
Michael Straube [Fri, 29 Jun 2018 18:59:44 +0000 (20:59 +0200)]
staging: rtl8188eu: remove unnecessary parentheses

Remove unnecessary parentheses as reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8723bs: fix line over 80 characters
Michael Straube [Sat, 30 Jun 2018 08:24:52 +0000 (10:24 +0200)]
staging: rtl8723bs: fix line over 80 characters

Fix line over 80 characters by replacing tab with space.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: remove rtw_ioctl_rtl.h
Michael Straube [Sat, 30 Jun 2018 14:59:41 +0000 (16:59 +0200)]
staging: rtl8188eu: remove rtw_ioctl_rtl.h

The header rtw_ioctl_rtl.h is not used anywhere.
Running 'grep -r rtw_ioctl_rtl *' from kernel root
directory returns nothing, remove the file.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: speakup: Replace strncpy with memcpy
Guenter Roeck [Sun, 1 Jul 2018 20:57:24 +0000 (13:57 -0700)]
staging: speakup: Replace strncpy with memcpy

gcc 8.1.0 generates the following warnings.

drivers/staging/speakup/kobjects.c: In function 'punc_store':
drivers/staging/speakup/kobjects.c:522:2: warning:
'strncpy' output truncated before terminating nul
copying as many bytes from a string as its length
drivers/staging/speakup/kobjects.c:504:6: note: length computed here

drivers/staging/speakup/kobjects.c: In function 'synth_store':
drivers/staging/speakup/kobjects.c:391:2: warning:
'strncpy' output truncated before terminating nul
copying as many bytes from a string as its length
drivers/staging/speakup/kobjects.c:388:8: note: length computed here

Using strncpy() is indeed less than perfect since the length of data to
be copied has already been determined with strlen(). Replace strncpy()
with memcpy() to address the warning and optimize the code a little.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agodrivers/staging: Gasket driver framework + Apex driver
Simon Que [Sat, 30 Jun 2018 02:49:38 +0000 (22:49 -0400)]
drivers/staging: Gasket driver framework + Apex driver

The Gasket (Google ASIC Software, Kernel Extensions, and Tools) kernel
framework is a generic, flexible system that supports thin kernel
drivers. Gasket kernel drivers are expected to handle opening and
closing devices, mmap'ing BAR space as requested, a small selection of
ioctls, and handling page table translation (covered below). Any other
functions should be handled by userspace code.

The Gasket common module is not enough to run a device. In order to
customize the Gasket code for a given piece of hardware, a device
specific module must be created. At a minimum, this module must define a
struct gasket_driver_desc containing the device-specific data for use by
the framework; in addition, the module must declare an __init function
that calls gasket_register_device with the module's gasket_driver_desc
struct. Finally, the driver must define an exit function that calls
gasket_unregister_device with the module's gasket_driver_desc struct.

One of the core assumptions of the Gasket framework is that precisely
one process is allowed to have an open write handle to the device node
at any given time. (That process may, once it has one write handle, open
any number of additional write handles.) This is accomplished by
tracking open and close data for each driver instance.

Signed-off-by: Rob Springer <rspringer@google.com>
Signed-off-by: John Joseph <jnjoseph@google.com>
Signed-off-by: Simon Que <sque@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging/skein: Remove Skein and Threefish code
Jason Cooper [Sun, 1 Jul 2018 18:48:14 +0000 (14:48 -0400)]
staging/skein: Remove Skein and Threefish code

It's been four years since this was added.  In the interim, skein has
not seen any mainstream adoption.  Same with the threefish block cipher
upon which it's based.

In the discussion over which hash algorithm will replace SHA1 in git,
it's not one of the contenders.

There's absolutely no reason to think that there is anything wrong with
Skein or Threefish.  The only reason for this removal is a lack of
adoption.

If a real user comes forward, I'd be happy to assist with integrating
this code into mainline.

Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoMerge 4.18-rc3 into staging-next
Greg Kroah-Hartman [Mon, 2 Jul 2018 06:21:54 +0000 (08:21 +0200)]
Merge 4.18-rc3 into staging-next

We want the staging/iio fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoLinux 4.18-rc3 v4.18-rc3
Linus Torvalds [Sun, 1 Jul 2018 23:04:53 +0000 (16:04 -0700)]
Linux 4.18-rc3

6 years agoMerge tag 'for-4.18-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux
Linus Torvalds [Sun, 1 Jul 2018 19:38:16 +0000 (12:38 -0700)]
Merge tag 'for-4.18-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux

Pull btrfs fixes from David Sterba:
 "We have a few regression fixes for qgroup rescan status tracking and
  the vm_fault_t conversion that mixed up the error values"

* tag 'for-4.18-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
  Btrfs: fix mount failure when qgroup rescan is in progress
  Btrfs: fix regression in btrfs_page_mkwrite() from vm_fault_t conversion
  btrfs: quota: Set rescan progress to (u64)-1 if we hit last leaf

6 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Linus Torvalds [Sun, 1 Jul 2018 19:32:19 +0000 (12:32 -0700)]
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull vfs fix from Al Viro:
 "Followup to procfs-seq_file series this window"

This fixes a memory leak by making sure that proc seq files release any
private data on close.  The 'proc_seq_open' has to be properly paired
with 'proc_seq_release' that releases the extra private data.

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  proc: add proc_seq_release

6 years agoMerge tag 'staging-4.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Sun, 1 Jul 2018 19:20:20 +0000 (12:20 -0700)]
Merge tag 'staging-4.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging/IIO fixes from Greg KH:
 "Here are a few small staging and IIO driver fixes for 4.18-rc3.

  Nothing major or big, all just fixes for reported problems since
  4.18-rc1. All of these have been in linux-next this week with no
  reported problems"

* tag 'staging-4.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
  staging: android: ion: Return an ERR_PTR in ion_map_kernel
  staging: comedi: quatech_daqp_cs: fix no-op loop daqp_ao_insn_write()
  iio: imu: inv_mpu6050: Fix probe() failure on older ACPI based machines
  iio: buffer: fix the function signature to match implementation
  iio: mma8452: Fix ignoring MMA8452_INT_DRDY
  iio: tsl2x7x/tsl2772: avoid potential division by zero
  iio: pressure: bmp280: fix relative humidity unit

6 years agoMerge tag 'tty-4.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Linus Torvalds [Sun, 1 Jul 2018 19:05:53 +0000 (12:05 -0700)]
Merge tag 'tty-4.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull tty/serial fixes from Greg KH:
 "Here are five fixes for the tty core and some serial drivers.

  The tty core ones fix some security and other issues reported by the
  syzbot that I have taken too long in responding to (sorry Tetsuo!).

  The 8350 serial driver fix resolves an issue of devices that used to
  work properly stopping working as they shouldn't have been added to a
  blacklist.

  All of these have been in linux-next for a few days with no reported
  issues"

* tag 'tty-4.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  vt: prevent leaking uninitialized data to userspace via /dev/vcs*
  serdev: fix memleak on module unload
  serial: 8250_pci: Remove stalled entries in blacklist
  n_tty: Access echo_* variables carefully.
  n_tty: Fix stall at n_tty_receive_char_special().

6 years agoMerge tag 'usb-4.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Sun, 1 Jul 2018 18:50:16 +0000 (11:50 -0700)]
Merge tag 'usb-4.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
 "Here is a number of USB gadget and other driver fixes for 4.18-rc3.

  There's a bunch of them here, most of them being gadget driver and
  xhci host controller fixes for reported issues (as normal), but there
  are also some new device ids, and some fixes for the typec code.

  There is an acpi core patch in here that was acked by the acpi
  maintainer as it is needed for the typec fixes in order to properly
  solve a problem in that driver.

  All of these have been in linux-next this week with no reported
  issues"

* tag 'usb-4.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (33 commits)
  usb: chipidea: host: fix disconnection detect issue
  usb: typec: tcpm: fix logbuffer index is wrong if _tcpm_log is re-entered
  typec: tcpm: Fix a msecs vs jiffies bug
  NFC: pn533: Fix wrong GFP flag usage
  usb: cdc_acm: Add quirk for Uniden UBC125 scanner
  staging/typec: fix tcpci_rt1711h build errors
  usb: typec: ucsi: Fix for incorrect status data issue
  usb: typec: ucsi: acpi: Workaround for cache mode issue
  acpi: Add helper for deactivating memory region
  usb: xhci: increase CRS timeout value
  usb: xhci: tegra: fix runtime PM error handling
  usb: xhci: remove the code build warning
  xhci: Fix kernel oops in trace_xhci_free_virt_device
  xhci: Fix perceived dead host due to runtime suspend race with event handler
  dwc2: gadget: Fix ISOC IN DDMA PID bitfield value calculation
  usb: gadget: dwc2: fix memory leak in gadget_init()
  usb: gadget: composite: fix delayed_status race condition when set_interface
  usb: dwc2: fix isoc split in transfer with no data
  usb: dwc2: alloc dma aligned buffer for isoc split in
  usb: dwc2: fix the incorrect bitmaps for the ports of multi_tt hub
  ...

6 years agoMerge tag 'dma-mapping-4.18-2' of git://git.infradead.org/users/hch/dma-mapping
Linus Torvalds [Sun, 1 Jul 2018 17:45:13 +0000 (10:45 -0700)]
Merge tag 'dma-mapping-4.18-2' of git://git.infradead.org/users/hch/dma-mapping

Pull dma mapping fixlet from Christoph Hellwig:
 "Add a missing export required by riscv and unicore"

* tag 'dma-mapping-4.18-2' of git://git.infradead.org/users/hch/dma-mapping:
  swiotlb: export swiotlb_dma_ops

6 years agoMerge branch 'parisc-4.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller...
Linus Torvalds [Sat, 30 Jun 2018 21:16:30 +0000 (14:16 -0700)]
Merge branch 'parisc-4.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux

Pull parisc fixes and cleanups from Helge Deller:
 "Nothing exiting in this patchset, just

   - small cleanups of header files

   - default to 4 CPUs when building a SMP kernel

   - mark 16kB and 64kB page sizes broken

   - addition of the new io_pgetevents syscall"

* 'parisc-4.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
  parisc: Build kernel without -ffunction-sections
  parisc: Reduce debug output in unwind code
  parisc: Wire up io_pgetevents syscall
  parisc: Default to 4 SMP CPUs
  parisc: Convert printk(KERN_LEVEL) to pr_lvl()
  parisc: Mark 16kB and 64kB page sizes BROKEN
  parisc: Drop struct sigaction from not exported header file

6 years agoMerge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Linus Torvalds [Sat, 30 Jun 2018 21:08:06 +0000 (14:08 -0700)]
Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Olof Johansson:
 "A smaller batch for the end of the week (let's see if I can keep the
  weekly cadence going for once).

  All medium-grade fixes here, nothing worrisome:

   - Fixes for some fairly old bugs around SD card write-protect
     detection and GPIO interrupt assignments on Davinci.

   - Wifi module suspend fix for Hikey.

   - Minor DT tweaks to fix inaccuracies for Amlogic platforms, one
     of which solves booting with third-party u-boot"

* tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  arm64: dts: hikey960: Define wl1837 power capabilities
  arm64: dts: hikey: Define wl1835 power capabilities
  ARM64: dts: meson-gxl: fix Mali GPU compatible string
  ARM64: dts: meson-axg: fix ethernet stability issue
  ARM64: dts: meson-gx: fix ATF reserved memory region
  ARM64: dts: meson-gxl-s905x-p212: Add phy-supply for usb0
  ARM64: dts: meson: fix register ranges for SD/eMMC
  ARM64: dts: meson: disable sd-uhs modes on the libretech-cc
  ARM: dts: da850: Fix interrups property for gpio
  ARM: davinci: board-da850-evm: fix WP pin polarity for MMC/SD

6 years agoMerge tag 'kbuild-fixes-v4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/masah...
Linus Torvalds [Sat, 30 Jun 2018 20:05:30 +0000 (13:05 -0700)]
Merge tag 'kbuild-fixes-v4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild

Pull Kbuild fixes from Masahiro Yamada:

 - introduce __diag_* macros and suppress -Wattribute-alias warnings
   from GCC 8

 - fix stack protector test script for x86_64

 - fix line number handling in Kconfig

 - document that '#' starts a comment in Kconfig

 - handle P_SYMBOL property in dump debugging of Kconfig

 - correct help message of LD_DEAD_CODE_DATA_ELIMINATION

 - fix occasional segmentation faults in Kconfig

* tag 'kbuild-fixes-v4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
  kconfig: loop boundary condition fix
  kbuild: reword help of LD_DEAD_CODE_DATA_ELIMINATION
  kconfig: handle P_SYMBOL in print_symbol()
  kconfig: document Kconfig source file comments
  kconfig: fix line numbers for if-entries in menu tree
  stack-protector: Fix test with 32-bit userland and CONFIG_64BIT=y
  powerpc: Remove -Wattribute-alias pragmas
  disable -Wattribute-alias warning for SYSCALL_DEFINEx()
  kbuild: add macro for controlling warnings to linux/compiler.h

6 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 30 Jun 2018 18:42:14 +0000 (11:42 -0700)]
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Ingo Molnar:
 "The biggest diffstat comes from self-test updates, plus there's entry
  code fixes, 5-level paging related fixes, console debug output fixes,
  and misc fixes"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/mm: Clean up the printk()s in show_fault_oops()
  x86/mm: Drop unneeded __always_inline for p4d page table helpers
  x86/efi: Fix efi_call_phys_epilog() with CONFIG_X86_5LEVEL=y
  selftests/x86/sigreturn: Do minor cleanups
  selftests/x86/sigreturn/64: Fix spurious failures on AMD CPUs
  x86/entry/64/compat: Fix "x86/entry/64/compat: Preserve r8-r11 in int $0x80"
  x86/mm: Don't free P4D table when it is folded at runtime
  x86/entry/32: Add explicit 'l' instruction suffix
  x86/mm: Get rid of KERN_CONT in show_fault_oops()

6 years agoMerge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 30 Jun 2018 18:26:25 +0000 (11:26 -0700)]
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull perf fixes from Ingo Molnar:
 "Tooling fixes mostly, plus a build warning fix"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (21 commits)
  perf/core: Move inline keyword at the beginning of declaration
  tools/headers: Pick up latest kernel ABIs
  perf tools: Fix crash caused by accessing feat_ops[HEADER_LAST_FEATURE]
  perf script: Fix crash because of missing evsel->priv
  perf script: Add missing output fields in a hint
  perf bench: Fix numa report output code
  perf stat: Remove duplicate event counting
  perf alias: Rebuild alias expression string to make it comparable
  perf alias: Remove trailing newline when reading sysfs files
  perf tools: Fix a clang 7.0 compilation error
  tools include uapi: Synchronize bpf.h with the kernel
  tools include uapi: Update if_link.h to pick IFLA_{BRPORT_ISOLATED,VXLAN_TTL_INHERIT}
  tools include powerpc: Update arch/powerpc/include/uapi/asm/unistd.h copy to get 'rseq' syscall
  perf tools: Update x86's syscall_64.tbl, adding 'io_pgetevents' and 'rseq'
  tools headers uapi: Synchronize drm/drm.h
  perf intel-pt: Fix packet decoding of CYC packets
  perf tests: Add valid callback for parse-events test
  perf tests: Add event parsing error handling to parse events test
  perf report powerpc: Fix crash if callchain is empty
  perf test session topology: Fix test on s390
  ...

6 years agoMerge tag 'selinux-pr-20180629' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 30 Jun 2018 18:15:12 +0000 (11:15 -0700)]
Merge tag 'selinux-pr-20180629' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux

Pull selinux fix from Paul Moore:
 "One fairly straightforward patch to fix a longstanding issue where a
  process could stall while accessing files in selinuxfs and block
  everyone else due to a held mutex.

  The patch passes all our tests and looks to apply cleanly to your
  current tree"

* tag 'selinux-pr-20180629' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux:
  selinux: move user accesses in selinuxfs out of locked regions

6 years agoMerge tag 'for-linus-20180629' of git://git.kernel.dk/linux-block
Linus Torvalds [Sat, 30 Jun 2018 17:47:46 +0000 (10:47 -0700)]
Merge tag 'for-linus-20180629' of git://git.kernel.dk/linux-block

Pull block fixes from Jens Axboe:
 "Small set of fixes for this series. Mostly just minor fixes, the only
  oddball in here is the sg change.

  The sg change came out of the stall fix for NVMe, where we added a
  mempool and limited us to a single page allocation. CONFIG_SG_DEBUG
  sort-of ruins that, since we'd need to account for that. That's
  actually a generic problem, since lots of drivers need to allocate SG
  lists. So this just removes support for CONFIG_SG_DEBUG, which I added
  back in 2007 and to my knowledge it was never useful.

  Anyway, outside of that, this pull contains:

   - clone of request with special payload fix (Bart)

   - drbd discard handling fix (Bart)

   - SATA blk-mq stall fix (me)

   - chunk size fix (Keith)

   - double free nvme rdma fix (Sagi)"

* tag 'for-linus-20180629' of git://git.kernel.dk/linux-block:
  sg: remove ->sg_magic member
  drbd: Fix drbd_request_prepare() discard handling
  blk-mq: don't queue more if we get a busy return
  block: Fix cloning of requests with a special payload
  nvme-rdma: fix possible double free of controller async event buffer
  block: Fix transfer when chunk sectors exceeds max

6 years agoMerge tag 'powerpc-4.18-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Linus Torvalds [Sat, 30 Jun 2018 02:28:26 +0000 (19:28 -0700)]
Merge tag 'powerpc-4.18-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

Pull powerpc fixes from Michael Ellerman:
 "Two regression fixes, and a new syscall wire-up:

   - A fix for the recent conversion to time64_t in the powermac RTC
     routines, which caused time to go backward.

   - Another fix for fallout from the split PMD PTL conversion.

   - Wire up the new io_pgetevents() syscall.

  Thanks to: Aneesh Kumar K.V, Arnd Bergmann, Breno Leitao, Mathieu
  Malaterre"

* tag 'powerpc-4.18-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  powerpc/powermac: Fix rtc read/write functions
  powerpc/mm/32: Fix pgtable_page_dtor call
  powerpc: Wire up io_pgetevents

6 years agoMerge tag 'davinci-fixes-for-v4.18' of git://git.kernel.org/pub/scm/linux/kernel...
Olof Johansson [Fri, 29 Jun 2018 21:08:27 +0000 (14:08 -0700)]
Merge tag 'davinci-fixes-for-v4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into fixes

This fixes polarity of SD card write-protect pin on DA850 EVM
and fixes interrupt property for DA850 SoC GPIO as defined in
device-tree.

Both of these are not introduced with v4.18 merge but have
existed prior.

* tag 'davinci-fixes-for-v4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci:
  ARM: dts: da850: Fix interrups property for gpio
  ARM: davinci: board-da850-evm: fix WP pin polarity for MMC/SD

Signed-off-by: Olof Johansson <olof@lixom.net>
6 years agoMerge tag 'hisi-fixes-for-4.18' of git://github.com/hisilicon/linux-hisi into fixes
Olof Johansson [Fri, 29 Jun 2018 21:06:49 +0000 (14:06 -0700)]
Merge tag 'hisi-fixes-for-4.18' of git://github.com/hisilicon/linux-hisi into fixes

ARM64: hisi fixes for 4.18

- Added power capabilities for the mmc host controller on the
  hikey and hikey960 boards to avoid broken wifi.

* tag 'hisi-fixes-for-4.18' of git://github.com/hisilicon/linux-hisi:
  arm64: dts: hikey960: Define wl1837 power capabilities
  arm64: dts: hikey: Define wl1835 power capabilities

Signed-off-by: Olof Johansson <olof@lixom.net>
6 years agoMerge tag 'amlogic-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman...
Olof Johansson [Fri, 29 Jun 2018 21:04:39 +0000 (14:04 -0700)]
Merge tag 'amlogic-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into fixes

Amlogic fixes for v4.18-rc
- minor 64-bit DT fixes

* tag 'amlogic-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic:
  ARM64: dts: meson-gxl: fix Mali GPU compatible string
  ARM64: dts: meson-axg: fix ethernet stability issue
  ARM64: dts: meson-gx: fix ATF reserved memory region
  ARM64: dts: meson-gxl-s905x-p212: Add phy-supply for usb0
  ARM64: dts: meson: fix register ranges for SD/eMMC
  ARM64: dts: meson: disable sd-uhs modes on the libretech-cc

Signed-off-by: Olof Johansson <olof@lixom.net>
6 years agoMerge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Linus Torvalds [Fri, 29 Jun 2018 19:25:26 +0000 (12:25 -0700)]
Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fixes from Catalin Marinas:

 - The alternatives patching code uses flush_icache_range() which itself
   uses alternatives. Change the code to use an unpatched variant of
   cache maintenance

 - Remove unnecessary ISBs from set_{pte,pmd,pud}

 - perf: xgene_pmu: Fix IOB SLOW PMU parser error

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: Remove unnecessary ISBs from set_{pte,pmd,pud}
  arm64: Avoid flush_icache_range() in alternatives patching code
  drivers/perf: xgene_pmu: Fix IOB SLOW PMU parser error

6 years agoMerge branch 'i2c/for-current-fixed' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 29 Jun 2018 19:21:12 +0000 (12:21 -0700)]
Merge branch 'i2c/for-current-fixed' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull i2c fixes from Wolfram Sang:

 - a revert because of bugzilla #200045 (and some documentation about
   it)

 - another regression fix in the i2c-gpio driver

 - a leak fix for the i2c core

* 'i2c/for-current-fixed' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: gpio: initialize SCL to HIGH again
  i2c: smbus: kill memory leak on emulated and failed DMA SMBus xfers
  i2c: algos: bit: mention our experience about initial states
  Revert "i2c: algo-bit: init the bus to a known state"

6 years agoMerge tag 'ceph-for-4.18-rc3' of git://github.com/ceph/ceph-client
Linus Torvalds [Fri, 29 Jun 2018 19:19:47 +0000 (12:19 -0700)]
Merge tag 'ceph-for-4.18-rc3' of git://github.com/ceph/ceph-client

Pull ceph fix from Ilya Dryomov:
 "A trivial dentry leak fix from Zheng"

* tag 'ceph-for-4.18-rc3' of git://github.com/ceph/ceph-client:
  ceph: fix dentry leak in splice_dentry()

6 years agoparisc: Build kernel without -ffunction-sections
Helge Deller [Fri, 20 Apr 2018 21:13:44 +0000 (23:13 +0200)]
parisc: Build kernel without -ffunction-sections

As suggested by Nick Piggin it seems we can drop the -ffunction-sections
compile flag, now that the kernel uses thin archives. Testing with 32-
and 64-bit kernel showed no difference in kernel size.

Suggested-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Helge Deller <deller@gmx.de>
6 years agosg: remove ->sg_magic member
Jens Axboe [Fri, 29 Jun 2018 14:48:06 +0000 (08:48 -0600)]
sg: remove ->sg_magic member

This was introduced more than a decade ago when sg chaining was
added, but we never really caught anything with it. The scatterlist
entry size can be critical, since drivers allocate it, so remove
the magic member. Recently it's been triggering allocation stalls
and failures in NVMe.

Tested-by: Jordan Glover <Golden_Miller83@protonmail.ch>
Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoMerge tag 'pci-v4.18-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaa...
Linus Torvalds [Fri, 29 Jun 2018 14:22:46 +0000 (07:22 -0700)]
Merge tag 'pci-v4.18-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci

Pull PCI fixes from Bjorn Helgaas:

 - Fix crash caused by endpoint library initialization order change
   (Alan Douglas)

 - Fix shpchp NULL pointer dereference regression on non-ACPI platforms
   (Bjorn Helgaas)

 - Move PCI_DOMAINS selection to fix build regression (Lorenzo
   Pieralisi)

* tag 'pci-v4.18-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
  PCI: controller: Move PCI_DOMAINS selection to arch Kconfig
  PCI: Initialize endpoint library before controllers
  PCI: shpchp: Manage SHPC unconditionally on non-ACPI systems

6 years agoMerge tag 'pm-4.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Linus Torvalds [Fri, 29 Jun 2018 14:14:41 +0000 (07:14 -0700)]
Merge tag 'pm-4.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management fixes from Rafael Wysocki:
 "These fix up recently added features (the Kryo cpufreq driver and
  performance states coverage in the generic power domains framework),
  add missing documentation for a recently added sysfs knob in the
  intel_pstate driver and fix an error in its documentation.

  Specifics:

   - Fix the initialization time error handling in the recently added
     Kryo cpufreq driver (Dan Carpenter).

   - Fix up the recently added coverage of performance states in the
     generic power domains (genpd) framework (Viresh Kumar).

   - Add missing documentation of the new hwp_dynamic_boost sysfs knob
     in the intel_pstate driver (Rafael Wysocki).

   - Fix incorrect sysfs path in the intel_pstate driver documentation
     (Rafael Wysocki)"

* tag 'pm-4.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  Documentation: intel_pstate: Describe hwp_dynamic_boost sysfs knob
  Documentation: admin-guide: intel_pstate: Fix sysfs path
  PM / Domains: Rename opp_node to np
  PM / Domains: Fix return value of of_genpd_opp_to_performance_state()
  cpufreq: qcom-kryo: Fix error handling in probe()

6 years agoMerge tag 'drm-fixes-2018-06-29' of git://anongit.freedesktop.org/drm/drm
Linus Torvalds [Fri, 29 Jun 2018 14:11:03 +0000 (07:11 -0700)]
Merge tag 'drm-fixes-2018-06-29' of git://anongit.freedesktop.org/drm/drm

Pull drm fixes from Dave Airlie:
 "Nothing too major this round:

   - small set of mali-dp fixes

   - single meson fix

   - a bunch of amdgpu fixes (one makes non-4k page sizes not be a bad
     experience)"

* tag 'drm-fixes-2018-06-29' of git://anongit.freedesktop.org/drm/drm:
  drm/amd/display: release spinlock before committing updates to stream
  drm/amdgpu:Support new VCN FW version naming convention
  drm/amdgpu: fix UBSAN: Undefined behaviour for amdgpu_fence.c
  drm/meson: Fix an un-handled error path in 'meson_drv_bind_master()'
  drm/amdgpu: GPU vs CPU page size fixes in amdgpu_vm_bo_split_mapping
  drm/amdgpu: Count disabled CRTCs in commit tail earlier
  drm/mali-dp: Rectify the width and height passed to rotmem_required()
  drm/arm/malidp: Preserve LAYER_FORMAT contents when setting format
  drm: mali-dp: Enable Global SE interrupts mask for DP500
  drm/arm/malidp: Ensure that the crtcs are shutdown before removing any encoder/connector

6 years agoMerge tag 'for-4.18/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device...
Linus Torvalds [Fri, 29 Jun 2018 14:07:25 +0000 (07:07 -0700)]
Merge tag 'for-4.18/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm

Pull device mapper fixes from Mike Snitzer:

 - Fix dm core to use more efficient bio_split() instead of
   bio_clone_bioset(). Also fixes splitting bio that has integrity
   payload.

 - Three fixes related to properly validating DAX capabilities of a
   stacked DM device that will advertise DAX support.

 - Update DM writecache target to use 2-factor allocator arguments. Kees
   says this is the last related change for 4.18.

 - Fix DM zoned target to use GFP_NOIO to avoid triggering reclaim
   during IO submission (caught by lockdep).

 - Fix DM thinp to gracefully recover from running out of data space
   while a previous async discard completes (whereby freeing space).

 - Fix DM thinp's metadata transaction commit to avoid needless work.

* tag 'for-4.18/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
  dm: prevent DAX mounts if not supported
  dax: check for QUEUE_FLAG_DAX in bdev_dax_supported()
  pmem: only set QUEUE_FLAG_DAX for fsdax mode
  dm thin: handle running out of data space vs concurrent discard
  dm raid: don't use 'const' in function return
  dm zoned: avoid triggering reclaim from inside dmz_map()
  dm writecache: use 2-factor allocator arguments
  dm thin metadata: remove needless work from __commit_transaction
  dm: use bio_split() when splitting out the already processed bio

6 years agoMerge branch 'nvme-4.18' of git://git.infradead.org/nvme into for-linus
Jens Axboe [Fri, 29 Jun 2018 13:55:41 +0000 (07:55 -0600)]
Merge branch 'nvme-4.18' of git://git.infradead.org/nvme into for-linus

Pull single NVMe fix from Christoph.

* 'nvme-4.18' of git://git.infradead.org/nvme:
  nvme-rdma: fix possible double free of controller async event buffer

6 years agodrbd: Fix drbd_request_prepare() discard handling
Bart Van Assche [Mon, 25 Jun 2018 22:51:30 +0000 (15:51 -0700)]
drbd: Fix drbd_request_prepare() discard handling

Fix the test that verifies whether bio_op(bio) represents a discard
or write zeroes operation. Compile-tested only.

Cc: Philipp Reisner <philipp.reisner@linbit.com>
Cc: Lars Ellenberg <lars.ellenberg@linbit.com>
Fixes: 7435e9018f91 ("drbd: zero-out partial unaligned discards on local backend")
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoblk-mq: don't queue more if we get a busy return
Jens Axboe [Thu, 28 Jun 2018 17:54:01 +0000 (11:54 -0600)]
blk-mq: don't queue more if we get a busy return

Some devices have different queue limits depending on the type of IO. A
classic case is SATA NCQ, where some commands can queue, but others
cannot. If we have NCQ commands inflight and encounter a non-queueable
command, the driver returns busy. Currently we attempt to dispatch more
from the scheduler, if we were able to queue some commands. But for the
case where we ended up stopping due to BUSY, we should not attempt to
retrieve more from the scheduler. If we do, we can get into a situation
where we attempt to queue a non-queueable command, get BUSY, then
successfully retrieve more commands from that scheduler and queue those.
This can repeat forever, starving the non-queuable command indefinitely.

Fix this by NOT attempting to pull more commands from the scheduler, if
we get a BUSY return. This should also be more optimal in terms of
letting requests stay in the scheduler for as long as possible, if we
get a BUSY due to the regular out-of-tags condition.

Reviewed-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoaio: mark __aio_sigset::sigmask const
Avi Kivity [Fri, 29 Jun 2018 13:37:25 +0000 (15:37 +0200)]
aio: mark __aio_sigset::sigmask const

io_pgetevents() will not change the signal mask.  Mark it const to make
it clear and to reduce the need for casts in user code.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Avi Kivity <avi@scylladb.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
[hch: reapply the patch that got incorrectly reverted]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
6 years agonet: handle NULL ->poll gracefully
Christoph Hellwig [Fri, 29 Jun 2018 13:37:24 +0000 (15:37 +0200)]
net: handle NULL ->poll gracefully

The big aio poll revert broke various network protocols that don't
implement ->poll as a patch in the aio poll serie removed sock_no_poll
and made the common code handle this case.

Reported-by: syzbot+57727883dbad76db2ef0@syzkaller.appspotmail.com
Reported-by: syzbot+cdb0d3176b53d35ad454@syzkaller.appspotmail.com
Reported-by: syzbot+2c7e8f74f8b2571c87e8@syzkaller.appspotmail.com
Reported-by: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Fixes: a11e1d432b51 ("Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>