John Whitmore [Fri, 13 Jul 2018 11:23:02 +0000 (12:23 +0100)]
staging:rtl8192u: remove typedef from structure SwChnlCmd - Style
Checkpatch warns against creation of new types in code. This patch simply
removes the "typedef" declaration of the structure SwChnlCmd to clear this
issue. Simple coding style issue which should not impact runtime execution.
Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John Whitmore [Fri, 13 Jul 2018 11:23:01 +0000 (12:23 +0100)]
staging:rtl8192u: Remove typdef from enumeration RF90_RADIO_PATH_E - Style
Checkpatch warns about the creation of new types. This patch simply removes
the typedef from the enumeration RF90_RADIO_PATH_E to clear this checkpatch
warning. There should be no impact on run time code execution, as this is a
coding style issue only.
Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John Whitmore [Fri, 13 Jul 2018 11:23:00 +0000 (12:23 +0100)]
staging:rtl8192u: remove typdef from enumeration HW90_BLOCK_E - Style
Checkpatch warns about the creation of new types in code. This patch simply
removes the typedef from the enumeration HW90_BLOCK_E to clear this
warning. There should be no impact on run time code execution.
Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John Whitmore [Fri, 13 Jul 2018 11:22:59 +0000 (12:22 +0100)]
staging:rtl8192u: remove typedef of enumeration SwChnlCmdID - Style
To clear a checkpatch issue removed the typedef of the enumeration SwChnlCmdID
this should not impact runtime code as it's only a coding style change.
Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Thu, 12 Jul 2018 10:36:10 +0000 (12:36 +0200)]
staging: rtl8723bs: fix comparsions to true
Use if(x) instead of if(x == true).
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Thu, 12 Jul 2018 10:36:09 +0000 (12:36 +0200)]
staging: rtl8723bs: change return type to bool
Both rtw_is_cckrates_included() and rtw_is_cckratesonly_included()
return true or false. Change the return type from uint to bool.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Thu, 12 Jul 2018 10:36:08 +0000 (12:36 +0200)]
staging: rtl8723bs: refactor rtw_is_cckratesonly_included
Refactor rtw_is_cckratesonly_included() to improve readability and
slightly reduce object file size.
Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Thu, 12 Jul 2018 10:36:07 +0000 (12:36 +0200)]
staging: rtl8723bs: refactor rtw_is_cckrates_included()
Refactor rtw_is_cckrates_included() to improve readability and
slightly reduce object file size.
Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Thu, 12 Jul 2018 10:36:06 +0000 (12:36 +0200)]
staging: rtl8723bs: remove unused code
Remove commented rtw_is_cckrates_included() and
rtw_is_cckratesonly_included() from os_dep/ioctl_linux.c.
Both are defined in core/rtw_ieee80211.c.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John Whitmore [Wed, 11 Jul 2018 19:21:49 +0000 (20:21 +0100)]
staging:rtl8192u: Change struct r8192_priv member Rf_Mode from u8 > enum
The file r8192U.h defines the structure for holding private data for the
driver (typedef struct r8192_priv). This structure includes a member Rf_Mode
which is defined to be of type "u8".
Whilst the variable Rf_Mode is defined to be of type "u8" it is being assigned
enumerated values defined by the enumerated type "enum rf_op_type". Because of
the mismatch in types being used any advantage of using an enumerated type, to
have the compiler check assignments, is nullified.
This patch changes the type of the Rf_Mode member from a u8 to the enumerated
type "enum rf_op_type", so that the compiler can now check assignments.
This change of type would cause a problem if the structure was mapped from a
hardware device and the size and location of members was significant. I
believe that the structure to hold private data for the driver is allocated
from memory and populated with data in the function rtl8192_usb_probe() in the
file r8192U_core.c. As such the physical size of the member variable Rf_Mode
is not significant, so the change should have no impact on code execution, bar
the move from a u8 type to an int, (or whatever size compiler uses for enum).
Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John Whitmore [Wed, 11 Jul 2018 19:21:48 +0000 (20:21 +0100)]
staging:rtl8192u: remove typedef from struct rx_drvinfo_819x_usb
Removed the typedef from the struct rx_drvinfo_819x_usb to leave it as a
simple structure.
This clears the issue flagged by checkpatch, defining new types.
Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John Whitmore [Wed, 11 Jul 2018 19:21:47 +0000 (20:21 +0100)]
staging:rtl8192u: Remove struct rx_desc_819x_usb_aggr_subframe
Removal of structure rx_desc_819x_usb_aggr_subframe from local header file,
which is not used outside the header file.
Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John Whitmore [Wed, 11 Jul 2018 19:21:46 +0000 (20:21 +0100)]
staging:rtl8192u: typedef struct rx_desc_819x_usb remove typedef
Change structure rx_desc_819x_usb from being typedef to being a simple
structure, without the typedef.
Clears a checkpatch issue, definging new types in the code.
Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John Whitmore [Wed, 11 Jul 2018 19:21:45 +0000 (20:21 +0100)]
staging:rtl8192u: typedef struct tx_fwinfo_819x_usb remove typedef
Change structure tx_fwinfo_819x_usb from being typedef to being a simple
structure, without the typedef.
Clears the coding style issue flagged by checkpatch, (new type definitions)
Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John Whitmore [Wed, 11 Jul 2018 19:21:44 +0000 (20:21 +0100)]
staging:rtl8192u: typedef struct tx_desc_cmd_819x_usb remove typedef
Change structure tx_desc_cmd_819x_usb from being typedef to being a simple
structure, without the typedef.
checkpatch warns about defining new types in the code.
Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John Whitmore [Wed, 11 Jul 2018 19:21:42 +0000 (20:21 +0100)]
staging:rtl8192u: remove unused structure tx_desc_819x_usb_aggr_subframe
Structure tx_desc_819x_usb_aggr_subframe is defined in a local header file but
is not used outside of the header file. Removed from the code as a result.
Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John Whitmore [Wed, 11 Jul 2018 19:21:41 +0000 (20:21 +0100)]
staging:rtl8192u: trim multiple blank lines - Coding Style
Trim the extra blank lines from the code, to clear checkpatch messages.
Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John Whitmore [Wed, 11 Jul 2018 19:21:40 +0000 (20:21 +0100)]
staging:rtl8192u: typedef struct tx_desc_819x_usb > struct tx_desc_819x_usb
Change structure tx_desc_819x_usb from being typedef to being a simple
structure, without the typedef.
checkpatch warns about defining new types in code.
Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tuomas Tynkkynen [Thu, 12 Jul 2018 21:54:17 +0000 (00:54 +0300)]
staging: bcm2835-audio: Don't leak workqueue if open fails
Currently, if bcm2835_audio_open() fails partway, the allocated
workqueue is leaked. Avoid that.
While at it, propagate the return value of
bcm2835_audio_open_connection() on failure instead of returning -1.
Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tuomas Tynkkynen [Thu, 12 Jul 2018 21:54:16 +0000 (00:54 +0300)]
staging: bcm2835-audio: Check if workqueue allocation failed
Currently, if allocating a workqueue fails, the driver will probe
successfully but it will silently do nothing, which is rather silly.
So instead bail out with -ENOMEM in bcm2835_audio_open() if
alloc_workqueue() fails, and remove the now pointless checks for a NULL
workqueue.
While at it, get rid of the rather pointless one-line function
my_workqueue_init().
Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ioana Radulescu [Thu, 12 Jul 2018 17:12:29 +0000 (12:12 -0500)]
staging: fsl-dpaa2/eth: Remove unnecessary cast
There's no need to explicitly cast DPAA2_ETH_MFL to u16,
so remove it.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Thu, 12 Jul 2018 16:16:13 +0000 (18:16 +0200)]
staging: rtl8188eu: use strlcpy instead of strncpy
Use strlcpy instead of strncpy to avoid gcc 8 warning:
warning: '__builtin_strncpy' specified bound 16 equals destination size [-Wstringop-truncation]
The maximum length of the source string including terminating null is 5.
Hence it always fits in the destination buffer of length 16.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bjorn Helgaas [Thu, 12 Jul 2018 15:33:30 +0000 (10:33 -0500)]
staging: rtlwifi: Remove empty halmac_pcie_reg.h
halmac_pcie_reg.h is empty, so remove it and the only include of it.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kacper Kołodziej [Thu, 12 Jul 2018 08:11:39 +0000 (10:11 +0200)]
staging: rtl8188eu: break line longer than 80 cols
Break too long line to follow kernel coding style.
Signed-off-by: Kacper Kołodziej <kacper@kolodziej.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Felix Siegel [Thu, 12 Jul 2018 22:58:49 +0000 (00:58 +0200)]
staging: gasket: Use __func__ instead of hardcoded string - Style
Changed logging statements to use %s and __func__ instead of hard coding
the function name in a string.
Signed-off-by: Felix Siegel <felix.siegel@posteo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Felix Siegel [Thu, 12 Jul 2018 22:58:48 +0000 (00:58 +0200)]
staging: gasket: remove "function entered" log messages
Remove log messages that solely print the function's name
everytime it is called.
Signed-off-by: Felix Siegel <felix.siegel@posteo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Felix Siegel [Thu, 12 Jul 2018 19:27:14 +0000 (21:27 +0200)]
staging: gasket: fix multi line comments style
This patch fixes checkpatch.pl warnings:
WARNING: Block comments should align the * on each line
Signed-off-by: Felix Siegel <felix.siegel@posteo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Felix Siegel [Thu, 12 Jul 2018 19:27:13 +0000 (21:27 +0200)]
staging: gasket: Move open-curly brace to match kernel code style
Move open open-curly brace to the next line following function
definition to match the kernel's coding style
Signed-off-by: Felix Siegel <felix.siegel@posteo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Roman Kiryanov [Wed, 11 Jul 2018 23:37:48 +0000 (16:37 -0700)]
staging: goldfish: add a blank line into struct goldfish_audio
To separate data members and the comment for better readability.
Signed-off-by: Roman Kiryanov <rkir@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Roman Kiryanov [Wed, 11 Jul 2018 23:36:28 +0000 (16:36 -0700)]
staging: goldfish: fix whitespace in goldfish_audio
Linux kernel coding style: spaces are never used for
indentation.
Signed-off-by: Roman Kiryanov <rkir@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Roman Kiryanov [Wed, 11 Jul 2018 20:23:57 +0000 (13:23 -0700)]
staging: goldfish: Remove references to the retired driver from README
The goldfish nand driver was retired (not used).
Signed-off-by: Roman Kiryanov <rkir@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wei Yongjun [Wed, 11 Jul 2018 13:15:54 +0000 (13:15 +0000)]
staging: pi433: fix error return code in pi433_probe()
Fix to return a negative error code from the kthread_run() error
handling case instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Wed, 11 Jul 2018 11:39:12 +0000 (13:39 +0200)]
staging: gasket: remove TODO item about SPDX usage
Now that the files are all properly tagged with SPDX lines, and the
boilerplate license text is gone, remove the TODO item.
Cc: Rob Springer <rspringer@google.com>
Cc: John Joseph <jnjoseph@google.com>
Cc: Ben Chan <benchan@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Wed, 11 Jul 2018 11:39:11 +0000 (13:39 +0200)]
staging: gasket: remove redundant license information
Now that the SPDX tag is in all gasket files, that identifies the
license in a specific and legally-defined manner. So the extra GPL text
wording can be removed as it is no longer needed at all.
This is done on a quest to remove the 700+ different ways that files in
the kernel describe the GPL license text. And there's unneeded stuff
like the address (sometimes incorrect) for the FSF which is never
needed.
Cc: Rob Springer <rspringer@google.com>
Cc: John Joseph <jnjoseph@google.com>
Cc: Ben Chan <benchan@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Wed, 11 Jul 2018 11:39:10 +0000 (13:39 +0200)]
staging: gasket: add SPDX identifiers to all files.
It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.
Fix up the all of the staging gasket files to have a proper SPDX
identifier, based on the license text in the file itself. The SPDX
identifier is a legally binding shorthand, which can be used instead of
the full boiler plate text.
Cc: Rob Springer <rspringer@google.com>
Cc: John Joseph <jnjoseph@google.com>
Cc: Ben Chan <benchan@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Colin Ian King [Wed, 11 Jul 2018 11:47:28 +0000 (12:47 +0100)]
staging: vt6655: remove some redundant variables
Variables rx_sts, sq, frame and is_pspoll are being assigned but are
never used hence they are redundant and can be removed.
Cleans up clang warnings:
warning: variable 'sq' set but not used [-Wunused-but-set-variable]
warning: variable 'rx_sts' set but not used [-Wunused-but-set-variable]
warning: variable 'frame' set but not used [-Wunused-but-set-variable]
warning: variable 'is_pspoll' set but not used [-Wunused-but-set-variable]
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Wed, 11 Jul 2018 12:27:15 +0000 (14:27 +0200)]
staging: rtl8188eu: remove blank lines
Remove unrequired blank lines as reported by checkpatch.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Wed, 11 Jul 2018 12:27:14 +0000 (14:27 +0200)]
staging: rtl8188eu: fix lines over 80 characters
Fix lines over 80 characters by adding appropriate line breaks.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Wed, 11 Jul 2018 12:27:13 +0000 (14:27 +0200)]
staging: rtl8188eu: add spaces around '|'
Add spaces around '|' to follow kernel coding style.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Wed, 11 Jul 2018 11:23:30 +0000 (13:23 +0200)]
staging: rtl8723bs: simplify ratetbl_val_2wifirate()
Simplify ratetbl_val_2wifirate() by not using extra variable
for the return value.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Wed, 11 Jul 2018 11:23:29 +0000 (13:23 +0200)]
staging: rtl8723bs: fix comparsions to NULL
Fix comparsions to NULL to follow kernel coding style.
x == NULL -> !x
x != NULL -> x
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Wed, 11 Jul 2018 11:23:28 +0000 (13:23 +0200)]
staging: rtl8723bs: remove blank lines
Remove unrequired blank lines as reported by checkpatch.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Wed, 11 Jul 2018 11:23:27 +0000 (13:23 +0200)]
staging: rtl8723bs: fix lines over 80 characters
Fix lines over 80 characters by adding appropriate line breaks.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Wed, 11 Jul 2018 11:23:26 +0000 (13:23 +0200)]
staging: rtl8723bs: add spaces around '|'
Add spaces around '|' to follow kernel coding style.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Colin Ian King [Wed, 11 Jul 2018 11:26:07 +0000 (12:26 +0100)]
staging: speakup: remove redundant variable l
Variable l is being assigned but is never used hence it is redundant
and can be removed.
Cleans up clang warning:
warning: variable 'l' set but not used [-Wunused-but-set-variable
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Colin Ian King [Wed, 11 Jul 2018 11:35:23 +0000 (12:35 +0100)]
staging: sm750fb: remove redundant pointer 'output'
Pointer 'output' is being assigned but is never used hence it is redundant
and can be removed.
Cleans up clang warning:
warning: variable 'output' set but not used [-Wunused-but-set-variable]
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ivan Bornyakov [Wed, 11 Jul 2018 11:13:34 +0000 (14:13 +0300)]
staging: gasket: fix plain integer as NULL pointer warning
Trivial fix to remove sparse warnings:
drivers/staging/gasket/gasket_page_table.c:884:40: warning: Using plain integer as NULL pointer
drivers/staging/gasket/gasket_page_table.c:1743:57: warning: Using plain integer as NULL pointer
drivers/staging/gasket/gasket_page_table.c:1768:57: warning: Using plain integer as NULL pointer
Signed-off-by: Ivan Bornyakov <brnkv.i1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John Whitmore [Tue, 10 Jul 2018 15:05:23 +0000 (16:05 +0100)]
staging:rtl8192u: Correction of indentation issues - Coding Style
Simple changes to correct indentation issues.
Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John Whitmore [Tue, 10 Jul 2018 15:05:22 +0000 (16:05 +0100)]
staging:rtl8192u: Correct indentation of ieee80211_softmac_new_net()
Coding style change to correct the indentation of the function
ieee80211_softmac_new_net(). A large proportion of the function's if statements
were incorrectly indented.
Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John Whitmore [Tue, 10 Jul 2018 15:05:21 +0000 (16:05 +0100)]
staging:rtl8192u: Remove unnecessary parentheses - Coding Style
checkpatch.pl flags unnecessary parentheses, so removed from code.
Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John Whitmore [Tue, 10 Jul 2018 15:05:20 +0000 (16:05 +0100)]
staging:rtl8192u: Move trailing conditional statement to the following line
Coding standard requires that the conditional statement is not on the same
line as the 'if' or 'else' but on the following line. Statements moved
accordingly.
Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John Whitmore [Tue, 10 Jul 2018 15:05:19 +0000 (16:05 +0100)]
staging:rtl8192u: Remove prohibited spaces - Coding Style
Simple removal of spaces prohibited by the coding standard.
Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John Whitmore [Tue, 10 Jul 2018 15:05:18 +0000 (16:05 +0100)]
staging:rtl8192u: Correct spacing before and after parenthesis - Style
Corrected coding style issues aroung opening and closed parenthesis.
Spaces, or blank line, removed from after '(' or before ')'
Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John Whitmore [Tue, 10 Jul 2018 15:05:17 +0000 (16:05 +0100)]
staging:rtl8192u: Correct indentation and spacing for braces of code blocks
Simple style change to fix the indentaiton and spacing of the braces around
multiline code blocks.
Braces removed from code block with a single line.
Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John Whitmore [Tue, 10 Jul 2018 15:05:16 +0000 (16:05 +0100)]
staging:rtl8192u: Remove blank lines before '}' and after '{' characters
Coding style change to simply remove the unrequired blanks lines before a
closing brace or after an opening brace.
Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Colin Ian King [Wed, 11 Jul 2018 10:59:11 +0000 (11:59 +0100)]
staging: ks7010: remove redundant variable eth_proto
Variable eth_proto is being assigned but is never used hence it is
redundant and can be removed.
Cleans up clang warning:
warning: variable 'eth_proto' set but not used [-Wunused-but-set-variable]
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Colin Ian King [Wed, 11 Jul 2018 10:49:21 +0000 (11:49 +0100)]
staging: gdm724x: redundant variables idProduct and idVendor
Variable idProduct and idVendor are being assigned but are never used
hence they are redundant and can be removed.
Cleans up clang warnings:
warning: variable 'idProduct' set but not used [-Wunused-but-set-variable]
warning: variable 'idVendor' set but not used [-Wunused-but-set-variable]
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Colin Ian King [Wed, 11 Jul 2018 10:40:05 +0000 (11:40 +0100)]
staging: gasket: remove redundant pointer bar_data
Pointer bar_data is being assigned but is never used hence it is redundant
and can be removed.
Cleans up clang warning:
warning: variable 'bar_data' set but not used [-Wunused-but-set-variable]
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Colin Ian King [Wed, 11 Jul 2018 10:32:29 +0000 (11:32 +0100)]
staging: comedi: remove redundant variable segpos
Variable segpos is being assigned but is never used hence it is redundant
and can be removed.
Cleans up clang warning:
warning: variable 'segpos' set but not used [-Wunused-but-set-variable]
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sophie Matter [Wed, 11 Jul 2018 09:45:53 +0000 (11:45 +0200)]
staging: pi433: Make only one statement per line
Lines containing multiple statements were broken into multiple
lines, increasing readability and complying with the coding standard.
This also fixes several checkpatch.pl errors complaining about
the lines being too long.
Signed-off-by: Sophie Matter <sophie.matter@web.de>
Signed-off-by: Rico Schrage <rico.schrage@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sophie Matter [Wed, 11 Jul 2018 09:45:52 +0000 (11:45 +0200)]
staging: pi433: Use preferred commenting style
For multi-line comments, the preferred commenting style from the
coding style Documentation was applied to the comments, meaning
almost blank lines at the beginning and end of the comment.
One changed comment includes a line over 80 characters, causing
checkpatch.pl to complain, however breaking this line would not
make much sense, so it is kept like it is.
Signed-off-by: Sophie Matter <sophie.matter@web.de>
Signed-off-by: Rico Schrage <rico.schrage@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sophie Matter [Wed, 11 Jul 2018 09:45:51 +0000 (11:45 +0200)]
staging: pi433: Comply with 80 character column limit
Lines have been split where it makes sense to shorten them in order
to comply with the coding standards and fix checkpatch.pl warnings.
There are still lines left that are too long, however breaking
those would impair readability.
Changes in v2:
- now working on staging-next branch of the staging tree
- the changes to the defines previously made are deleted
due to readability
Signed-off-by: Sophie Matter <sophie.matter@web.de>
Signed-off-by: Rico Schrage <rico.schrage@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Mon, 9 Jul 2018 20:21:04 +0000 (22:21 +0200)]
staging: mt7621-pci: factor out mt7621_pci_get_cfgaddr function
To get config address the same pattern is repeated in some functions
along the code. Factor out a new mt7621_pci_get_cfgaddr for calculate
it and use it in convenient places. Adjust types to match to u32 where
is neccesary.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Mon, 9 Jul 2018 20:21:03 +0000 (22:21 +0200)]
staging: mt7621-pci: remove unused macro MV_READ_DATA
This macro is not being used at all along the code.
Just remove it.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Mon, 9 Jul 2018 16:05:48 +0000 (18:05 +0200)]
staging: mt7621-gpio: remove driver from staging
Remove driver from staging. It has been accepted in
the linux-gpio tree.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Mon, 9 Jul 2018 13:50:39 +0000 (15:50 +0200)]
staging: rtl8723bs: use mac_pton()
Use mac_pton() instead of custom approach.
Remove the now unused hex2num_i() and hwaddr_aton_i().
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Mon, 9 Jul 2018 11:28:30 +0000 (13:28 +0200)]
Revert "staging: mt7621-pinctrl: replace core_initcall_sync with builtin_platform_driver"
That patch causes the network interface on the device to stop working.
device_initcall() is called much later than core_initcall_sync() and
that seem to be a problem. Revert it to get a correct behaviour.
Reported-by: NeilBrown <neil@brown.name>
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Mon, 9 Jul 2018 04:52:45 +0000 (06:52 +0200)]
staging: mt7621-pinctrl: init *map to NULL for correct memory assignation
pinctrl_utils_reserve_map() calls krealloc() on *map. Because of this
*map need to be initialized to NULL before calling it.
Fixes:
62b6215c11ea ("staging: mt7621-pinctrl: make use of pinctrl_utils_reserve_map")
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ioana Radulescu [Mon, 9 Jul 2018 15:01:11 +0000 (10:01 -0500)]
staging: fsl-dpaa2/eth: Remove Rx frame size check
Most Ethernet drivers don't enforce the MTU value as upper limit
for ingress frames. We too support receiving frames larger than
MTU, so allow that.
Remove our ndo_change_mtu implementation, letting the default
stack implementation handle things. Also, set the max frame length
allowed by hardware only once at probe time, with the largest
possible value.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ioana Radulescu [Mon, 9 Jul 2018 15:01:10 +0000 (10:01 -0500)]
staging: fsl-dpaa2/eth: MTU cleanup
Don't set the lower MTU limit explicitly, since we use
the default value anyway.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ioana Radulescu [Mon, 9 Jul 2018 15:01:09 +0000 (10:01 -0500)]
staging: fsl-dpaa2/eth: Remove pointless instruction
We don't need to call dev_set_drvdata(dev, NULL) on driver
remove since core kernel code also performs this step.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ioana Radulescu [Mon, 9 Jul 2018 15:01:08 +0000 (10:01 -0500)]
staging: fsl-dpaa2/eth: Remove obsolete reference
Commit
2b7c86eb7bf3 ("staging: fsl-dpaa2/eth: Don't enable FAS on Tx")
removed the status field from the TX confirm frame annotation,
but a reference to it remained in the description of free_tx_fd().
Remove it.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ioana Radulescu [Mon, 9 Jul 2018 15:01:07 +0000 (10:01 -0500)]
staging: fsl-dpaa2/eth: Fix DMA mapping direction
We are using DMA_FROM_DEVICE when mapping RX frame buffers,
but DMA_BIDIRECTIONAL for unmap. Fix the direction for DMA
unmapping operation.
Fixes:
87eb55e418b7 ("staging: fsl-dpaa2/eth: Fix potential endless loop")
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sun, 8 Jul 2018 11:58:12 +0000 (13:58 +0200)]
staging: rtl8188eu: replace tabs with spaces
Replace tabs with spaces in some function definitions and variable
declarations.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sun, 8 Jul 2018 11:58:11 +0000 (13:58 +0200)]
staging: rtl8188eu: refactor rtw_macaddr_cfg()
Use ether_addr_copy() instead of memcpy() to copy the mac address.
Using is_broadcast_ether_addr() and is_zero_ether_addr() instead of
testing each byte of the mac[] array for 0xff and 0x00 shortens the
code and improves readability.
Instead of a fixed default mac address use a random one to reduce the
likelihood of mac address collision.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sun, 8 Jul 2018 10:38:55 +0000 (12:38 +0200)]
staging: rtl8723bs: remove braces from single if statement
Remove braces from single if statement to follow kernel coding style.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sun, 8 Jul 2018 10:38:54 +0000 (12:38 +0200)]
staging: rtl8723bs: add missing blank lines
Add missing blank lines after declarations as reported by checkpatch.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sun, 8 Jul 2018 10:38:53 +0000 (12:38 +0200)]
staging: rtl8723bs: remove blank lines
Remove unrequired blank lines as reported by checkpatch.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sun, 8 Jul 2018 10:38:52 +0000 (12:38 +0200)]
staging: rtl8723bs: fix indentation
Remove unrequired extra indentations.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sun, 8 Jul 2018 10:38:51 +0000 (12:38 +0200)]
staging: rtl8723bs: replace tab with space
Replace tabs with spaces in some function definitions.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sun, 8 Jul 2018 10:38:50 +0000 (12:38 +0200)]
staging: rtl8723bs: replace while with shorter for loop
Simplify rtw_get_rateset_len() by replacing the while loop
with a shorter for loop.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John Whitmore [Sat, 7 Jul 2018 14:55:07 +0000 (15:55 +0100)]
staging:rtl8192u: rename HT_EXTCHNL_OFFSET -> enum ht_extension_chan_width
remove the typedef of enumerated type HT_EXTCHNL_OFFSET and replace it with
'enum ht_extension_chan_offset'
Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John Whitmore [Sat, 7 Jul 2018 14:55:05 +0000 (15:55 +0100)]
staging:rtl8192u: Add spaces required around operators - Coding Style
Added the spaces, required by coding style, around the various operators.
Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John Whitmore [Sat, 7 Jul 2018 14:55:03 +0000 (15:55 +0100)]
staging:rtl8192u: Add space required before '(' - Style
Simple addition of the coding style required space before '('.
Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John Whitmore [Sat, 7 Jul 2018 14:55:02 +0000 (15:55 +0100)]
staging:rtl8192u: rename HT_CHANNEL_WIDTH -> enum ht_channel_width
remove the typedef HT_CHANNEL_WIDTH and replace with 'enum ht_channel_width'
Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Johan Hovold [Mon, 11 Jun 2018 07:42:02 +0000 (09:42 +0200)]
MAINTAINERS: update two greybus sections
Fix a file entry typo and drop the obsolete timesync entries, which were
all caught by:
scripts/get_maintainer.pl --self-test=patterns
Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sat, 7 Jul 2018 11:22:50 +0000 (13:22 +0200)]
staging: rtl8188eu: replace while with shorter for loop
Simplify rtw_get_rateset_len() by replacing the while loop
with a shorter for loop. Also replace tabs with spaces in
the definition line.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sat, 7 Jul 2018 11:38:41 +0000 (13:38 +0200)]
staging: rtl8723bs: remove rtw_beamforming.h
The header rtw_beamforming.h is not used anywhere.
'git grep rtw_beamforming.h' returns nothing, remove the file.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sat, 7 Jul 2018 11:38:40 +0000 (13:38 +0200)]
staging: rtl8723bs: remove rtw_br_ext.h
The header rtw_br_ext.h is not used anywhere.
'git grep rtw_br_ext.h' returns nothing, remove the file.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tim Collier [Fri, 6 Jul 2018 19:38:15 +0000 (20:38 +0100)]
staging: wlan-ng: remove unneeded parentheses from prism2mgmt.c
remove parentheses reported as unnecessary by checkpatch
Signed-off-by: Tim Collier <osdevtc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tim Collier [Fri, 6 Jul 2018 19:38:14 +0000 (20:38 +0100)]
staging: wlan-ng: fix expression continuation in prism2mgmt.c
checkpatch reports "CHECK: Logical continuations should be on the
previous line" when a continuation line begins with an
operator. Reformat the code so that the operator appears at the end of
the line being continued.
Signed-off-by: Tim Collier <osdevtc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tim Collier [Fri, 6 Jul 2018 19:38:13 +0000 (20:38 +0100)]
staging: wlan-ng: fix expression continuation in prism2fw.c
checkpatch reports "CHECK: Logical continuations should be on the
previous line" when a continuation line begins with an
operator. Reformat the code so that the operator appears at the end of
the line being continued.
Signed-off-by: Tim Collier <osdevtc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Randy Dunlap [Sat, 7 Jul 2018 03:54:37 +0000 (20:54 -0700)]
staging/rtl8192u: fix defined but not used build warnings
Fix build warnings in rtl8192u when CONFIG_PROC_FS is not enabled
by marking the unused functions as __maybe_unused.
../drivers/staging/rtl8192u/r8192U_core.c:508:12: warning: 'proc_get_stats_ap' defined but not used [-Wunused-function]
../drivers/staging/rtl8192u/r8192U_core.c:527:12: warning: 'proc_get_registers' defined but not used [-Wunused-function]
../drivers/staging/rtl8192u/r8192U_core.c:568:12: warning: 'proc_get_stats_tx' defined but not used [-Wunused-function]
../drivers/staging/rtl8192u/r8192U_core.c:627:12: warning: 'proc_get_stats_rx' defined but not used [-Wunused-function]
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Jerry chuang <wlanfae@realtek.com>
Cc: devel@driverdev.osuosl.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peter Vernia [Sat, 7 Jul 2018 07:10:22 +0000 (03:10 -0400)]
staging: mt7621-pci: Move open-braces to match kernel code style
Moves some open-braces to the end of the conditional statement to match the
kernel's coding style
Signed-off-by: Peter Vernia <peter.vernia@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peter Vernia [Sat, 7 Jul 2018 07:09:19 +0000 (03:09 -0400)]
staging: mt7621-pci: Add spaces after commas in pci-mt7621.c
Adds spaces after commas in parameter lists in pci-mt7621.c
Signed-off-by: Peter Vernia <peter.vernia@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peter Vernia [Sat, 7 Jul 2018 07:08:36 +0000 (03:08 -0400)]
staging: mt7621-pci: Fix spacing around equals sign
Add spaces in front of the equals sign in assignment operations
Signed-off-by: Peter Vernia <peter.vernia@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peter Vernia [Sat, 7 Jul 2018 07:07:55 +0000 (03:07 -0400)]
staging: mt7621-pci: Fix spaces around parenthesis in pci-7621.c
Adds spaces before open parenthesis, and removes spaces after open parenthesis
Signed-off-by: Peter Vernia <peter.vernia@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Todd Poynor [Sat, 7 Jul 2018 06:43:10 +0000 (23:43 -0700)]
drivers/staging/gasket: Use refcount_read()
Use the refcount_read accessor function, avoid reaching into refcount
and atomic struct fields.
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John Whitmore [Wed, 4 Jul 2018 14:20:56 +0000 (15:20 +0100)]
staging: rtl8192u: Add space after ', ' character - Coding Style
checkpatch requires a space after ',' - Added.
Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John Whitmore [Wed, 4 Jul 2018 14:20:55 +0000 (15:20 +0100)]
staging: rtl8192u: Add required space around '=' operator - Style
checkpatch requires spaces around '=' operator so added.
Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>