Gao Xiang [Tue, 21 Aug 2018 14:49:30 +0000 (22:49 +0800)]
staging: erofs: separate erofs_get_meta_page
This patch separates 'erofs_get_meta_page' into 'erofs_get_meta_page'
and 'erofs_get_meta_page_nofail'. The second one ensures that it
should not fail under memory pressure and should make best efforts
if IO errors occur.
It also adds auxiliary variables in order to fulfill 80 character limit.
Pass the gasket driver descriptor to the interrupt init function, rather
than exploding out separate parameters from various fields of that
structure. This allows us to make more localized changes to the types
of interrupts supported (MSIX vs. wire, etc.) without affecting the
calling sequence, and seems nicer for simplification purposes.
Split interrupt handler into PCI MSIX-specific and generic functions,
for adding non-MSIX handlers in the future. Move MSIX init code
together,, out of generic init path.
Some explicit memory barriers in the page table code are not necessary,
either because:
(a) The barrier follows a non-relaxed MMIO access that already performs
a read or write memory barrier.
(b) The barrier follows DMA API calls for which the device-visible
effects of IOMMU programming are guaranteed to be flushed to the IOMMU
prior to the call returning, and doesn't need to sync with normal memory
access.
Todd Poynor [Fri, 10 Aug 2018 03:21:04 +0000 (20:21 -0700)]
staging: gasket: core: switch to relaxed memory-mapped I/O
Use of readl() is deprecated; readl_relaxed() with appropriate memory
barriers is preferred. Switch to relaxed reads and writes for better
performance as well. Memory barriers required for I/O vs. normal
memory access on Apex devices have already been explicitly coded in the
page table routines.
Todd Poynor [Fri, 10 Aug 2018 03:20:59 +0000 (20:20 -0700)]
staging: gasket: core: remove kobj_name param from gasket_alloc_dev
gasket_alloc_dev can retrieve the device name from the parent parameter,
a separate parameter isn't needed for this. Rename the variable to
better reflect its meaning, as the name of the parent device for which a
gasket device is being allocated.
Todd Poynor [Fri, 10 Aug 2018 03:20:57 +0000 (20:20 -0700)]
staging: gasket: core: remove debug log that could crash
A debug log in gasket_alloc_dev() is issued regardless of whether the
device pointer used returned success or error. The log isn't that
useful anyway, remove it.
staging: mt7621-pci: show N_FTS status using a loop
There are some printk's which can be replaced properly
using dev_* kernel functions. Use dev_info to show
N_FTS status for each port using a loop instead of duplicating
lines of code.
John Whitmore [Sun, 26 Aug 2018 22:45:33 +0000 (23:45 +0100)]
staging:rtl8192u: Add SPDX-License-Identifier tag - Style
Add the missing SPDX-License-Identifier tag to clear the checkpatch
issue. 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>
Rename the function phy_RF8256_Config_ParaFile() to
phy_rf8256_config_para_file(). This change clears the checkpatch issue
with CamelCase naming.
Additionally as the function is only ever used in one file,
(r8190_rtl8256.c), the function prototype has been removed from the
header file, (r8190_rtl8256.h).
These changes are purely coding style in nature 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>
Rename the function PHY_SetRF8256Bandwidth() to
phy_set_rf8256_bandwidth(). This change clears the checkpatch issue
with CamelCase naming.
The parameter Bandwidth has been renamed to bandwidth, for the
same reason.
Additionally a new line has been added to the parameter list of the
function declaration in r8190_rtl8256.h to truncate the line length
to the checkpatch limit.
These changes are simple 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>
Rename the type to baseband_config_type to clear the checkpatch issue
with CamelCase naming. Remove the 'typedef' directive to clear the
issue with defining new types.
As it is only used in the file r819xU_phy.c the type has been moved
to the r819xU_phy.h file.
The enumerated type is only used as a parameter to the function
rtl8192_phyConfigBB. Previously that parameter used type 'u8' so no
compiler typechecking was being performed. The parameter type has been
corrected.
These changes are coding style changes and as such 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 [Sun, 26 Aug 2018 21:14:21 +0000 (22:14 +0100)]
staging:rtl8192u: Make function rtl8192_phyConfigBB static
The function rtl8192_phyConfigBB is only used in the file in which it
is defined so can be declared static. Additionally the prototype has
been removed from the header file, as it is not used.
Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John Whitmore [Sun, 26 Aug 2018 21:14:20 +0000 (22:14 +0100)]
staging:rtl8192u: Refactor RT_RF_TYPE_DEF - Style
Rename the enumerated type RT_RF_TYPE_DEF to rt_rf_type to comply
with the coding standard, lower case type names. Removed the 'def'
postscript which provides no additional information.
The 'typedef' directive has been removed to clear the checkpatch issue
with defining new types.
The type has been moved to the file r8192U.h, where it is
actually used by the member variable 'rf_type'. Previously the member
variable used a 'u8' type so no compiler type checking is being
performed. The type has been changed to the correct type.
Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rename enumerated type VERSION_819xU to version_819xu to clear
checkpatch issue with CamelCase naming. Additionally the constants
defined by the type are renamed for the same reason.
Remove the 'typedef' directive to clear the checkpatch issue with
defining new types.
The enumerated type has been moved to the file where the type is
actually used, r8192U.h
Additionally the memeber variable, which uses the type
(card_8192_version), has been changed to use the type to enable
compiler typechecking.
These are coding style changes 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 [Tue, 21 Aug 2018 17:15:29 +0000 (18:15 +0100)]
staging:rtl8192u: Refactor union delba_param_set - Style
remove member 'charData' from the union delba_param_set, as it is not
used in code. The remaining member variables have all been renamed to
clear the checkpatch issue with CamelCase naming.
shortData to short_data
Reserved to reserved
Initiator to initiator
TID to tid
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>
John Whitmore [Tue, 21 Aug 2018 17:15:25 +0000 (18:15 +0100)]
staging:rtl8192u: Refactor BA_PARAM_SET - Style
Refactor the union BA_PARAM_SET, firstly removing the 'typedef', this
clears the checkpatch issue with defining new types. Secondly the union
is renamed to lowercase 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>
The structure HT_CAPABILITY_ELE causes a number of checkpatch / coding
style issues. The structure uses a 'typedef' directive causing an
issue regarding defining new types in the code. The name of the
structure should be lowercase, and the '__packed' directive is prefered
over the attribute directive.
The typedef has been removed, structure renamed to ht_capability_ele
and the '__packed' directive used.
These are coding style changes and should not 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, 17 Aug 2018 18:34:46 +0000 (19:34 +0100)]
staging:rtl8192u: Remove enum CHNLOP - Style
The enumerated type CHNLOP is only used as a member variable of the
structure RT_HIGH_THROUGHPUT. Whilst this member variable is initialised
it is never actually used in the code. To simplify the code both the
enumerated type and the member variable have been 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>
John Whitmore [Fri, 17 Aug 2018 18:34:45 +0000 (19:34 +0100)]
staging:rtl8192u: Removed commented out structure - Style
Two unions HT_CAPABILITY and HT_CAPABILITY_MACPARA have previously been
commented out of code. Since they are obviously not used in code and
the commented out unions add nothing to the code they have been 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>
John Whitmore [Fri, 17 Aug 2018 18:34:39 +0000 (19:34 +0100)]
staging:rtl8192u: Rename sHTCLng - Style
The constant sHTCLng causes a checkpatch issue, due to its use of
CamelCase naming. To correct the issue the constant has been renamed
to HTCLNG.
I'm not sure this is a good name as it communicates very little and
contradicts the block comment above its definition. MCS_LEN might
be a better name if the block comment is correct.
Additionally the block comment has been changed to the recommended
style.
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, 17 Aug 2018 18:34:38 +0000 (19:34 +0100)]
staging:rtl8192u: Replace magic number with defined constant - Style
The defined constant MIMO_PS_STATIC is used for this test for zero
elsewhere in code so the magic number '0' has been replaced with that
comment, which was actually explicitly mentioned in the comment.
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>
John Whitmore [Wed, 8 Aug 2018 21:00:36 +0000 (22:00 +0100)]
staging:rtl8192u: Rename ToLegalChannel - Style
Rename the function ToLegalChannel, which causes a checkpatch issue due
to its use of CamelCase naming. The function has been renamed to
to_legal_channel.
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 [Wed, 8 Aug 2018 21:00:33 +0000 (22:00 +0100)]
staging:rtl8192u: Rename Channel - Style
The function dot11d_get_max_tx_pwr_in_dbm() uses a parameter name,
Channel, which causes a checkpatch issue with CamelCase naming. The
parameter has been renamed to channel.
The change 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 function DOT11D_GetMaxTxPwrInDbm causes a checkpatch issue due to
its use of CamelCase naming. The function has been renamed to
dot11d_get_max_tx_pwr_in_dbm.
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 function Dot11d_UpdateCountryIe causes a checkpatch issue due to
its use of CamelCase naming, the function has been renamed to
dot11d_update_country_ie.
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 [Wed, 8 Aug 2018 21:00:27 +0000 (22:00 +0100)]
staging:rtl8192u: Lines should not end with a '(' - Style
A number of function prototypes cause a checkpatch issue - "Lines
should not end with a '(' ". This issue has been cleared by moving
function prototype parameters to the same line as the function name.
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>
Multiple macros, defined in dot11d.h, use the variable __pIeeeDev as a
parameter. This name causes a checkpatch issue due to its use of
CamelCase naming. The parameter name has been changed to ieee_dev to
clear this issue.
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 [Wed, 8 Aug 2018 21:00:24 +0000 (22:00 +0100)]
staging:rtl8192u: Replace magic number 6 with ETH_ALEN - Style
The array size 6 represents the length of an Ethernet address so the
magic number has been replaced with the defined constant representing
that length.
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>