OSDN Git Service

uclinux-h8/linux.git
5 years agostaging:rtl8192u: Rename multiple variables - Style
John Whitmore [Sat, 4 Aug 2018 09:18:55 +0000 (10:18 +0100)]
staging:rtl8192u: Rename multiple variables - Style

All of the variables used within the structures of the union qos_tclas
cause checkpatch issue due to CamelCase naming. As none the member
variables are used in code all have been changed on one patch.

These changes are coding style in nature and should not impact runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Rename types in QOS_TCLAS union - Style
John Whitmore [Sat, 4 Aug 2018 09:18:54 +0000 (10:18 +0100)]
staging:rtl8192u: Rename types in QOS_TCLAS union - Style

Whilst none of the structures inside the qos_tclas union are used, their
names conflict with the coding standard being named in uppercase.
The names of all five have been changed to lowercase.

This is a style change, and since none of the structures are referenced,
these changes should have no impact on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Remove typedef and rename QOS_TCLAS - Style
John Whitmore [Sat, 4 Aug 2018 09:18:53 +0000 (10:18 +0100)]
staging:rtl8192u: Remove typedef and rename QOS_TCLAS - Style

Remove the typedef from the union QOS_TCLAS, which causes a checkpatch
issue with defining new types. In addition, as a type, the name should
be in lowercase so has been changed.

These are coding style changes and should have no impact on runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Clean up of spacing - Style
John Whitmore [Fri, 3 Aug 2018 00:02:11 +0000 (01:02 +0100)]
staging:rtl8192u: Clean up of spacing - Style

Multiple blank line, which cause an issue with checkpath, have been
removed and the spacing of definitions have been aligned to look
cleaner.

These are coding style changes which should have no impact on
runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Rename Register Constants - Style
John Whitmore [Fri, 3 Aug 2018 00:02:10 +0000 (01:02 +0100)]
staging:rtl8192u: Rename Register Constants - Style

The four register constants, 'Current_Tx_Rate_Reg',
'Initial_Tx_Rate_Reg', 'Tx_Retry_Count_Reg' and 'RegC38_TH' all cause
checkpatch issue with CamelCase naming. The three have been renamed to
'CURRENT_TX_RATE_REG', 'INITIAL_TX_RATE_REG', 'TX_RETRY_COUNT_REG' and
'REG_C38_TH' respectively.

These are coding style changes which should have no impact on runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Rename constants - Style
John Whitmore [Fri, 3 Aug 2018 00:02:09 +0000 (01:02 +0100)]
staging:rtl8192u: Rename constants - Style

The constants 'VeryLowRSSI' and 'CTSToSelfTHVal' generate warnings from
checkpatch due to the use of CamelCase naming. The two constants have
been renamed to 'VERY_LOW_RSSI' and 'CTS_TO_SELF_TH_VAL' respectively.

These are coding style changes which should have no impact on runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Rename constants RateAdaptiveTH_Low_* - Style
John Whitmore [Fri, 3 Aug 2018 00:02:08 +0000 (01:02 +0100)]
staging:rtl8192u: Rename constants RateAdaptiveTH_Low_* - Style

The two constants, RateAdaptiveTH_Low_20M and RateAdaptiveTH_Low_40M
generate a checkpatch warning about CamelCase naming. The two have been
renamed to clear this issue. RATE_ADAPTIVE_TH_LOW_20M and
RATE_ADAPTIVE_TH_LOW_40M

This is a coding style change which should have no impact on runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Rename RateAdaptiveTH_High - Style
John Whitmore [Fri, 3 Aug 2018 00:02:07 +0000 (01:02 +0100)]
staging:rtl8192u: Rename RateAdaptiveTH_High - Style

The constant RateAdaptiveTH_High causes a checkpatch issue with respect
to CamelCase naming. As a result the constant has been renamed to
RATE_ADAPTIVE_TH_HIGH.

This is purely a coding style change which should have no impact on
runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Rename DM_DIG_MIN_Netcore - Style
John Whitmore [Fri, 3 Aug 2018 00:02:06 +0000 (01:02 +0100)]
staging:rtl8192u: Rename DM_DIG_MIN_Netcore - Style

The constant DM_DIG_MIN_Netcore causes a checkpatch issue with CamelCase
naming so has been renamed to DM_DIG_MIN_NETCORE.

This is a simple coding style change which should have no impact on
runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Refactor DCMD_TXCMD_T structure - Style
John Whitmore [Fri, 3 Aug 2018 00:02:05 +0000 (01:02 +0100)]
staging:rtl8192u: Refactor DCMD_TXCMD_T structure - Style

The structure DCMD_TXCMD_T is declared with a typedef, which causes a
checkpatch issue with defining new types. As a result the typedef has
been removed.

The structure's name DCMD_TXCMD_T, as a type, is meant to be lowercase
so has been renamed to tx_config_cmd.

The structures three members, (Op, Length, and Value) are all violating
the coding standard policy on CamelCase naming, so have all been renamed.
They have been renamed with longer names, (cmd_op, cmd_length and
cmd_value), to make the variable names easier to search for in code.

The magic numbers '4' and '12' have both been replaced with sizeof()
calls, as they both represent the size of data elements.

These are coding style changes which should have no impact on runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Remove member reserved - Style
John Whitmore [Fri, 3 Aug 2018 00:02:04 +0000 (01:02 +0100)]
staging:rtl8192u: Remove member reserved - Style

The structure dynamic_rx_path_sel contains a u8 member variable called
reserved. This member variable is never actually used in the code.

The naming suggests that the sizeof the structure is significant but
the only use of the structure is a local static in r8192U_dm.c:

static struct dynamic_rx_path_sel DM_RxPathSelTable;

There is no apparent significance to the sizeof the declared structure
DM_RxPathSelTable. As a result the reserved member variable has been
removed from the structure.

This is a coding style change which should have no impact on runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Rename member disabledRF - Style
John Whitmore [Fri, 3 Aug 2018 00:02:03 +0000 (01:02 +0100)]
staging:rtl8192u: Rename member disabledRF - Style

Rename the member variable disabledRF to disabled_rf. This change
resolves the checkpatch issue with CamelCase naming.

The change is purely a coding style change which should have no impact
on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Remove member diff_TH - Style
John Whitmore [Fri, 3 Aug 2018 00:02:02 +0000 (01:02 +0100)]
staging:rtl8192u: Remove member diff_TH - Style

The member variable diff_TH is assigned a constant value and then used
in a comparison. The variable is never changed so the comparison can
as easily be performed directly with the defined constant.

The member variable has been removed and the defined constant
RxPathSelection_diff_TH renamed to RX_PATH_SELECTION_DIFF_TH, to clear
the checkpatch issue with CamelCase naming.

These are coding style changes which should have no impact on runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Remove SS_TH_low - Style
John Whitmore [Fri, 3 Aug 2018 00:02:01 +0000 (01:02 +0100)]
staging:rtl8192u: Remove SS_TH_low - Style

The member variable SS_TH_low is assigned a constant and then used
in a comparison. This member variable is redundant as the constant
can be used directly for the comparison.

In addition the constant RxPathSelection_SS_TH_low has been renamed
to RX_PATH_SELECTION_SS_TH_LOW, to clear the checkpatch issue with
CamelCase naming.

These changes are coding style in nature and should not impact
runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Rename cck_Rx_path - Style
John Whitmore [Fri, 3 Aug 2018 00:02:00 +0000 (01:02 +0100)]
staging:rtl8192u: Rename cck_Rx_path - Style

Rename the member variable cck_Rx_path to cck_rx_path. This clears
the checkpatch issue with CamelCase naming.

This is a coding style change which should have no impact one runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Remove member variable Enable - Style
John Whitmore [Fri, 3 Aug 2018 00:01:59 +0000 (01:01 +0100)]
staging:rtl8192u: Remove member variable Enable - Style

The structure dynamic_rx_path_sel defines a member variable 'Enable'
which is initialised and later tested. The variable is however never
changed to the test is redundant and the member variable is then never
used.

The member variable, initialisation and test have all been removed.

This is a coding style change which should not impact runtime code
execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Remove unused extern DM_RxPathSelTable - Style
John Whitmore [Fri, 3 Aug 2018 00:01:58 +0000 (01:01 +0100)]
staging:rtl8192u: Remove unused extern DM_RxPathSelTable - Style

The file r8192U_dm.h defines the structure DM_RxPathSelTable as being
external. The structure is however declared in r8192U_dm.c and only
used locally in that file.

As a result the external definition has been removed and the declaration
in r8192U_dm.c changed to being of type static.

This is a coding style change which should not impact runtime code
execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Rename enum constants - Style
John Whitmore [Fri, 3 Aug 2018 00:01:57 +0000 (01:01 +0100)]
staging:rtl8192u: Rename enum constants - Style

Rename the two constants defined in the enumerated type enum
cck_rx_path_method so that they are both uppercase, as suggested by
the coding style.

This is purely a coding style change and should have no impact on
runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Remove member initialgain_lowerbound_state - Style
John Whitmore [Fri, 3 Aug 2018 00:01:56 +0000 (01:01 +0100)]
staging:rtl8192u: Remove member initialgain_lowerbound_state - Style

The structure 'dig' defines a member variable
'initialgain_lowerbound_state', which although initialised to false,
is never used in the code. As a result this unused member variable
has been removed.

This is a coding style change which should not impact runtime code
execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Remove member variable rx_gain_range_max - Style
John Whitmore [Fri, 3 Aug 2018 00:01:55 +0000 (01:01 +0100)]
staging:rtl8192u: Remove member variable rx_gain_range_max - Style

The structure 'dig' defines a member variable, (rx_gain_range_max)
which is initialised to the value 'DM_DIG_MAX', (a defined constant).
The variable is then used to test and set another variable. Since
the member rx_gain_range_max is never assigned any other value then
the constant 'DM_DIG_MAX' the code might as well simply use that
constant, rather the a member variable set to that constant.

The member variable has been removed and the constant used directly
in the code. This is a coding style change which should not impact
runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Remove debug member from structures - Style
John Whitmore [Fri, 3 Aug 2018 00:01:54 +0000 (01:01 +0100)]
staging:rtl8192u: Remove debug member from structures - Style

Two structures, (struct dig and struct dynamic_rx_path_sel) contain
a u8 member variable representing debug setting. In the file r8192U_dm.c
these member variables, for both structures, are initialised to an
enumerated constant 'DM_DBG_OFF'. The member variables are never
assigned another value, other then off. Later in code the member
variables are tested to for equality to 'DM_DBG_OFF' and if that is the
case an assignment statement is executed.

Since the value of the variables is always off the test is redundant and
the conditional branch can just be executed without the test. Since the
member variables are then actually used both have been removed, along
with the enumerated type which defines debug status, on/off.

These are coding style changes to remove unused or redundant code, there
should be no impact on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: wilc1000: remove TODO item for comments and code style
Ajay Singh [Fri, 3 Aug 2018 10:56:15 +0000 (16:26 +0530)]
staging: wilc1000: remove TODO item for comments and code style

Remove below item from TODO as these changes were included as part of
previous submitted patch series.

'rework comments and function headers(also coding style)'

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: wilc1000: replace ISWILC1000() macro with inline function
Ajay Singh [Fri, 3 Aug 2018 10:56:14 +0000 (16:26 +0530)]
staging: wilc1000: replace ISWILC1000() macro with inline function

Cleanup patch to avoid below checkpatch issue by replacing the macro
with inline function.

Macro argument 'id' may be better as '(id)' to avoid precedence issues.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: wilc1000: added Microchip copyright notice header
Ajay Singh [Fri, 3 Aug 2018 10:56:13 +0000 (16:26 +0530)]
staging: wilc1000: added Microchip copyright notice header

Cleanup the copyright notice header from the WILC1000 files.
Replace copyright header of 'Atmel' & 'NewportMedia' with 'Microchip & its
subsidiaries'. Also added the same copyright notice header for all
wilc1000 driver source and header files.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agoRevert "staging: gasket: core: hold reference to pci_dev while used"
Todd Poynor [Fri, 3 Aug 2018 01:49:52 +0000 (18:49 -0700)]
Revert "staging: gasket: core: hold reference to pci_dev while used"

There's no need to take an additional reference on the pci_dev structure
for the pointer copy saved in gasket data structures.

This reverts commit:
8dd8a48b9a7d ("staging: gasket: core: hold reference to pci_dev while used")

Reported-by: Dmitry Torokhov <dtor@chromium.org>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: gasket: core: add subsystem and device info to logs
Todd Poynor [Fri, 3 Aug 2018 01:49:51 +0000 (18:49 -0700)]
staging: gasket: core: add subsystem and device info to logs

Identify gasket as the subsystem printing various messages.
Add the driver name to appropriate messages to indicate which driver
has a problem.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: gasket: core: device register debug log cleanups
Todd Poynor [Fri, 3 Aug 2018 01:49:50 +0000 (18:49 -0700)]
staging: gasket: core: device register debug log cleanups

At device/driver registration time, convert a not-very-informative
info message to a more informative debug message, drop some not overly
helpful debug messages.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: gasket: core: remove registration logs
Todd Poynor [Fri, 3 Aug 2018 01:49:49 +0000 (18:49 -0700)]
staging: gasket: core: remove registration logs

Remove logs for loading gasket drivers.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: wlan-ng: remove unused definitions from p80211types.h
Tim Collier [Fri, 3 Aug 2018 07:44:37 +0000 (08:44 +0100)]
staging: wlan-ng: remove unused definitions from p80211types.h

Remove the following unused definitions from p80211types.h:

* struct p80211enum
* struct p80211enumpair
* struct catlistitem declaration and associated function pointer
  typedefs (along with preceding block comment)

Signed-off-by: Tim Collier <osdevtc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: use phydm_regdefine11n.h from rtlwifi
Michael Straube [Sun, 5 Aug 2018 12:11:54 +0000 (14:11 +0200)]
staging: rtl8188eu: use phydm_regdefine11n.h from rtlwifi

Use rtlwifi/phydm/phydm_regdefine11n.h instead of odm_RegDefine11N.h
and remove the now unused odm_RegDefine11N.h.

The defines from odm_RegDefine11N.h are defined with the same values
in rtlwifi/phydm/phydm_regdefine11n.h.

There is one define that is named different, but that one is not
used in the rtl8188eu code.

rtl8188eu: #define ODM_REG_RX_PATH_11N 0xC04
rtlwifi: #defnie ODM_REG_BB_RX_PATH_11N 0xC04

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agoStaging: rtlwifi: base: Modified the line ending with a parenthesis
Sohil Ladhani [Sun, 5 Aug 2018 11:29:55 +0000 (16:59 +0530)]
Staging: rtlwifi: base: Modified the line ending with a parenthesis

This patch fixes the "Lines should not end with a '('" warning reported by
checkpatch.pl script. The line containing 'rtl_mrate_idx_to_arfr_id' function
previously ended with '(', which did not conform to the linux kernel
coding style.

Signed-off-by: Sohil Ladhani <supertakumi86@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: fsl-dpaa2/eth: Use named arguments in function definition
Ioana Radulescu [Thu, 2 Aug 2018 17:24:42 +0000 (12:24 -0500)]
staging: fsl-dpaa2/eth: Use named arguments in function definition

Checkpatch complains about unnamed arguments in a function
prototype, so fix it.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: wilc1000: fix compilation warning for ARCH PowerPC
Ajay Singh [Thu, 2 Aug 2018 11:27:02 +0000 (16:57 +0530)]
staging: wilc1000: fix compilation warning for ARCH PowerPC

Fix below warning reported for PowerPC arch compilation

include/uapi/linux/byteorder/big_endian.h:95:37: warning: passing
argument 1 of '__swab32s' makes pointer from integer without a cast
[-Wint-conversion]

Fixes: 02211edc9a1f ("staging: wilc1000: fix endianness warnings reported by sparse")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: erofs: disable compiling temporarile
Chao Yu [Thu, 2 Aug 2018 09:39:17 +0000 (17:39 +0800)]
staging: erofs: disable compiling temporarile

As Stephen Rothwell reported:

"After merging the staging tree, today's linux-next build (x86_64
allmodconfig) failed like this:

drivers/staging/erofs/super.c: In function 'erofs_read_super':
drivers/staging/erofs/super.c:343:17: error: 'MS_RDONLY' undeclared (first use in this function); did you mean 'IS_RDONLY'?
  sb->s_flags |= MS_RDONLY | MS_NOATIME;
                 ^~~~~~~~~
                 IS_RDONLY
drivers/staging/erofs/super.c:343:17: note: each undeclared identifier is reported only once for each function it appears in
drivers/staging/erofs/super.c:343:29: error: 'MS_NOATIME' undeclared (first use in this function); did you mean 'S_NOATIME'?
  sb->s_flags |= MS_RDONLY | MS_NOATIME;
                             ^~~~~~~~~~
                             S_NOATIME
drivers/staging/erofs/super.c: In function 'erofs_mount':
drivers/staging/erofs/super.c:501:10: warning: passing argument 5 of 'mount_bdev' makes integer from pointer without a cast [-Wint-conversion]
   &priv, erofs_fill_super);
          ^~~~~~~~~~~~~~~~
In file included from include/linux/buffer_head.h:12:0,
                 from drivers/staging/erofs/super.c:14:
include/linux/fs.h:2151:23: note: expected 'size_t {aka long unsigned int}' but argument is of type 'int (*)(struct super_block *, void *, int)'
 extern struct dentry *mount_bdev(struct file_system_type *fs_type,
                       ^~~~~~~~~~
drivers/staging/erofs/super.c:500:9: error: too few arguments to function 'mount_bdev'
  return mount_bdev(fs_type, flags, dev_name,
         ^~~~~~~~~~
In file included from include/linux/buffer_head.h:12:0,
                 from drivers/staging/erofs/super.c:14:
include/linux/fs.h:2151:23: note: declared here
 extern struct dentry *mount_bdev(struct file_system_type *fs_type,
                       ^~~~~~~~~~
drivers/staging/erofs/super.c: At top level:
drivers/staging/erofs/super.c:518:20: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
  .mount          = erofs_mount,
                    ^~~~~~~~~~~
drivers/staging/erofs/super.c:518:20: note: (near initialization for 'erofs_fs_type.mount')
drivers/staging/erofs/super.c: In function 'erofs_remount':
drivers/staging/erofs/super.c:630:12: error: 'MS_RDONLY' undeclared (first use in this function); did you mean 'IS_RDONLY'?
  *flags |= MS_RDONLY;
            ^~~~~~~~~
            IS_RDONLY
drivers/staging/erofs/super.c: At top level:
drivers/staging/erofs/super.c:640:16: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
  .remount_fs = erofs_remount,
                ^~~~~~~~~~~~~

Caused by various commits creating erofs in the staging tree interacting
with various commits redoing the mount infrastructure in the vfs tree.

I have disabed CONFIG_EROFS_FS for now:"

The reason of compiling error is:

Since -next collects and merges developing patches including common vfs
stuff from multi-trees, but those patches didn't cover erofs, such as:

('vfs: Suppress MS_* flag defs within the kernel unless explicitly enabled")
https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git/commit/?h=for-next&id=109b45090d7d3ce2797bb1ef7f70eead5bfe0ff3

("vfs: Require specification of size of mount data for internal mounts")
https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git/commit/?h=for-next&id=0a191e4505a4f255e6513b49426213da69bf0e80

Above vfs related patches has not been merged in staging tree, if we
submit those erofs patches to staging mailing list and after including
them in staging-{test,nexts} tree, it can easily cause compiling error.

We worked out some patches to adjust those vfs change, but now we just
submit them to -next tree temporarily to avoid compiling error.

For potentail conflict in between erofs and vfs changes in incoming
merge window, Stephen suggested that we can disable CONFIG_EROFS_FS
temporarily to pass merge window, and after that we can do restore by
reenabling CONFIG_EROFS_FS and applying those fixing patches. Also
Greg confirmed this solution.

So, let's disable compiling erofs for a while.

Suggested-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Reviewed-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: gasket: apex: enable power save mode by default
Todd Poynor [Thu, 2 Aug 2018 08:42:38 +0000 (01:42 -0700)]
staging: gasket: apex: enable power save mode by default

Set default value of allow_power_save parameter to enable power save
mode, which is expected to be the state usually desired.

Signed-off-by: Marty Faltesek <mfaltesek@google.com>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: gasket: apex: drop reset type param
Todd Poynor [Thu, 2 Aug 2018 08:42:44 +0000 (01:42 -0700)]
staging: gasket: apex: drop reset type param

Apex doesn't implement different types of resets based on the reset type
param passed through the gasket layer or from userspace via the
gasket_reset ioctl.  The reset type is dropped from the gasket framework
in a previous patch due to a lack of present need and non-conforming use
of this parameter by the framework.  Drop the parameter from the apex
driver as well.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: gasket: remove "reset type" param from framework
Todd Poynor [Thu, 2 Aug 2018 08:42:43 +0000 (01:42 -0700)]
staging: gasket: remove "reset type" param from framework

The "type of reset" parameter to the gasket device reset APIs isn't
required by the only gasket device submitted upstream, apex.

The framework documents the param as private to the device driver and a
pass-through at the gasket layer, but the gasket core calls the device
driver with a hardcoded reset type of zero, which is not documented as
having a predefined meaning.

In light of all this, remove the reset type parameter from the
framework.  Remove the reset ioctl reset type parameter, and bump the
framework version number to reflect the interface change.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Change clock comment - Style
John Whitmore [Tue, 31 Jul 2018 21:00:05 +0000 (22:00 +0100)]
staging:rtl8192u: Change clock comment - Style

A number of block comments have been changed to comply with the coding
standard. These are coding style changes which should have no impact
on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Rename IsACValid and add parenthesis - Style
John Whitmore [Tue, 31 Jul 2018 21:00:04 +0000 (22:00 +0100)]
staging:rtl8192u: Rename IsACValid and add parenthesis - Style

The macro IsACValid is renamed to resolve the checkpatch issue with
CamelCase naming. In addition the parameter has parenthesis added to
clear the checkpatch issue with precedence issues.

These changes are coding style changes and as such should have not
impact on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Remove unused UP2AC - Style
John Whitmore [Tue, 31 Jul 2018 21:00:03 +0000 (22:00 +0100)]
staging:rtl8192u: Remove unused UP2AC - Style

The macro UP2AC is commented out of the header file so the macro and its
associated comment are removed.

This is a coding style change which should have no impact on runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Rename octet_string members - Style
John Whitmore [Tue, 31 Jul 2018 21:00:02 +0000 (22:00 +0100)]
staging:rtl8192u: Rename octet_string members - Style

Rename the structure octet_string's member variables Octet to octet and
Length to length. This change clears the checkpatch issue with CamelCase
naming of variables.

This is purely a coding style change which should have no impact on
runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: rename OCTET_STRING - Style
John Whitmore [Tue, 31 Jul 2018 21:00:01 +0000 (22:00 +0100)]
staging:rtl8192u: rename OCTET_STRING - Style

Rename the structure OCTET_STRING to octet_string. This is to comply
with the coding style of using lowercase for types. In addition the
typedef directive is removed to clear the checkpatch issue with
defining new types.

These are coding style changes which should have no impact on runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Move QOS_TCLAS to rtl819x_TS.h - Style
John Whitmore [Tue, 31 Jul 2018 21:00:00 +0000 (22:00 +0100)]
staging:rtl8192u: Move QOS_TCLAS to rtl819x_TS.h - Style

Move the union QOS_TCLAS from the header file rtl819x_Qos.h to header
file rtl819x_TS.h, where the structure is actually used, as the member
of another structure.

This is a coding style change, which should have no impact on runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Remove commented out code - Style
John Whitmore [Tue, 31 Jul 2018 20:59:59 +0000 (21:59 +0100)]
staging:rtl8192u: Remove commented out code - Style

A number of structures have been commented out of code. Obviously they
are not used and as a result have been removed from the code.

This is a coding style change which should have no impact on runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Rename tspec_body members - Style
John Whitmore [Tue, 31 Jul 2018 20:59:58 +0000 (21:59 +0100)]
staging:rtl8192u: Rename tspec_body members - Style

The member variables of the tspec_body have been renamed to clear the
checkpatch issue with CamelCase naming. As these member variables are
never used in the code the changes are combined into this single
patch.

These changes are coding style changes which should have no impact on
runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Rename TSInfo - Style
John Whitmore [Tue, 31 Jul 2018 20:59:57 +0000 (21:59 +0100)]
staging:rtl8192u: Rename TSInfo - Style

Rename TSInfo, the memeber variable of struct tspec_body to ts_info.
This change clears the checkpatch issue with CamelCase naming.

This is a coding style change which should not impact runtime code
execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Refactor union TSPEC_BODY - Style
John Whitmore [Tue, 31 Jul 2018 20:59:56 +0000 (21:59 +0100)]
staging:rtl8192u: Refactor union TSPEC_BODY - Style

The union TSPEC_BODY is never used as a union. The union comprises an
array of bytes and a bitfield structure, both of which are 55 bytes in
length, but the byte array is never used. As a result the union has
been truncated to the bitfield struct, which is actually used.

Additionally the typedef has been removed from the structure to clear
the checkpatch issue with defining new types. Additionally the name has
been changed to lowercase to comply with coding style.

These changes are all coding style changes which should have no impact
on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Rename members of struct qos_tsinfo - Style
John Whitmore [Tue, 31 Jul 2018 20:59:55 +0000 (21:59 +0100)]
staging:rtl8192u: Rename members of struct qos_tsinfo - Style

The member variables of struct qos_tsinfo all cause checkpatch issues
with CamelCase naming. As the variables are used in so few places the
changes are combined into this single patch.

Additionally the member variable usReserved is never used in code so
has been removed.

These are all coding style changes which should have no impact on
runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Remove union from qos_tsinfo - Style
John Whitmore [Tue, 31 Jul 2018 20:59:54 +0000 (21:59 +0100)]
staging:rtl8192u: Remove union from qos_tsinfo - Style

The union is never used as a union but only as a bitfield struct.
One side of the union (u8 charData[3];) Only seems to be present to
ensure that the structures size is 3 bytes in length. That length, of
the structure is dictated by the largest element of the union, so the
byte array only dictates size if it's the largest element of the union.
The byte array and union add nothing.

The union has therefore been removed and the structure and access to
the structure simplified.

Additionally since one of the bitfield variables (ucAccessPolicy)
spans a byte boundary the base type of the bitfield has been changed
from u8 to u16. Compilers have probably moved on from having an issue
with this, call it OCD.

The changes are coding style in nature and should not impact runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Remove union from aci_aifsn - Style
John Whitmore [Tue, 31 Jul 2018 20:59:53 +0000 (21:59 +0100)]
staging:rtl8192u: Remove union from aci_aifsn - Style

The union aci_aifsn is not used as a union, but only as a struct.
The union seems to have been used to ensure that the size of the
structure was only a single byte. That size is set by the bitfield
structure, adding a union with an unused byte adds nothing.

The union has been removed. This is a coding style change and
should not impact runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Clean cmpk_counttxstatistic() comments - Style
John Whitmore [Tue, 31 Jul 2018 20:59:52 +0000 (21:59 +0100)]
staging:rtl8192u: Clean cmpk_counttxstatistic() comments - Style

The only useful piece of information in the header comment of this
static function was the name of the function and parameters. That
is not useful information, given that they are in the C Source of
the function declaration, a few lines below the comment. The block
comment has been removed.

This is a coding style change, there should be no impact on runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: rename odm_RTL8188E - style
Michael Straube [Tue, 31 Jul 2018 11:34:15 +0000 (13:34 +0200)]
staging: rtl8188eu: rename odm_RTL8188E - style

Rename source and header file to avoid CamelCase.
odm_RTL8188E.c -> odm_rtl8188e.c
odm_RTL8188E.h -> odm_rtl8188e.h

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: remove unused rtw_remove_bcn_ie()
Michael Straube [Tue, 31 Jul 2018 11:34:14 +0000 (13:34 +0200)]
staging: rtl8188eu: remove unused rtw_remove_bcn_ie()

The function rtw_remove_bcn_ie() is never used, so remove it.
Discovered by cppcheck.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: remove unused rtw_add_bcn_ie()
Michael Straube [Tue, 31 Jul 2018 11:34:13 +0000 (13:34 +0200)]
staging: rtl8188eu: remove unused rtw_add_bcn_ie()

The function rtw_add_bcn_ie() is never used, so remove it.
Discovered by cppcheck.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: remove unnecessary parentheses - style
Michael Straube [Tue, 31 Jul 2018 11:34:12 +0000 (13:34 +0200)]
staging: rtl8188eu: remove unnecessary parentheses - style

Remove unnecessary parentheses to improve readability.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: fix comparsions to NULL - style
Michael Straube [Tue, 31 Jul 2018 11:34:11 +0000 (13:34 +0200)]
staging: rtl8188eu: fix comparsions to NULL - style

Use x instead of x != NULL.
Use !x instead of x == NULL.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: fix indentation - style
Michael Straube [Tue, 31 Jul 2018 11:34:10 +0000 (13:34 +0200)]
staging: rtl8188eu: fix indentation - style

Fix indentation to clear checkpatch warnings.
WARNING: suspect code indent for conditional statements

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: use is_broadcast_ether_addr
Michael Straube [Tue, 31 Jul 2018 11:34:09 +0000 (13:34 +0200)]
staging: rtl8188eu: use is_broadcast_ether_addr

Use is_broadcast_ether_addr instead of checking each byte of the
address array for 0xff. Shortens the code and improves readability.

As required by is_broadcast_ether_addr, the address array sta_addr
is properly aligned in all uses. Thanks to Joe Perches.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: use is_multicast_ether_addr
Michael Straube [Wed, 1 Aug 2018 19:10:50 +0000 (21:10 +0200)]
staging: rtl8188eu: use is_multicast_ether_addr

Use is_multicast_ether_addr instead of custom IS_MCAST.
The variable for the result of IS_MCAST was only used in the
if conditional. So remove the extra variable and move the call
to is_multicast_ether_addr into the conditional.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: fsl-dpaa2/eth: Merge header files
Ioana Radulescu [Wed, 1 Aug 2018 16:09:51 +0000 (11:09 -0500)]
staging: fsl-dpaa2/eth: Merge header files

File net.h contains definitions that are exclusively used by
the key generator/classification API. Merge its contents with
dpkg.h in order to reduce the number of private headers.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: fsl-dpaa2/eth: Use BIT() macro
Ioana Radulescu [Wed, 1 Aug 2018 16:09:50 +0000 (11:09 -0500)]
staging: fsl-dpaa2/eth: Use BIT() macro

File net.h has several bitmask defines that could be implemented
more clearly using the BIT() macro.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: fsl-dpaa2/eth: Remove dead code
Ioana Radulescu [Wed, 1 Aug 2018 16:09:49 +0000 (11:09 -0500)]
staging: fsl-dpaa2/eth: Remove dead code

File net.h contains unused defines, so remove them.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: fsl-dpaa2/eth: Cleanup comments
Ioana Radulescu [Wed, 1 Aug 2018 16:09:48 +0000 (11:09 -0500)]
staging: fsl-dpaa2/eth: Cleanup comments

Comments in file net.h are too fancy for their own good,
so convert them to the regular format.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: fsl-dpaa2/eth: add SPDX license identifiers
Ioana Ciornei [Tue, 31 Jul 2018 17:02:47 +0000 (12:02 -0500)]
staging: fsl-dpaa2/eth: add SPDX license identifiers

The DPAA2 Ethernet driver files use a GPL-2.0+ OR BSD-3-Clause
license. Add SPDX tags and delete the full license text,
keeping the existing licenses for each file.
Add a GPL-2.0 tag for the Makefile.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: fsl-dpaa2/eth: convert documentation to .rst format
Ioana Ciornei [Tue, 31 Jul 2018 17:02:46 +0000 (12:02 -0500)]
staging: fsl-dpaa2/eth: convert documentation to .rst format

Convert the DPAA2 Ethernet driver documentation to .rst format
and rename the file accordingly.
Also add a SPDX tag to the new rst file.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: wilc1000: fix endianness warnings reported by sparse
Ajay Singh [Wed, 1 Aug 2018 11:11:00 +0000 (16:41 +0530)]
staging: wilc1000: fix endianness warnings reported by sparse

This patch fixes the sparse warnings by making use of le32_to_cpus() &
cpu_to_le32s() conversion API's.
Remove the unnecessary byte-order conversion in
wilc_wlan_parse_response_frame() as the data is copied using individual
byte operation.

Also added the byte-order conversion for 'header' in
wilc_wfi_monitor_rx() & wilc_wfi_p2p_rx() as received in LE byte-order.

The link [1] contains the details of discussion related to this patch.

[1]. https://patchwork.kernel.org/patch/10436791/

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: wilc1000: use 'u16' data type for config id parameter
Ajay Singh [Wed, 1 Aug 2018 11:10:59 +0000 (16:40 +0530)]
staging: wilc1000: use 'u16' data type for config id parameter

Cleanup patch to use the correct data type 'u16' for keeping the WID
value in 'wilc_cfg_word' & 'wilc_cfg_str' structure.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: wilc1000: refactor wilc_wlan_handle_isr_ext to avoid goto statement
Ajay Singh [Wed, 1 Aug 2018 05:03:41 +0000 (10:33 +0530)]
staging: wilc1000: refactor wilc_wlan_handle_isr_ext to avoid goto statement

Refactor wilc_wlan_handle_isr_ext() to avoid the use of the goto label.
Also avoid the unnecessary NULL check for 'wilc->rx_buffer' and
calling wilc_wlan_handle_rxq() only after wilc_wlan_rxq_add() call.
The link [1] contains details for discussion related to this changes.

[1]. https://patchwork.kernel.org/patch/10533601/

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: wilc1000: rename 'rcvd_ch_cnt' element in 'user_scan_req' struct
Ajay Singh [Sun, 29 Jul 2018 06:06:55 +0000 (11:36 +0530)]
staging: wilc1000: rename 'rcvd_ch_cnt' element in 'user_scan_req' struct

Cleanup patch to use shorter name for 'rcvd_ch_cnt' to 'ch_cnt' to avoid
line over 80 character issue reported by checkpatch.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: wilc1000: added comments for 'hif_cs' mutex lock
Ajay Singh [Sun, 29 Jul 2018 06:06:54 +0000 (11:36 +0530)]
staging: wilc1000: added comments for 'hif_cs' mutex lock

Added comments for 'hif_cs' mutex to avoid checkpatch.pl reported
issues.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: wilc1000: modified debug log messages description
Ajay Singh [Sun, 29 Jul 2018 06:06:53 +0000 (11:36 +0530)]
staging: wilc1000: modified debug log messages description

Cleanup patch to update the debug logs message to provide correct
information. Also added the function name tag for same description log
to help identify the place from where log was captured.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: wilc1000: remove unnecessary comments and comments description
Ajay Singh [Sun, 29 Jul 2018 06:06:51 +0000 (11:36 +0530)]
staging: wilc1000: remove unnecessary comments and comments description

Cleanup patch to remove the unnecessary comments and commented code.
Also updated description for few of comments.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: wilc1000: fix TODO to compile spi and sdio components in single module
Ajay Singh [Sun, 29 Jul 2018 06:06:50 +0000 (11:36 +0530)]
staging: wilc1000: fix TODO to compile spi and sdio components in single module

Changes to compile module component along with SPI and SDIO module.
Previously 'wilc1000.ko' used to generate along with wilc-spi.ko or
wilc1000-sdio.ko module. After these changes only wilc1000-spi.ko or
wilc1000-sdio.ko modules are required for SPI and SDIO respectively.
These changes are done to address below TODO item.

- make SPI and SDIO components coexist in one build

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vboxvideo: Add page-flip support
Steve Longerbeam [Fri, 20 Jul 2018 17:17:31 +0000 (10:17 -0700)]
staging: vboxvideo: Add page-flip support

Adds crtc page-flip support by passing the new requested framebuffer
to vbox_crtc_do_set_base().

Note there is no attempt to support vblank interrupts, it's not
not known how to do this in VBOX or if it is even possible. Since
this page-flip implementation does not try to sync the page-flip
to vertical blanking, tearing effects are possible.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vboxvideo: Pass a new framebuffer to vbox_crtc_do_set_base
Steve Longerbeam [Fri, 20 Jul 2018 17:17:30 +0000 (10:17 -0700)]
staging: vboxvideo: Pass a new framebuffer to vbox_crtc_do_set_base

This modifies vbox_crtc_do_set_base() to take a new framebuffer to
be activated, instead of the existing framebuffer attached to the crtc.
This change allows the function to be given the new framebuffer from
a page-flip request.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: gasket: sysfs: fix potential null dereference
Ivan Bornyakov [Wed, 1 Aug 2018 18:37:44 +0000 (21:37 +0300)]
staging: gasket: sysfs: fix potential null dereference

Add handling of possible allocation failure.

Reported by smatch:

  drivers/staging/gasket/gasket_sysfs.c:105 put_mapping() error: potential null dereference 'files_to_remove'. (kcalloc returns null)

Signed-off-by: Ivan Bornyakov <brnkv.i1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agoMerge tag 'iio-for-4.19c' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23...
Greg Kroah-Hartman [Thu, 2 Aug 2018 06:07:54 +0000 (08:07 +0200)]
Merge tag 'iio-for-4.19c' of git://git./linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

Third set of IIO new device support, cleanups and features for the 4.19 cycle.

This is a somewhat sneaky late pull request given Linus has announced
a likely 1 week delay.  If it is too late I'll resend after the merge
window.  I merged in the fixes branch as those are primarily around
things queued for the merge window.

Particulary good to see the output of our Himanshu Jha, a GSOC student
who developed the bme680 driver.

New device support:
* bme680 gas sensor (with temperature, humidity and pressure)
  - new driver to support this device
* vcn4000
  - support vcnl4200 (lots of rework to allow this)
  - ids added for VCNL4010 and VCNL4020 sensors

New features:
* ad9523
  - support the various external signal options via gpios.

Cleanups and fixes
* ad_sigma_delta
  - unsigned long for a timeout.
* ad9523
  - fix a wrong return value that was indicating successful write failed
    and might lead to an infinite loop.
* si1133
  - fix an impossible test.
  - fix an uninitialsed variable by reading from the device in all paths.
* xilinx xadc
  - check for return values in clk related functions
  - limit the pcap clock frequency to supported ranges.
  - stash the irq to avoid calling platform_get_irq from the remove path.
  - ensure the irq is actually requested before we enable the hardware to
    output it.

5 years agostaging: gasket: page table: fix header file include guard symbol
Todd Poynor [Tue, 31 Jul 2018 20:24:48 +0000 (13:24 -0700)]
staging: gasket: page table: fix header file include guard symbol

The include guard symbol for gasket_page_table.h is out-of-date.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agoRevert "staging: gasket: page table: hold references to device and pci_dev"
Todd Poynor [Tue, 31 Jul 2018 20:24:47 +0000 (13:24 -0700)]
Revert "staging: gasket: page table: hold references to device and pci_dev"

gasket_free_dev() is called only from driver PCI probe and remove
function. It is guaranteed that that pci_dev structure is not going
anywhere during that time; there is no need to take this additional
reference.

This reverts commit dd9d1502feea3c23d412f289aad79e1d4e86d45d.

Reported-by: Dmitry Torokhov <dtor@chromium.org>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: gasket: core: use bool type for ns_capable result
Todd Poynor [Tue, 31 Jul 2018 20:24:46 +0000 (13:24 -0700)]
staging: gasket: core: use bool type for ns_capable result

When gasket core was converted from using capable() to use ns_capable()
instead, the type of the variable holding the result should have been
converted from int to bool.

Reported-by: Dmitry Torokhov <dtor@chromium.org>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: gasket: apex: move driver-private defines out of apex.h
Todd Poynor [Tue, 31 Jul 2018 20:24:45 +0000 (13:24 -0700)]
staging: gasket: apex: move driver-private defines out of apex.h

apex.h is supposed to contain kernel-userspace interface definitions,
but has a number of defines that are only used by apex_driver.c or are
not used at all.  Move driver implementation defines not shared with
userspace to the driver source.  Remove unused defines.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: gasket: TODO: remove entry for multi-line alignment style
Todd Poynor [Tue, 31 Jul 2018 20:24:44 +0000 (13:24 -0700)]
staging: gasket: TODO: remove entry for multi-line alignment style

Multi-line alignment formatting issues fixed, remove the TODO entry for
this.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: gasket: interrupt: fix function param line continuation style
Todd Poynor [Tue, 31 Jul 2018 20:24:43 +0000 (13:24 -0700)]
staging: gasket: interrupt: fix function param line continuation style

Fix multi-line alignment formatting to look like:
      int ret = long_function_name(device, VARIABLE1, VARIABLE2,
                                   VARIABLE3, VARIABLE4);

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: gasket: sysfs: fix function param line continuation style
Todd Poynor [Tue, 31 Jul 2018 20:24:42 +0000 (13:24 -0700)]
staging: gasket: sysfs: fix function param line continuation style

Fix multi-line alignment formatting to look like:
      int ret = long_function_name(device, VARIABLE1, VARIABLE2,
                                   VARIABLE3, VARIABLE4);

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: gasket: page table: fix function param line continuation style
Todd Poynor [Tue, 31 Jul 2018 20:24:41 +0000 (13:24 -0700)]
staging: gasket: page table: fix function param line continuation style

Fix multi-line alignment formatting to look like:
      int ret = long_function_name(device, VARIABLE1, VARIABLE2,
                                   VARIABLE3, VARIABLE4);

Many of these TODO items were previously cleaned up during the conversion
to standard logging functions.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: gasket: ioctl: fix function param line continuation style
Todd Poynor [Tue, 31 Jul 2018 20:24:40 +0000 (13:24 -0700)]
staging: gasket: ioctl: fix function param line continuation style

Fix multi-line alignment formatting to look like:
      int ret = long_function_name(device, VARIABLE1, VARIABLE2,
                                   VARIABLE3, VARIABLE4);

Many of these TODO items were previously cleaned up during the conversion
to standard logging functions.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: gasket: core: fix function param line continuation style
Todd Poynor [Tue, 31 Jul 2018 20:24:39 +0000 (13:24 -0700)]
staging: gasket: core: fix function param line continuation style

Fix multi-line alignment formatting to look like:
      int ret = long_function_name(device, VARIABLE1, VARIABLE2,
                                   VARIABLE3, VARIABLE4);

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: gasket: TODO: remove entry for static function declarations
Todd Poynor [Tue, 31 Jul 2018 20:24:38 +0000 (13:24 -0700)]
staging: gasket: TODO: remove entry for static function declarations

The static function declarations are removed, remove the TODO file entry
for this.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: gasket: pg tbl: remove static function forward declarations
Todd Poynor [Tue, 31 Jul 2018 20:24:37 +0000 (13:24 -0700)]
staging: gasket: pg tbl: remove static function forward declarations

Remove forward declarations of static functions, move code to avoid
forward references, for kernel style.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: gasket: interrupt: remove static function forward declarations
Todd Poynor [Tue, 31 Jul 2018 20:24:36 +0000 (13:24 -0700)]
staging: gasket: interrupt: remove static function forward declarations

Remove forward declarations of static functions, move code to avoid
forward references, for kernel style.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: gasket: ioctl: remove static function forward declarations
Todd Poynor [Tue, 31 Jul 2018 20:24:35 +0000 (13:24 -0700)]
staging: gasket: ioctl: remove static function forward declarations

Remove forward declarations of static functions, move code to avoid
forward references, for kernel style.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: gasket: core: remove static function forward declarations
Todd Poynor [Tue, 31 Jul 2018 20:24:34 +0000 (13:24 -0700)]
staging: gasket: core: remove static function forward declarations

Remove forward declarations of static functions, move code to avoid
forward references, for kernel style.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agoiio: light: si1133: fix uninitialized resp variable
Maxime Roussin-Bélanger [Tue, 31 Jul 2018 20:13:21 +0000 (16:13 -0400)]
iio: light: si1133: fix uninitialized resp variable

Read response register to detect any error.

Signed-off-by: Maxime Roussin-Bélanger <maxime.roussinbelanger@gmail.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agodrivers/staging/mt7621-eth: Use dma_zalloc_coherent to replace dma_alloc_coherent...
zhong jiang [Wed, 1 Aug 2018 14:10:15 +0000 (22:10 +0800)]
drivers/staging/mt7621-eth: Use dma_zalloc_coherent to replace dma_alloc_coherent+memset

we prefer to use dma_zalloc_coherent rather than dam_alloc_coherent+memset

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agoMerge branch 'fixes-togreg' into togreg
Jonathan Cameron [Wed, 1 Aug 2018 17:56:17 +0000 (18:56 +0100)]
Merge branch 'fixes-togreg' into togreg

5 years agostaging: comedi: drop serial2002 driver
Greg Kroah-Hartman [Wed, 1 Aug 2018 17:56:17 +0000 (19:56 +0200)]
staging: comedi: drop serial2002 driver

There's not been any work on this driver since it was originally merged,
and it really needs to be rewritten to use the serdev layer instead if
people really need/want it.

Reported-by: Christoph Hellwig <hch@lst.de>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: erofs: remove a redundant marco in xattr
Gao Xiang [Wed, 1 Aug 2018 06:38:31 +0000 (14:38 +0800)]
staging: erofs: remove a redundant marco in xattr

There is no need to '#if CONFIG_EROFS_FS_XATTR' in xattr.c,
let's remove it.

Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: erofs: add the missing break in z_erofs_map_blocks_iter
Gao Xiang [Wed, 1 Aug 2018 09:36:54 +0000 (17:36 +0800)]
staging: erofs: add the missing break in z_erofs_map_blocks_iter

This patch adds a missing break after adding the default case.

Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agoiio: light: si1133 fix test for val being not zero or not one.
Colin Ian King [Mon, 30 Jul 2018 12:59:18 +0000 (13:59 +0100)]
iio: light: si1133 fix test for val being not zero or not one.

The current check on val always results in true and so the
call to sii1133_update_adcsens never gets called. Fix this check
so it returns with -EINVAL only when val is not zero and not one.

Detected by CoverityScan, CID#1472099 ("Logically dead code")

Fixes: e01e7eaf37d8 ("iio: light: introduce si1133")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agostaging:rtl8192u: Refactor enum DM_CCK_Rx_Path_Method - Style
John Whitmore [Sun, 29 Jul 2018 21:07:47 +0000 (22:07 +0100)]
staging:rtl8192u: Refactor enum DM_CCK_Rx_Path_Method - Style

The enumerated type DM_CCK_Rx_Path_Method is used as a container for
constant definitions, rather then an enumerated type enabling compiler
type checking. To correct this, the variable which uses the constants,
defined by the enumeration, has had its type changed from a u8 to the
enumeration.

Additionally the type has been moved above the structure where the type
is used, to avoid compiler error. The typedef has been removed from the
enumerated type to clear the checkpatch issue with defining new types.
The name of the type has been changed to cck_rx_path_method to clear
the checkpatch issue with CamelCase naming. And the enumerated constant
CCK_Rx_Version_MAX has been removed, since it is never used in code.

The changes are all coding style in nature and so should have no
impact on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>