Ian Abbott [Mon, 6 Aug 2018 10:05:13 +0000 (11:05 +0100)]
staging: comedi: ni_mio_common: fix subdevice flags for PFI subdevice
The PFI subdevice flags indicate that the subdevice is readable and
writeable, but that is only true for the supported "M-series" boards,
not the older "E-series" boards. Only set the SDF_READABLE and
SDF_WRITABLE subdevice flags for the M-series boards. These two flags
are mainly for informational purposes.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: mt7621-pci: remove RALINK_PCI_BASE from remaining definitions
RALINK_PCI_BASE has no sense and this driver has base address readed
and mapped from device tree. Remove remaining uses of it and
change code to use pcie_read and pcie_write functions in places
where this was being used.
staging: mt7621-pci: use pcie_[read|write] in RALINK_PCI_PCICFG_ADDR and RALINK_PCI_PCIMSK_ADDR
RALINK_PCI_PCICFG_ADDR and RALINK_PCI_PCIMSK_ADDR are defined to be directly
referenced for read and write. Use pcie_read and pcie_write instead changing
its definition to a simple relative offset to pcie base address.
staging: mt7621-pci: avoid register duplication per controller using pcie_[read|write]
Use pcie_[read|write] fucntions to read and write controller registers.
Define those only by offset and pass controller offset + register offset
relative to base address to functions.
staging: mt7621-pci: simplify write_config function
write_config function is always called with bus and func
being 0. Avoid those params and just use 0 inside the
function. Review parameter types changing for more proper
ones.
staging: mt7621-pci: simplify read_config function
read_config function is always called with bus and func
being 0. Avoid those params and just use 0 inside the
function. Return readed value instead pass a reference
parameter.
staging: mt7621-pci: remove dead code derived to not use custom reads and writes
Driver is using now pci subsystem generics reads and writes and requesting
bus resources without using legacy code functions. Because of this there is
a lot of dead code that can be removed.
staging: mt7621-pci: use generic kernel pci subsystem read and write
map_bus callback is called before every .read/.write operation.
Implement it and change custom read write operations for the
pci subsystem generics. Make the probe function to don't use
legacy stuff and request bus resources directly. Get pci register
base and ranges from device tree.
The driver is not using PCI_LEGACY code anymore and shall use the
PCI_DRIVERS_GENERIC option to correct compile it. Add also new
Kconfig file for this controller setting there its correct dependencies.
Michael Straube [Sun, 5 Aug 2018 20:43:06 +0000 (22:43 +0200)]
Revert "staging:r8188eu: Use lib80211 to encrypt (CCMP) tx frames"
On a Raven Ridge system with a r8188eu usb wifi device
commit 515ce733e86e ("staging:r8188eu: Use lib80211 to encrypt (CCMP) tx frames")
is causing two bugs and a warning in dmesg:
Todd Poynor [Sun, 5 Aug 2018 20:07:48 +0000 (13:07 -0700)]
staging: gasket: apex: place in low power reset until opened
The apex device is left out of reset mode at the end of device
probe/initialize processing. Add a call to enter reset at the end of
the sequence, triggering power gating and other low power features.
Todd Poynor [Sun, 5 Aug 2018 20:07:47 +0000 (13:07 -0700)]
staging: gasket: core: protect against races during unregister
Keep mutex held across the unregistration operation, until the
driver_desc field of the global table is removed, to prevent a
concurrent accessor from looking up the driver_desc while
gasket_unregister_device() is in the processing of removing it.
Todd Poynor [Sun, 5 Aug 2018 20:07:46 +0000 (13:07 -0700)]
staging: gasket: apex: move sysfs setup code to probe function
The gasket framework no longer provides callbacks to the device driver
for sysfs setup and teardown. Move the sysfs setup code to the device
probe function. Apex does not implement sysfs cleanup code.
Todd Poynor [Sun, 5 Aug 2018 20:07:45 +0000 (13:07 -0700)]
staging: gasket: core: remove sysfs setup and cleanup callbacks
Gasket device drivers now call into the gasket framework to initialize
and de-initialize, rather than the other way around. The calling code
can perform sysfs setup and cleanup actions without callbacks from the
framework. Remove the sysfs setup and cleanup callbacks.
Gasket device drivers are now in charge of the device add and remove
sequences; the framework callbacks for these are deleted. Move the
apex device add callback code to the probe function. Apex did not
implement the removal callback.
Todd Poynor [Sun, 5 Aug 2018 20:07:43 +0000 (13:07 -0700)]
staging: gasket: core: delete device add and remove callbacks
Gasket device drivers are now in charge of orchestrating the device add
and removal sequences, so the callbacks from the framework to the device
drivers for these events are no longer needed.
Todd Poynor [Sun, 5 Aug 2018 20:07:42 +0000 (13:07 -0700)]
staging: gasket: apex: enable/disable gasket device from apex
Gasket framework now places device drivers in charge of calling APIs to
enable and disable gasket device operations. Make the appropriate calls
from the apex driver.
Todd Poynor [Sun, 5 Aug 2018 20:07:41 +0000 (13:07 -0700)]
staging: gasket: core: let device driver enable/disable gasket device
Move gasket device enable/disable functions from internal calls to
external calls from the gasket device drivers. The device driver will
call these functions at appropriate times in its processing, placing
the device driver in control of this sequence and reducing the need for
callbacks from framework back to the device drivers during the
enable/disable sequences.
Todd Poynor [Sun, 5 Aug 2018 20:07:39 +0000 (13:07 -0700)]
staging: gasket: core: remove device enable and disable callbacks
Device enable/disable operations are moving from being initiated through
the gasket framework to being initiated by the gasket device driver.
The driver can perform any processing needed for these operations before
or after the calls into the framework. Neither of these callbacks are
implemented for the only gasket driver upstream today, apex.
Todd Poynor [Sun, 5 Aug 2018 20:07:37 +0000 (13:07 -0700)]
staging: gasket: apex: move PCI core calls to apex driver
Apex driver moves PCI core calls like probe, enable, and remove from
gasket to apex. Call new functions in gasket to register apex as a PCI
device to the gasket framework.
Todd Poynor [Sun, 5 Aug 2018 20:07:36 +0000 (13:07 -0700)]
staging: gasket: core: move core PCI calls to device drivers
Remove gasket wrapping of PCI probe, enable, disable, and remove
functions. Replace with calls to add and remove PCI gasket devices,
to be called by the gasket device drivers.
Todd Poynor [Sun, 5 Aug 2018 20:07:35 +0000 (13:07 -0700)]
staging: gasket: sysfs: clean up state if ENOMEM removing mapping
If kcalloc() returns NULL in put_mapping(), continue to clean up state,
including dropping the reference on the struct device and free attribute
memory.
John Whitmore [Sat, 4 Aug 2018 09:18:57 +0000 (10:18 +0100)]
staging:rtl8192u: Remove comments - Style
Removal of three comments. The comments in question do not add anything
to the understanding of the code, and if they are necessary it would
imply that the structure and its member variables are badly named.
This is a simple 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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.
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.
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.
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]
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.
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.
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.
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>