platform/kernel/linux-rpi.git
6 years agostaging: wlan-ng: rename DIDmsg_dot11req_scan in p80211metadef.h
Tim Collier [Wed, 26 Sep 2018 22:05:35 +0000 (23:05 +0100)]
staging: wlan-ng: rename DIDmsg_dot11req_scan in p80211metadef.h

Rename DIDmsg_dot11req_scan in p80211metadef.h to DIDMSG_DOT11REQ_SCAN
to fix "Avoid CamelCase" message from checkpatch and conform to the
coding style guidelines.

Signed-off-by: Tim Collier <osdevtc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wlan-ng: rename DIDmsg_dot11req_mibset_resultcode in p80211metadef.h
Tim Collier [Wed, 26 Sep 2018 22:05:34 +0000 (23:05 +0100)]
staging: wlan-ng: rename DIDmsg_dot11req_mibset_resultcode in p80211metadef.h

Rename DIDmsg_dot11req_mibset_resultcode in p80211metadef.h to
DIDMSG_DOT11REQ_MIBSET_RESULTCODE to fix "Avoid CamelCase" message
from checkpatch and conform to the coding style guidelines.

Signed-off-by: Tim Collier <osdevtc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wlan-ng: rename DIDmsg_dot11req_mibset_mibattribute in p80211metadef.h
Tim Collier [Wed, 26 Sep 2018 22:05:33 +0000 (23:05 +0100)]
staging: wlan-ng: rename DIDmsg_dot11req_mibset_mibattribute in p80211metadef.h

Rename DIDmsg_dot11req_mibset_mibattribute in p80211metadef.h to
DIDMSG_DOT11REQ_MIBSET_MIBATTRIBUTE to fix "Avoid CamelCase" message
from checkpatch and conform to the coding style guidelines.

Signed-off-by: Tim Collier <osdevtc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wlan-ng: rename DIDmsg_dot11req_mibset in p80211metadef.h
Tim Collier [Wed, 26 Sep 2018 22:05:32 +0000 (23:05 +0100)]
staging: wlan-ng: rename DIDmsg_dot11req_mibset in p80211metadef.h

Rename DIDmsg_dot11req_mibset in p80211metadef.h to
DIDMSG_DOT11REQ_MIBSET to fix "Avoid CamelCase" message from
checkpatch and conform to the coding style guidelines.

Signed-off-by: Tim Collier <osdevtc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wlan-ng: rename DIDmsg_dot11req_mibget_resultcode in p80211metadef.h
Tim Collier [Wed, 26 Sep 2018 22:05:31 +0000 (23:05 +0100)]
staging: wlan-ng: rename DIDmsg_dot11req_mibget_resultcode in p80211metadef.h

Rename DIDmsg_dot11req_mibget_resultcode in p80211metadef.h to
DIDMSG_DOT11REQ_MIBGET_RESULTCODE to fix "Avoid CamelCase" message
from checkpatch and conform to the coding style guidelines.

Signed-off-by: Tim Collier <osdevtc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wlan-ng: rename DIDmsg_dot11req_mibget_mibattribute in p80211metadef.h
Tim Collier [Wed, 26 Sep 2018 22:05:30 +0000 (23:05 +0100)]
staging: wlan-ng: rename DIDmsg_dot11req_mibget_mibattribute in p80211metadef.h

Rename DIDmsg_dot11req_mibget_mibattribute in p80211metadef.h to
DIDMSG_DOT11REQ_MIBGET_MIBATTRIBUTE to fix "Avoid CamelCase" message
from checkpatch and conform to the coding style guidelines.

Signed-off-by: Tim Collier <osdevtc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wlan-ng: rename DIDmsg_dot11req_mibget in p80211metadef.h
Tim Collier [Wed, 26 Sep 2018 22:05:29 +0000 (23:05 +0100)]
staging: wlan-ng: rename DIDmsg_dot11req_mibget in p80211metadef.h

Rename DIDmsg_dot11req_mibget in p80211metadef.h to
DIDMSG_DOT11REQ_MIBGET to fix "Avoid CamelCase" message from
checkpatch and conform to the coding style guidelines.

Signed-off-by: Tim Collier <osdevtc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtlwifi: Remove set but not used variable 'ppsc'
YueHaibing [Fri, 28 Sep 2018 02:21:53 +0000 (02:21 +0000)]
staging: rtlwifi: Remove set but not used variable 'ppsc'

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/staging/rtlwifi/btcoexist/halbtcoutsrc.c: In function 'halbtc_leave_lps':
drivers/staging/rtlwifi/btcoexist/halbtcoutsrc.c:284:21: warning:
 variable 'ppsc' set but not used [-Wunused-but-set-variable]

drivers/staging/rtlwifi/btcoexist/halbtcoutsrc.c: In function 'halbtc_enter_lps':
drivers/staging/rtlwifi/btcoexist/halbtcoutsrc.c:307:21: warning:
 variable 'ppsc' set but not used [-Wunused-but-set-variable]

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: bcm2835-camera: Avoid unneeded internal declaration warning
Nathan Chancellor [Fri, 28 Sep 2018 00:50:39 +0000 (17:50 -0700)]
staging: bcm2835-camera: Avoid unneeded internal declaration warning

Clang warns:

drivers/staging/vc04_services/bcm2835-camera/controls.c:59:18: warning:
variable 'mains_freq_qmenu' is not needed and will not be emitted
[-Wunneeded-internal-declaration]
static const s64 mains_freq_qmenu[] = {
                 ^
1 warning generated.

This is because mains_freq_qmenu is currently only used in an ARRAY_SIZE
macro, which is a compile time evaluation in this case. Avoid this by
adding mains_freq_qmenu as the imenu member of this structure, which
matches all other controls that uses the ARRAY_SIZE macro in v4l2_ctrls.
This turns out to be a no-op because V4L2_CID_MPEG_VIDEO_BITRATE_MODE is
defined as a MMAL_CONTROL_TYPE_STD_MENU, which does not pass the imenu
definition along to v4l2_ctrl_new in bm2835_mmal_init_controls.

Link: https://github.com/ClangBuiltLinux/linux/issues/122
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8723bs: Skip unnecessary field checks
Aymen Qader [Thu, 27 Sep 2018 22:28:14 +0000 (23:28 +0100)]
staging: rtl8723bs: Skip unnecessary field checks

Skip unnecessary request field checks when the information element
pointer is null.

Signed-off-by: Aymen Qader <qader.aymen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Remove potential memory leak
John Whitmore [Wed, 26 Sep 2018 19:17:04 +0000 (20:17 +0100)]
staging:rtl8192u: Remove potential memory leak

Add call to ieee80211_networks_free() to avoid potential memory
leak if allocation of pHTInfo fails.

If the third allocation fails only the first successful allocation
is freed, not the second.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Move HTSetConnectBwModeCallback() - Style
John Whitmore [Wed, 26 Sep 2018 19:16:55 +0000 (20:16 +0100)]
staging:rtl8192u: Move HTSetConnectBwModeCallback() - Style

The function HTSetConnectBwModeCallback() is only used in the file
in which it is defined, so has been changed to being of type 'static'.

Additionally the function is defined after it is used so a prototype
was included in the file. This prototype, in the middle of the file
has been removed and the function implementation moved so that it is
defined before it is used in the file.

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>
6 years agostaging:rtl8192u: Remove definition of HTSetConnectBwMode - Style
John Whitmore [Wed, 26 Sep 2018 19:16:54 +0000 (20:16 +0100)]
staging:rtl8192u: Remove definition of HTSetConnectBwMode - Style

Remove the redundant declaration of the function HTSetConnectBwMode()
as it is not needed in the code. The function is already declared
in header file, multiple declarations add nothing.

This is a 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>
6 years agostaging:rtl8192u: Make HTMcsToDataRate static - Style
John Whitmore [Wed, 26 Sep 2018 19:16:53 +0000 (20:16 +0100)]
staging:rtl8192u: Make HTMcsToDataRate static - Style

The function HTMcsToDataRate() is not used outside the file in which
it is defined, so has been declared as 'static' and the prototype
removed from the header file.

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>
6 years agostaging:rtl8192u: Remove HTHalfMcsToDataRate() - Style
John Whitmore [Wed, 26 Sep 2018 19:16:52 +0000 (20:16 +0100)]
staging:rtl8192u: Remove HTHalfMcsToDataRate() - Style

The function HTHalfMcsToDataRate() is unused in code so has simply
been removed from the code.

As a result two static functions, (IsHTHalfNmode40Bandwidth and
IsHTHalfNmodeSGI), are not longer called, so they have been removed
as well.

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>
6 years agostaging: wilc1000: fix incorrect allocation size for structure
Colin Ian King [Thu, 27 Sep 2018 12:17:49 +0000 (13:17 +0100)]
staging: wilc1000: fix incorrect allocation size for structure

Currently the allocation for str_vals is for the sizeof the pointer
rather than the size of the structure.  Fix this.

Detected by smatch
"wilc_wlan_cfg_init() error: not allocating enough data 392 vs 8"

Fixes: acceb12a9f8b ("staging: wilc1000: refactor code to avoid static variables for config parameters")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: Skip unnecessary field checks
Aymen Qader [Thu, 27 Sep 2018 21:19:11 +0000 (22:19 +0100)]
staging: rtl8188eu: Skip unnecessary field checks

Skip unnecessary request field checks when the information element
pointer is null.

Signed-off-by: Aymen Qader <qader.aymen@gmail.com>
ACKed-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: remove get_right_chnl_for_iqk()
Michael Straube [Thu, 27 Sep 2018 12:16:40 +0000 (14:16 +0200)]
staging: rtl8188eu: remove get_right_chnl_for_iqk()

The function get_right_chnl_for_iqk() only returns non zero values for
channels > 14. According to the TODO, code valid only for 5 GHz should
be removed.

- find and remove remaining code valid only for 5 GHz. Most of the obvious
  ones have been removed, but things like channel > 14 still exist.

Remove get_right_chnl_for_iqk() and the variable chn_index that is
used to save the return value. Replace the uses of chn_index with zero.

Remove the now unused define ODM_TARGET_CHNL_NUM_2G_5G.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: Use proper enum in rtl8188eu_config_rf_reg
Nathan Chancellor [Thu, 27 Sep 2018 00:32:01 +0000 (17:32 -0700)]
staging: rtl8188eu: Use proper enum in rtl8188eu_config_rf_reg

Clang warns when an enumerated type is implicitly converted to another.

drivers/staging/rtl8188eu/hal/rf_cfg.c:180:25: warning: implicit
conversion from enumeration type 'enum rf90_radio_path' to different
enumeration type 'enum rf_radio_path' [-Wenum-conversion]
        rtl_rfreg_delay(adapt, RF90_PATH_A, addr | maskforphyset,
        ~~~~~~~~~~~~~~~        ^~~~~~~~~~~
1 warning generated.

Avoid this by using the equivalent value from the expected type,
rf_radio_path:

RF90_PATH_A = RF_PATH_A = 0

Link: https://github.com/ClangBuiltLinux/linux/issues/164
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: use break to exit while loop
Michael Straube [Wed, 26 Sep 2018 20:04:08 +0000 (22:04 +0200)]
staging: rtl8188eu: use break to exit while loop

The variable bContinual is only used to break out of the while loop.
Remove the variable and use break instead.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: rename variable - style
Michael Straube [Wed, 26 Sep 2018 20:04:07 +0000 (22:04 +0200)]
staging: rtl8188eu: rename variable - style

Rename the return value variable in some functions in rtw_efuse.c
to avoid CamelCase. bRet -> ret

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: do not line break function definition - style
Michael Straube [Wed, 26 Sep 2018 20:04:06 +0000 (22:04 +0200)]
staging: rtl8188eu: do not line break function definition - style

Do not line break function definition. Clears a checkpatch issue.
CHECK: Lines should not end with a '('

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: simplify function comments - style
Michael Straube [Wed, 26 Sep 2018 20:04:05 +0000 (22:04 +0200)]
staging: rtl8188eu: simplify function comments - style

Simplify function comments. Clears a 'line over 80 characters'
checkpatch warning.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: fix spelling mistake "transfoer_len" -> "transfer_len"
Colin Ian King [Wed, 26 Sep 2018 13:34:05 +0000 (14:34 +0100)]
staging: rtl8188eu: fix spelling mistake "transfoer_len" -> "transfer_len"

Trivial fix to spelling mistake in DBG_88E debug message text.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: Simplify memcmp logical checks
Nathan Chancellor [Tue, 25 Sep 2018 19:13:26 +0000 (12:13 -0700)]
staging: rtl8188eu: Simplify memcmp logical checks

Clang generates a warning when it sees a logical not followed by a
conditional operator like ==, >, or < because it thinks that the logical
not should be applied to the whole statement:

drivers/staging/rtl8188eu/core/rtw_ieee80211.c:293:8: warning: logical
not is only applied to the left hand side of this comparison
[-Wlogical-not-parentheses]

It assumes the author might have made a mistake in their logic:

if (!a == b) -> if (!(a == b))

Sometimes that is the case; other times, it's just a super convoluted
way of saying 'if (a)' when b = 0:

if (!1 == 0) -> if (0 == 0) -> if (true)

Alternatively:

if (!1 == 0) -> if (!!1) -> if (1)

Simplify these comparisons so that Clang doesn't complain.

Link: https://github.com/ClangBuiltLinux/linux/issues/161
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rts5208: Remove unnecessary braces {}
Aymen Qader [Thu, 20 Sep 2018 13:22:25 +0000 (14:22 +0100)]
staging: rts5208: Remove unnecessary braces {}

This patch fixes the checkpatch.pl warning "braces {} are not necessary"
in the rts5208 driver. Mostly applies to single-line return/goto if
blocks.

Signed-off-by: Aymen Qader <qader.aymen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: most: fix label names
Christian Gromm [Fri, 21 Sep 2018 09:28:51 +0000 (11:28 +0200)]
staging: most: fix label names

This patch makes use of label names that say what the goto
actually does, as recommended in the kernel documentation.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: remove rtw_qos.h
Michael Straube [Tue, 25 Sep 2018 11:25:21 +0000 (13:25 +0200)]
staging: rtl8188eu: remove rtw_qos.h

There is only one struct in rtw_qos.h and it is only included from
drv_types.h. Move the struct into drv_types.h to reduce the number
of header files.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: remove unused rtw_scan_abort()
Michael Straube [Tue, 25 Sep 2018 11:25:20 +0000 (13:25 +0200)]
staging: rtl8188eu: remove unused rtw_scan_abort()

The function rtw_scan_abort() 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>
6 years agostaging: rtl8188eu: Remove unnecessary parentheses
Nathan Chancellor [Fri, 21 Sep 2018 17:37:23 +0000 (10:37 -0700)]
staging: rtl8188eu: Remove unnecessary parentheses

Clang warns when multiple pairs of parentheses are used for a single
conditional statement.

drivers/staging/rtl8188eu/core/rtw_pwrctrl.c:295:21: warning: equality
comparison with extraneous parentheses [-Wparentheses-equality]
        if ((pwrpriv->rpwm == pslv)) {
             ~~~~~~~~~~~~~~^~~~~~~
drivers/staging/rtl8188eu/core/rtw_pwrctrl.c:295:21: note: remove
extraneous parentheses around the comparison to silence this warning
        if ((pwrpriv->rpwm == pslv)) {
            ~              ^      ~
drivers/staging/rtl8188eu/core/rtw_pwrctrl.c:295:21: note: use '=' to
turn this equality comparison into an assignment
        if ((pwrpriv->rpwm == pslv)) {
                           ^~
                           =
drivers/staging/rtl8188eu/hal/odm.c:1062:27: warning: equality
comparison with extraneous parentheses [-Wparentheses-equality]
        if ((pregpriv->wifi_spec == 1))/*  (pmlmeinfo->HT_enable == 0))
*/
             ~~~~~~~~~~~~~~~~~~~~^~~~
drivers/staging/rtl8188eu/hal/odm.c:1062:27: note: remove extraneous
parentheses around the comparison to silence this warning
        if ((pregpriv->wifi_spec == 1))/*  (pmlmeinfo->HT_enable == 0))
*/
            ~                    ^   ~
drivers/staging/rtl8188eu/hal/odm.c:1062:27: note: use '=' to turn this
equality comparison into an assignment
        if ((pregpriv->wifi_spec == 1))/*  (pmlmeinfo->HT_enable == 0))
*/
                                 ^~
                                 =

Link: https://github.com/ClangBuiltLinux/linux/issues/163
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: emxx_udc: remove unnecessary nullpointer checks
Arkadiusz Lis [Mon, 24 Sep 2018 17:34:22 +0000 (19:34 +0200)]
staging: emxx_udc: remove unnecessary nullpointer checks

This patch removes nullpointer checks which are redundant. container_of
returns structure containing entity which we know for sure is not null,
so the whole structure can not be null.

Signed-off-by: Arkadiusz Lis <areklis909@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: bcm2835-camera: Remove unused header
Aymen Qader [Tue, 25 Sep 2018 08:34:00 +0000 (09:34 +0100)]
staging: bcm2835-camera: Remove unused header

Remove the asm/cacheflush.h header include from mmal-vchiq.c. This
dependency was removed in:

commit 7e8dbea41032 ("staging: bcm2835-camera: Remove explicit cache
flush operations")

Signed-off-by: Aymen Qader <qader.aymen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: bcm2835-camera: Update TODO
Aymen Qader [Tue, 25 Sep 2018 08:33:59 +0000 (09:33 +0100)]
staging: bcm2835-camera: Update TODO

Remove the TODO item to remove manual cache flushing from bulk_receive.
This was previously done in this commit:

commit 7e8dbea41032 ("staging: bcm2835-camera: Remove explicit cache
flush operations")

Signed-off-by: Aymen Qader <qader.aymen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8723bs: fix spelling mistake "toogle" -> "toggle"
Colin Ian King [Mon, 24 Sep 2018 16:25:25 +0000 (17:25 +0100)]
staging: rtl8723bs: fix spelling mistake "toogle" -> "toggle"

Trivial fix to spelling mistake in struct field name

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8723bs: fix spelling mistake "unvalid" -> "invalid"
Colin Ian King [Mon, 24 Sep 2018 17:30:31 +0000 (18:30 +0100)]
staging: rtl8723bs: fix spelling mistake "unvalid" -> "invalid"

Trivial fix to spelling mistake in DBG_871X debug messages.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu, rtl8723bs: fix spelling mistake "evet" -> "event"
Colin Ian King [Sun, 23 Sep 2018 09:25:55 +0000 (11:25 +0200)]
staging: rtl8188eu, rtl8723bs: fix spelling mistake "evet" -> "event"

Trivial fix to spelling mistake in RT_TRACE message

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: sm750fb: Fix typo frambuffer->framebuffer
Aymen Qader [Thu, 20 Sep 2018 22:53:21 +0000 (23:53 +0100)]
staging: sm750fb: Fix typo frambuffer->framebuffer

This patch corrects a typo (frambuffer->framebuffer) in the
sm750fb_fram(e)buffer_release and sm750fb_fram(e)buffer_alloc function
names.

Signed-off-by: Aymen Qader <qader.aymen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: return exact error of register_netdev() from wilc_netdev_init()
Ajay Singh [Tue, 25 Sep 2018 06:23:44 +0000 (11:53 +0530)]
staging: wilc1000: return exact error of register_netdev() from wilc_netdev_init()

Refactor wilc_netdev_init() to return the error code received from
register_netdev() during the failure condition.

Earlier discussion link
[1]. https://www.spinics.net/lists/linux-wireless/msg177304.html

Suggested-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: refactor wilc_set_multicast_list() function
Ajay Singh [Tue, 25 Sep 2018 06:23:43 +0000 (11:53 +0530)]
staging: wilc1000: refactor wilc_set_multicast_list() function

Refactor wilc_set_multicast_list() by making below changes:
o use kmalloc_array
o remove unnecessary res
o add u8 *cur_mc
o use i as index
o use '%pM' extension in netdev_dbg()

The below checkpatch issue is also resolved after code refactor.
'spaces preferred around that '/' (ctx:VxV)'

Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: use usleep_range() in place of udelay()
Ajay Singh [Tue, 25 Sep 2018 06:23:42 +0000 (11:53 +0530)]
staging: wilc1000: use usleep_range() in place of udelay()

Changes to avoid the below checkpatch warning:

'usleep_range is preferred over udelay; see
Documentation/timers/timers-howto.txt;'

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: remove unnecessary option used with ccflags-y in Makefile
Ajay Singh [Tue, 25 Sep 2018 06:23:41 +0000 (11:53 +0530)]
staging: wilc1000: remove unnecessary option used with ccflags-y in Makefile

Cleanup patch to remove -I(src) and -DWILC_ASIC_A0 option used in
ccflag-y in Makefile.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: remove wilc_debugfs.c file as its not used
Ajay Singh [Tue, 25 Sep 2018 06:23:40 +0000 (11:53 +0530)]
staging: wilc1000: remove wilc_debugfs.c file as its not used

Deleted wilc_debugfs.c file as it's not used.

Earlier discussion link:
[1]. https://www.spinics.net/lists/linux-wireless/msg176076.html

Suggested-by: Greg KH <gregkh@linuxfoundation.org>
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: remove p2p related static variables to wilc_vif struct
Ajay Singh [Tue, 25 Sep 2018 06:23:39 +0000 (11:53 +0530)]
staging: wilc1000: remove p2p related static variables to wilc_vif struct

Avoid use of static variable and move them as part of private
data(wilc_priv) struct.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: remove unnecessary memset in sdio_init() & wilc_spi_init()
Ajay Singh [Tue, 25 Sep 2018 06:23:38 +0000 (11:53 +0530)]
staging: wilc1000: remove unnecessary memset in sdio_init() & wilc_spi_init()

Cleanup changes to avoid unnecessary setting 'wilc->bus_data' value to
zero as the buffer was allocated using kzalloc().

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: avoid use of 'g_spi' static variable
Ajay Singh [Tue, 25 Sep 2018 06:23:37 +0000 (11:53 +0530)]
staging: wilc1000: avoid use of 'g_spi' static variable

Instead of using static variable 'g_spi' move it as part of 'wilc'
struct. Also allocating the memory in the probe function and
free is taken care in wilc_netdev_cleanup().

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: avoid use of 'g_sdio' static variable
Ajay Singh [Tue, 25 Sep 2018 06:23:36 +0000 (11:53 +0530)]
staging: wilc1000: avoid use of 'g_sdio' static variable

Instead of using static variable 'g_sdio' move it as part of 'wilc'
struct. Also allocating the memory in the probe function and free during
deinitialization.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: remove use of unnecessary 'wilc_connected_ssid' variable
Ajay Singh [Tue, 25 Sep 2018 06:23:35 +0000 (11:53 +0530)]
staging: wilc1000: remove use of unnecessary 'wilc_connected_ssid' variable

'wilc_connected_ssid' actually used to store the BSSID information for
connected BSSID. 'wilc_vif' already has 'bssid' variable to store the
same information. So refactor code to remove 'wilc_connected_ssid' and
instead used 'wilc_vif' struct 'bssid' element.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: avoid the use of 'hif_driver_comp' completion variable
Ajay Singh [Tue, 25 Sep 2018 06:23:34 +0000 (11:53 +0530)]
staging: wilc1000: avoid the use of 'hif_driver_comp' completion variable

Instead of using extra completion variable to handle the sync call now
using msg->is_sync flag to handle the sync call.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: rename 'wilc_mac_cfg' struct to 'wilc_cfg_str_vals'
Ajay Singh [Tue, 25 Sep 2018 06:23:33 +0000 (11:53 +0530)]
staging: wilc1000: rename 'wilc_mac_cfg' struct to 'wilc_cfg_str_vals'

Rename 'wilc_mac_cfg' struct to 'wilc_cfg_str_vals' as its more
appropriate for structure to store the values of string configuration.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: refactor code to avoid static variables for config parameters
Ajay Singh [Tue, 25 Sep 2018 06:23:32 +0000 (11:53 +0530)]
staging: wilc1000: refactor code to avoid static variables for config parameters

Refactor the code in wilc_wlan_cfg.c file to avoid the use of static
variables. Move the static variables as part of wilc struct and also
dynamically allocating memory for keeping those variables.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: refactor code to remove 'mac_status' from 'wilc_mac_cfg' struct
Ajay Singh [Tue, 25 Sep 2018 06:23:31 +0000 (11:53 +0530)]
staging: wilc1000: refactor code to remove 'mac_status' from 'wilc_mac_cfg' struct

Refactor the code by removing use of 'mac_status' from 'wilc_mac_cfg'
and only have the string type configuration values in 'wilc_mac_cfg'
struct. Now fetch the value 'WID_STATUS' configuration from 'g_cfg_byte'
array.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: remove unused wid from cfg struct
Ajay Singh [Tue, 25 Sep 2018 06:23:30 +0000 (11:53 +0530)]
staging: wilc1000: remove unused wid from cfg struct

Cleanup patch to remove the unused element stored in cfg struct.
Removed those wid from the cfg variables whose value is not
fetched(GET_CFG) from the code. In case the wid is only set to the
firmware then there is need to store them as part of cfg variables, so
removed the unused code.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: remove unused wid type values
Ajay Singh [Tue, 25 Sep 2018 06:23:29 +0000 (11:53 +0530)]
staging: wilc1000: remove unused wid type values

Cleanup patch to remove the wid type not used in the code.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: changes 'val' type to u8 in wilc_cfg_byte struct
Ajay Singh [Tue, 25 Sep 2018 06:23:28 +0000 (11:53 +0530)]
staging: wilc1000: changes 'val' type to u8 in wilc_cfg_byte struct

Use the correct datatype for storing the byte value in 'wilc_cfg_byte'
struct.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: set default value of cfg response type in wilc_wlan_cfg_indicate_rx()
Ajay Singh [Tue, 25 Sep 2018 06:23:27 +0000 (11:53 +0530)]
staging: wilc1000: set default value of cfg response type in wilc_wlan_cfg_indicate_rx()

Handle the setting of default value for 'wilc_cfg_rsp' type for all
cases in wilc_wlan_cfg_indicate_rx() as the caller make use of this
value to know the type of the received message.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: refactor wilc_wlan_parse_info_frame() function
Ajay Singh [Tue, 25 Sep 2018 06:23:26 +0000 (11:53 +0530)]
staging: wilc1000: refactor wilc_wlan_parse_info_frame() function

Return 'void' from wilc_wlan_parse_info_frame() as same constant value
is returned always. Also removed the 'size' from input parameter as its
not used in the function.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: change return type to 'void' for wilc_wlan_cfg_indicate_rx()
Ajay Singh [Tue, 25 Sep 2018 06:23:25 +0000 (11:53 +0530)]
staging: wilc1000: change return type to 'void' for wilc_wlan_cfg_indicate_rx()

Cleanup patch to use 'void' return type for wilc_wlan_cfg_indicate_rx(),
as its return value is not used in caller. The value set in
'rsp' argument is used to get the success status.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: use 'void' return for wilc_wlan_txq_filter_dup_tcp_ack()
Ajay Singh [Tue, 25 Sep 2018 06:23:24 +0000 (11:53 +0530)]
staging: wilc1000: use 'void' return for wilc_wlan_txq_filter_dup_tcp_ack()

Use 'void' return for wilc_wlan_txq_filter_dup_tcp_ack() as it always
return value '1' and its not used by the caller.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: change return type to 'void' tcp ack filter functions
Ajay Singh [Tue, 25 Sep 2018 06:23:23 +0000 (11:53 +0530)]
staging: wilc1000: change return type to 'void' tcp ack filter functions

Use 'void' return type for below functions as they always return '0' and
their return value is not used by caller.
add_tcp_pending_ack()
update_tcp_session()
add_tcp_pending_ack()

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: use 'void' return for wilc_wlan_txq_add_to_head()
Ajay Singh [Tue, 25 Sep 2018 06:23:22 +0000 (11:53 +0530)]
staging: wilc1000: use 'void' return for wilc_wlan_txq_add_to_head()

Use 'void' return for wilc_wlan_txq_add_to_head() as its always
return '0' value.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: use 'void' return type for host_int_get_assoc_res_info()
Ajay Singh [Tue, 25 Sep 2018 06:23:21 +0000 (11:53 +0530)]
staging: wilc1000: use 'void' return type for host_int_get_assoc_res_info()

Change return type to 'void' for host_int_get_assoc_res_info() as its
return value is not used. 'rcvd_assoc_resp_info_len' parameter value is
used to know the status.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: change return type to 'void' for wilc_wfi_deinit_mon_interface()
Ajay Singh [Tue, 25 Sep 2018 06:23:20 +0000 (11:53 +0530)]
staging: wilc1000: change return type to 'void' for wilc_wfi_deinit_mon_interface()

Use 'void' return type for wilc_wfi_deinit_mon_interface(), as same
value always return.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: change return type to 'void' for wilc_deinit_host_int()
Ajay Singh [Tue, 25 Sep 2018 06:23:19 +0000 (11:53 +0530)]
staging: wilc1000: change return type to 'void' for wilc_deinit_host_int()

Cleanup patch to use 'void' return type for wilc_deinit_host_int(),
as its return value is not used in caller.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: change return type to 'void' for lock init & deinit functions
Ajay Singh [Tue, 25 Sep 2018 06:23:18 +0000 (11:53 +0530)]
staging: wilc1000: change return type to 'void' for lock init & deinit functions

Cleanup patch to use 'void' return type for wlan_deinit_locks() &
wlan_init_locks(), as same value is return.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: change return type to 'void' for wilc_wlan_set_bssid()
Ajay Singh [Tue, 25 Sep 2018 06:23:17 +0000 (11:53 +0530)]
staging: wilc1000: change return type to 'void' for wilc_wlan_set_bssid()

Cleanup patch to use 'void' return type for wilc_wlan_set_bssid(),
as its always returns the same value.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: change return type to 'void' for wilc_frame_register()
Ajay Singh [Tue, 25 Sep 2018 06:23:16 +0000 (11:53 +0530)]
staging: wilc1000: change return type to 'void' for wilc_frame_register()

Cleanup patch to use 'void' return type for wilc_frame_register(), as
its return value is not used.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: Remove unnecessary pointer check
Nathan Chancellor [Thu, 20 Sep 2018 21:26:49 +0000 (14:26 -0700)]
staging: wilc1000: Remove unnecessary pointer check

Clang warns that the address of a pointer will always evaluated as true
in a boolean context:

drivers/staging/wilc1000/linux_wlan.c:267:20: warning: address of
'vif->ndev->dev' will always evaluate to 'true'
[-Wpointer-bool-conversion]
        if (!(&vif->ndev->dev))
            ~  ~~~~~~~~~~~^~~
1 warning generated.

Since this statement always evaluates to false due to the logical not,
remove it.

Link: https://github.com/ClangBuiltLinux/linux/issues/121
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtlwifi: Use proper enumerated types for Wi-Fi only interface
Nathan Chancellor [Sun, 23 Sep 2018 06:33:01 +0000 (23:33 -0700)]
staging: rtlwifi: Use proper enumerated types for Wi-Fi only interface

Clang warns when one enumerated type is implicitly converted to another.

drivers/staging/rtlwifi/btcoexist/halbtcoutsrc.c:1264:34: warning:
implicit conversion from enumeration type 'enum btc_chip_interface' to
different enumeration type 'enum wifionly_chip_interface'
[-Wenum-conversion]
                wifionly_cfg->chip_interface = BTC_INTF_PCI;
                                             ~ ^~~~~~~~~~~~
drivers/staging/rtlwifi/btcoexist/halbtcoutsrc.c:1267:34: warning:
implicit conversion from enumeration type 'enum btc_chip_interface' to
different enumeration type 'enum wifionly_chip_interface'
[-Wenum-conversion]
                wifionly_cfg->chip_interface = BTC_INTF_USB;
                                             ~ ^~~~~~~~~~~~
drivers/staging/rtlwifi/btcoexist/halbtcoutsrc.c:1270:34: warning:
implicit conversion from enumeration type 'enum btc_chip_interface' to
different enumeration type 'enum wifionly_chip_interface'
[-Wenum-conversion]
                wifionly_cfg->chip_interface = BTC_INTF_UNKNOWN;
                                             ~ ^~~~~~~~~~~~~~~~
3 warnings generated.

Use the values from the correct enumerated type, wifionly_chip_interface.

BTC_INTF_UNKNOWN = WIFIONLY_INTF_UNKNOWN = 0
BTC_INTF_PCI = WIFIONLY_INTF_PCI = 1
BTC_INTF_USB = WIFIONLY_INTF_USB = 2

Link: https://github.com/ClangBuiltLinux/linux/issues/171
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoStaging: rtlwifi: remove unnecessary NULL check
Karthik Nishanth [Sat, 22 Sep 2018 14:23:54 +0000 (14:23 +0000)]
Staging: rtlwifi: remove unnecessary NULL check

The member regd of the struct rtl_priv is true in a boolean context.

drivers/staging/rtlwifi/regd.c:413:27: warning: address of 'rtlpriv->regd' will always
      evaluate to 'true' [-Wpointer-bool-conversion]
        if (!wiphy || !&rtlpriv->regd)
                      ~ ~~~~~~~~~^~~~
1 warning generated.

Link: https://github.com/ClangBuiltLinux/linux/issues/170
Signed-off-by: Karthik Nishanth <nishanthkarthik@live.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vc04_services: Remove spaces after '*'
Aymen Qader [Mon, 24 Sep 2018 17:35:47 +0000 (18:35 +0100)]
staging: vc04_services: Remove spaces after '*'

This patch fixes the checkpatch.pl error:

ERROR: "foo * bar" should be "foo *bar"

in the interface/vchi directory

Signed-off-by: Aymen Qader <qader.aymen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vc04_services: Remove unused macros
Aymen Qader [Mon, 24 Sep 2018 17:35:46 +0000 (18:35 +0100)]
staging: vc04_services: Remove unused macros

This patch removes the macros and structs associated with the
"vchi_msg_queuev_ex" function, which was previously removed in 49bec49.
Also fixes the checkpatch.pl errors:

ERROR: Macros with complex values should be enclosed in parentheses
ERROR: space required after that ','

Signed-off-by: Aymen Qader <qader.aymen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vc04_services: Use tabs instead of spaces
Aymen Qader [Mon, 24 Sep 2018 17:35:45 +0000 (18:35 +0100)]
staging: vc04_services: Use tabs instead of spaces

This patch fixes the checkpatch.pl error:

ERROR: code indent should use tabs where possible

in the interface/vchi directory

Signed-off-by: Aymen Qader <qader.aymen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vc04_services: Fix "space prohibited"
Aymen Qader [Mon, 24 Sep 2018 17:35:44 +0000 (18:35 +0100)]
staging: vc04_services: Fix "space prohibited"

This patch fixes the checkpatch.pl error:

ERROR: space prohibited after/before that open/closed parenthesis

in the interface/vchi directory.

Signed-off-by: Aymen Qader <qader.aymen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vc04_services: Remove unused vchiq_genversion script
Tuomas Tynkkynen [Fri, 21 Sep 2018 19:56:01 +0000 (22:56 +0300)]
staging: vc04_services: Remove unused vchiq_genversion script

As far as I can tell, this has never been used.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging/vc04_services: Use correct cache line size
Phil Elwell [Mon, 17 Sep 2018 08:22:21 +0000 (09:22 +0100)]
staging/vc04_services: Use correct cache line size

Use the compatible string in the DTB to select the correct cache line
size for the SoC - 32 for BCM2835, and 64 for BCM2836 and BCM2837.

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoDocumentation: filesystems: remove reminiscences of POHMELFS
Vladimir Zapolskiy [Wed, 12 Sep 2018 12:44:19 +0000 (15:44 +0300)]
Documentation: filesystems: remove reminiscences of POHMELFS

The POHMELFS filesystem was removed in 2012 by commit 67435319866f8
("staging: pohmelfs: remove drivers/staging/pohmelfs") promising that
a newer version will be included to the kernel, but unfortunately
it didn't happen.

Since likely any delopment of the filesystem is halted, the change removes
the abandoned POHMELFS documentation from the kernel tree.

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: clean function definitions - style
Michael Straube [Wed, 19 Sep 2018 20:40:01 +0000 (22:40 +0200)]
staging: rtl8188eu: clean function definitions - style

Do not line break function definitions where not needed and
move the return type to the same line.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: rename parameter of Hal_GetChnlGroup88E()
Michael Straube [Wed, 19 Sep 2018 20:40:00 +0000 (22:40 +0200)]
staging: rtl8188eu: rename parameter of Hal_GetChnlGroup88E()

Rename function parameter of Hal_GetChnlGroup88E() to avoid CamelCase.
pGroup -> group

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: change return type of Hal_GetChnlGroup88E()
Michael Straube [Wed, 19 Sep 2018 20:39:59 +0000 (22:39 +0200)]
staging: rtl8188eu: change return type of Hal_GetChnlGroup88E()

After the removal of code valid only for 5 GHz the function
Hal_GetChnlGroup88E returns always true.

Change the return type to void and remove the variable bIn24G.

Remove the tests for the return value and the variable bIn24G
from the only user Hal_ReadTxPowerInfo88E().

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: remove 5 GHz code from Hal_GetChnlGroup88E()
Michael Straube [Wed, 19 Sep 2018 20:39:58 +0000 (22:39 +0200)]
staging: rtl8188eu: remove 5 GHz code from Hal_GetChnlGroup88E()

Remove code valid only for 5 GHz from Hal_GetChnlGroup88E().
This addresses the below TODO item.

- find and remove remaining code valid only for 5 GHz. Most of the obvious
  ones have been removed, but things like channel > 14 still exist.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vboxvideo: Add vbox_bo_k[un]map helper functions
Hans de Goede [Tue, 18 Sep 2018 17:44:38 +0000 (19:44 +0200)]
staging: vboxvideo: Add vbox_bo_k[un]map helper functions

Add vbox_bo_k[un]map helper functions instead of having code directly
poking struct vbox_bo internals.

While touch neighboring code anyways also fix a return -PTR_ERR(info),
which should be return PTR_ERR(info).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vboxvideo: Move bo_[un]resere calls into vbox_bo_[un]pin
Hans de Goede [Tue, 18 Sep 2018 17:44:37 +0000 (19:44 +0200)]
staging: vboxvideo: Move bo_[un]resere calls into vbox_bo_[un]pin

We always need to reserve the bo around a pin / unpin, so move the
reservation there.

This allows removing the vbox_fb_[un]pin helpers.

Note this means that we now no longer hold the bo reserved while
k[un]mapping it in vbox_fb.c this is fine as it is not necessary
to hold it reserved for this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vboxvideo: Fix NULL ptr deref in vbox_set_up_input_mapping()
Hans de Goede [Tue, 18 Sep 2018 17:44:36 +0000 (19:44 +0200)]
staging: vboxvideo: Fix NULL ptr deref in vbox_set_up_input_mapping()

When vbox_set_up_input_mapping() gets called the first crtc might be
disable and not have a fb at all, triggering a NUL ptr deref at:

vbox->input_mapping_width = CRTC_FB(crtci)->width;

Instead of using the fb from the crtc with id 0, just use the fb from
the first crtc with a fb. This is in the single_framebuffer = true path,
so all crtc-s point to the same fb anyways.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vboxvideo: Move pin / unpin of fb out of vbox_crtc_set_base_and_mode
Hans de Goede [Tue, 18 Sep 2018 17:44:35 +0000 (19:44 +0200)]
staging: vboxvideo: Move pin / unpin of fb out of vbox_crtc_set_base_and_mode

Move pin / unpin of fb out of vbox_crtc_set_base_and_mode() so that it can
be used to implement the atomic_update drm_plane_helper_func for the primary
plane.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vboxvideo: Init fb_info.fix.smem once from fbdev_create
Hans de Goede [Tue, 18 Sep 2018 17:44:34 +0000 (19:44 +0200)]
staging: vboxvideo: Init fb_info.fix.smem once from fbdev_create

The fbdev compat fb gets pinned into VRAM at creation and then gets pinned
a second time when set as scanout buffer and unpinned when replaced, this
means its pin count never becomes less then 1, so it is always at the same
address and there is no need for the vbox_fbdev_set_base() call.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vboxvideo: Expose creation of universal primary plane
Hans de Goede [Tue, 18 Sep 2018 17:44:33 +0000 (19:44 +0200)]
staging: vboxvideo: Expose creation of universal primary plane

Let's expose the primary plane initialization inside the vboxvideo driver
in preparation for universal planes and atomic.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vboxvideo: Add fl_flag argument to vbox_fb_pin() helper
Hans de Goede [Tue, 18 Sep 2018 17:44:32 +0000 (19:44 +0200)]
staging: vboxvideo: Add fl_flag argument to vbox_fb_pin() helper

Allow specifying where to pin the framebuffer bo, so that this helper can
be used from the cursor code too.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vboxvideo: Fold vbox_drm_resume() into vbox_pm_resume()
Hans de Goede [Tue, 18 Sep 2018 17:44:31 +0000 (19:44 +0200)]
staging: vboxvideo: Fold vbox_drm_resume() into vbox_pm_resume()

vbox_pm_resume() is the only caller of vbox_drm_resume(), so squash the
2 functions into 1.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vboxvideo: Embed drm_device into driver structure
Hans de Goede [Tue, 18 Sep 2018 17:44:30 +0000 (19:44 +0200)]
staging: vboxvideo: Embed drm_device into driver structure

This is the recommended way to create the drm_device structure,
according to DRM documentation.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vboxvideo: Fold driver_load/unload into probe/remove functions
Hans de Goede [Tue, 18 Sep 2018 17:44:29 +0000 (19:44 +0200)]
staging: vboxvideo: Fold driver_load/unload into probe/remove functions

Fold the driver_load / unload functions into the probe / remove functions
now that we are no longer using the deprecated drm_get_pci_dev() mechanism.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vboxvideo: Move setup of modesetting from driver_load to mode_init
Hans de Goede [Tue, 18 Sep 2018 17:44:28 +0000 (19:44 +0200)]
staging: vboxvideo: Move setup of modesetting from driver_load to mode_init

Move the setup of drm modesetting config from vbox_driver_load() to
vbox_mode_init().

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8712: replace licence header with SPDX licence id
André Lehmann [Wed, 19 Sep 2018 20:40:09 +0000 (22:40 +0200)]
staging: rtl8712: replace licence header with SPDX licence id

fixed warning found by checkpatch

Signed-off-by: André Lehmann <lenneman@web.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vboxvideo: Let DRM core handle connector registering
Hans de Goede [Tue, 18 Sep 2018 17:44:27 +0000 (19:44 +0200)]
staging: vboxvideo: Let DRM core handle connector registering

Registering the connector explicitly right after creation is not necessary
for modesetting drivers, because drm_dev_register already takes care of
this on the core side, by calling drm_modeset_register_all.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: olpc_dcon: add a missing dependency
Lubomir Rintel [Tue, 18 Sep 2018 12:36:20 +0000 (14:36 +0200)]
staging: olpc_dcon: add a missing dependency

  WARNING: unmet direct dependencies detected for BACKLIGHT_CLASS_DEVICE
    Depends on [n]: HAS_IOMEM [=y] && BACKLIGHT_LCD_SUPPORT [=n]
    Selected by [y]:
    - FB_OLPC_DCON [=y] && STAGING [=y] && X86 [=y] && OLPC [=y] && FB [=y]
                        && I2C [=y] && (GPIO_CS5535 [=n] || GPIO_CS5535 [=n]=n)

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-mmc: Delete IRQ_MSG() and its users
Nishad Kamdar [Wed, 19 Sep 2018 17:17:19 +0000 (22:47 +0530)]
staging: mt7621-mmc: Delete IRQ_MSG() and its users

This patch removes IRQ_MSG() and its users as currently it is a no-op.

Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: erofs: option validation in remount
Chengguang Xu [Wed, 19 Sep 2018 14:53:46 +0000 (22:53 +0800)]
staging: erofs: option validation in remount

Add option validation in remount. After this patch, remount
can change recognized options, and for unknown options remount
will fail and report error.

Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Reviewed-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: erofs: code cleanup for erofs_show_options()
Chengguang Xu [Wed, 19 Sep 2018 14:53:45 +0000 (22:53 +0800)]
staging: erofs: code cleanup for erofs_show_options()

Add new helper erofs_get_fault_rate() to get fault rate instead of
directly getting it from sbi, so we can remove the macro check
surrounding it.

Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Reviewed-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: erofs: code cleanup for option parsing of fault_injection
Chengguang Xu [Wed, 19 Sep 2018 14:53:44 +0000 (22:53 +0800)]
staging: erofs: code cleanup for option parsing of fault_injection

Define a dummpy function of erofs_build_fault_attr() when macro
CONFIG_EROFS_FAULT_INJECTION is disabled, so that we don't have to
check the macro in calling place. Based on above adjustment,
do proper code cleanup for option parsing of fault_injection.

Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Reviewed-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: erofs: simplify return value of `xattr_foreach'
Gao Xiang [Wed, 19 Sep 2018 05:49:10 +0000 (13:49 +0800)]
staging: erofs: simplify return value of `xattr_foreach'

As Dan Carpenter pointed out, there is no need to propagate positive
return values back to its callers.

Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: erofs: add some comments for xattr subsystem
Gao Xiang [Wed, 19 Sep 2018 05:49:09 +0000 (13:49 +0800)]
staging: erofs: add some comments for xattr subsystem

As Dan Carpenter pointed out, it is better to document what
return values of these callbacks in `struct xattr_iter_handlers'
mean and why it->ofs is increased regardless of success or
failure in `xattr_foreach'.

Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>