Commit Graph

871115 Commits

Author SHA1 Message Date
Michael Hennerich 91d6f911b3 staging: fbtft: fbtft-core: Fix last line displayed on fbcon
For the special case when fbtft_mkdirty() is called with with -1 for the y
coordinate, the height is truncated by 1.

This isn't required, and causes the last line to not update.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Link: https://lore.kernel.org/r/20191011112441.31003-1-alexandru.ardelean@analog.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-13 10:00:35 +02:00
Jules Irenge f152f52c30 staging: vc04_services: place the AND operator at the end of the previous line
Place the AND logical operator at the end of the previous line;
to fix warning of "Logical continuations should be on the previous line".
 Issue detected by checkpatch tool.

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Link: https://lore.kernel.org/r/20191012151805.17988-1-jbi.octave@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-13 10:00:34 +02:00
Wambui Karuga 850d80a2d8 staging: isdn: remove assignment in if conditionals
Remove variable assignment in if statements in
drivers/staging/isdn/avm/b1.c.
Issues reported by checkpatch.pl as:
ERROR: do not use assignment in if condition

Also refactor code around some if statements to remove comparisons
to NULL and unnecessary braces in single statement blocks.

Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
Link: https://lore.kernel.org/r/20191011072044.7022-1-wambui.karugax@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-11 11:09:10 +02:00
Jules Irenge db4b23d5a8 staging: qlge: fix comparison to NULL warning
Fix comparison to NULL by replacing with !ptr instead.
 Issue detected by checkpatch.

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Link: https://lore.kernel.org/r/20191010214006.23677-4-jbi.octave@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-11 11:07:28 +02:00
Jules Irenge e311f25e18 staging: qlge: add space to fix check warning
Add space to fix warning of preferred space near the division operator
 issue detected by checkpatch.

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Link: https://lore.kernel.org/r/20191010214006.23677-3-jbi.octave@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-11 11:07:28 +02:00
Jules Irenge b883582d73 staging: qlge: Fix multiple assignments warning by replacing integer variables to bool
Fix multiple assignments warning " check
 issue detected by checkpatch tool:
"CHECK: multiple assignments should be avoided".

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Link: https://lore.kernel.org/r/20191010214006.23677-2-jbi.octave@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-11 11:07:27 +02:00
Jules Irenge a8bfbd7cf3 staging: qlge: fix "alignment should match open parenthesis" checks
Fix "alignment should mactch open parenthesis" checks
 issued by checkpatch.pl tool:
"CHECK: Alignment should match open parenthesis".

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Link: https://lore.kernel.org/r/20191010214006.23677-1-jbi.octave@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-11 11:07:27 +02:00
Jules Irenge 52c4326a56 staging: qlge: correct a misspelled word
Fix a misspelling of "several" detected by checkpatch

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Link: https://lore.kernel.org/r/20191010172114.12345-1-jbi.octave@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-11 11:06:00 +02:00
YueHaibing 0fa79a78b1 staging: rtl8723bs: Remove unnecessary null check
Null check before kfree is redundant, so remove it.
This is detected by coccinelle.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20191010153325.16836-1-yuehaibing@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-11 11:05:59 +02:00
Wambui Karuga 2e821be220 staging: rtl8723bs: Remove unnecessary blank lines
Remove multiple blank lines in
drivers/staging/rtl8723bs/core/rtw_mlme.c.
Issues reported by checkpatch.pl as:
CHECK: Please don't use multiple blank lines

Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
Link: https://lore.kernel.org/r/50abec172689dfa413437589745032d678b82d04.1570712632.git.wambui.karugax@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-11 11:05:59 +02:00
Wambui Karuga e7e12d6650 staging: rtl8723bs: Remove comparisons to booleans in conditionals.
Remove comparisons to true and false in multiple if statements in
drivers/staging/rtl8723bs/core/rtw_mlme.c
Issues reported by checkpatch.pl as:
CHECK: Using comparison to false is error prone
CHECK: Using comparison to true is error prone

Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
Link: https://lore.kernel.org/r/d97eaa803566c15a2658df10cf2ca77acddea7fb.1570712632.git.wambui.karugax@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-11 11:05:59 +02:00
Wambui Karuga 92f87db5a9 staging: rtl8723bs: Remove unnecessary braces for single statements
Clean up multiple unnecessary braces around single statement blocks in
drivers/staging/rtl8723bs/core/rtw_mlme.c
Issues reported by checkpatch.pl as:
WARNING: braces {} are not necessary for single statement blocks or
WARNING: braces {} are not necessary for any arm of this statement

Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
Link: https://lore.kernel.org/r/c459741e8dc51dc2283fc69f07ed947e2994d0e9.1570712632.git.wambui.karugax@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-11 11:05:58 +02:00
Wambui Karuga 409e833203 staging: rtl8723bs: Remove comparisons to NULL in conditionals
Remove most comparisons to NULL in conditionals in
drivers/staging/rtl8723bs/core/rtw_mlme.c
Issues reported by checkpatch.pl as:
CHECK: Comparison to NULL could be written

Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
Link: https://lore.kernel.org/r/f4752d3a49e02193ed7b47a353e18e56d94b5a68.1570712632.git.wambui.karugax@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-11 11:05:58 +02:00
Colin Ian King d13cf9eae4 staging: wfx: fix spelling mistake "non existant" -> "non-existent"
There is a spelling mistake in a dev_warn message. Fix it.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20191010095748.17047-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-10 12:47:31 +02:00
Nachammai Karuppiah 161ca4c0fe staging: vc04_services: Avoid NULL comparison
Remove NULL comparison. Issue found using checkpatch.pl

Signed-off-by: Nachammai Karuppiah <nachukannan@gmail.com>
Link: https://lore.kernel.org/r/1570589056-14386-1-git-send-email-nachukannan@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-10 11:01:05 +02:00
YueHaibing 039f8b21d1 staging: emxx_udc: use devm_platform_ioremap_resource() to simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20191009150535.6412-1-yuehaibing@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-10 11:00:59 +02:00
YueHaibing f595f03bfd staging: clocking-wizard: use devm_platform_ioremap_resource() to simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20191009150427.10852-1-yuehaibing@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-10 11:00:59 +02:00
Wambui Karuga fbf12784d3 staging: octeon: Fix incorrect type in assignment
Fix the following warning generated by sparse in
drivers/staging/octeon/ethernet-tx.c:

drivers/staging/octeon/ethernet-tx.c:563:50: warning: incorrect type in assignment (different base types)
drivers/staging/octeon/ethernet-tx.c:563:50:    expected unsigned short [usertype] hw_chksum
drivers/staging/octeon/ethernet-tx.c:563:50:    got restricted __wsum [usertype] csum

Warning generated by running:
make C=2 CF="-D__CHECK_ENDIAN__" drivers/staging/octeon/

Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
Link: https://lore.kernel.org/r/20191010043815.14027-1-wambui.karugax@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-10 11:00:59 +02:00
Wambui Karuga 06f9c65a8d staging: rtl8712: Align function arguments with opening paranthesis
Fixes checkpatch.pl "CHECK Alignment should match open parenthesis"
on drivers/staging/rtl8712/rtl8712_recv.c:122

Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
Link: https://lore.kernel.org/r/20191008195350.20544-1-wambui.karugax@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-10 11:00:59 +02:00
Javier F. Arias ac478ce773 staging: rtl8723bs: Fix style in definitions
Fix the style in definitions where commented code was previously
removed for an improved code readability.

Signed-off-by: Javier F. Arias <jarias.linux@gmail.com>
Link: https://lore.kernel.org/r/fc488562c0ddf3fa8a59e86be9b33506496ccd0c.1570672544.git.jarias.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-10 10:56:51 +02:00
Javier F. Arias 042e9a6857 staging: rtl8723bs: Remove space before tabs
Remove space before tabs to fix checkpatch warning.
Issue found by checkpatch.

Signed-off-by: Javier F. Arias <jarias.linux@gmail.com>
Link: https://lore.kernel.org/r/120800f884986092ca757235781d9ddc740ec832.1570672544.git.jarias.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-10 10:56:51 +02:00
Javier F. Arias 5bb48864d3 staging: rtl8723bs: Remove duplicate blank lines
Remove duplicate blank lines.

Signed-off-by: Javier F. Arias <jarias.linux@gmail.com>
Link: https://lore.kernel.org/r/cdc1899acadc436c2f0247ded9ec2a8b3423350e.1570672544.git.jarias.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-10 10:56:51 +02:00
Javier F. Arias 26752254fa staging: rtl8723bs: Remove commented code
Remove commented code for a cleaner file.
Issue found by checkpatch.

Signed-off-by: Javier F. Arias <jarias.linux@gmail.com>
Link: https://lore.kernel.org/r/132126f0d04d5ca1129e9d682dfe9a535ec7bb39.1570672544.git.jarias.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-10 10:56:41 +02:00
Javier F. Arias c9ca79b3a5 staging: rtl8723bs: Fix incorrect type in declaration
Fix incorrect type in declaration to solve the warnings 'incorrect
type in argument 2' in the rtw_get_wpa_ie and rtw_get_wpa_ie function
calls, as both expect the same variable in argument 2 with the
type int *.
Issue found by Sparse.

Signed-off-by: Javier F. Arias <jarias.linux@gmail.com>
Link: https://lore.kernel.org/r/20191009231953.GA8774@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-10 10:55:49 +02:00
Javier F. Arias c44b23f51f staging: rtl8723bs: Add space between elements
Concatenated strings should use spaces between elements.
Issue found by checkpatch.

Signed-off-by: Javier F. Arias <jarias.linux@gmail.com>
Link: https://lore.kernel.org/r/a2387d4c10c2ed0cbca9d5c7ded424892452178f.1570577926.git.jarias.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-10 10:55:04 +02:00
Javier F. Arias af2f2c5e20 staging: rtl8723bs: Fix function call wrapping style
Fix the wrapping style used for the function call.
Issue found by checkpatch.

Signed-off-by: Javier F. Arias <jarias.linux@gmail.com>
Link: https://lore.kernel.org/r/f43f9295d7412d610e278be608fba6f2cc14cac9.1570577926.git.jarias.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-10 10:55:03 +02:00
Javier F. Arias a9ce2354f7 staging: rtl8723bs: Fix line over 80 characters
Break last two function call arguments into two separate lines.
Issue found by checkpatch.

Signed-off-by: Javier F. Arias <jarias.linux@gmail.com>
Link: https://lore.kernel.org/r/9a8f7b026780b3a7387c29f1d67a7c23d4b159eb.1570577926.git.jarias.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-10 10:55:03 +02:00
Hans de Goede 38c077d707 staging: rtl8723bs: Remove File operation APIs
rtl8723bs had 2 private file operation helpers:

rtw_is_file_readable()
rtw_retrive_from_file()

These were only used by the removed phy_Config*WithParaFile() functions,
so they can be removed now.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20191009123223.163241-5-hdegoede@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-10 10:51:20 +02:00
Hans de Goede 44bcfb27d2 staging: rtl8723bs: Remove rtw_merge_string() function
The phy_Config*WithParaFile() functions were the only user of this
function.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20191009123223.163241-4-hdegoede@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-10 10:51:19 +02:00
Hans de Goede 9d411eee43 staging: rtl8723bs: Remove phy_Config*WithParaFile() configuration leftovers
Now that the phy_Config*WithParaFile() functions have been removed nothing
is using these module-parameters and defines anymore.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20191009123223.163241-3-hdegoede@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-10 10:51:19 +02:00
Hans de Goede efe0b0a072 staging: rtl8723bs: Remove phy_Config*WithParaFile() functions
These are no longer used, so remove them and also remove various
struct definitions only used by these functions.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20191009123223.163241-2-hdegoede@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-10 10:51:19 +02:00
Hans de Goede 8c0c8b661b staging: rtl8723bs: Remove phy_Config*With*ParaFile() calls
The rtl8723bs driver tries to load various parameters from disk,
circumventing the standard firmware loader mechanism and using DIY
code for this.

No devices which run the mainline kernel ship with these files and even
if these files were present then they still would not be loaded without
additional module parameters. To be precise the following 3 conditions
must all 3 be true for on disk parameters to be used:

1) The rtw_load_phy_file modparam must contain the mask for the type, this
   defaults to(LOAD_BB_PG_PARA_FILE | LOAD_RF_TXPWR_LMT_PARA_FILE) so with
   the default settings this condition is only true for:
   phy_ConfigBBWithPgParaFile()
   PHY_ConfigRFWithPowerLimitTableParaFile(); and
2) rtw_phy_file_path modparam must be set to say "/lib/firmware/"; and
3) Store a /lib/firmware/rtl8723b/XXX file in the expected format.

In practice all 3 being true never happens, so the
phy_Config*With*ParaFile() calls are nops, remove them.

The actual code implementing them will be removed in a separate patch.

Note the ODM_ConfigRFWithHeaderFile() and ODM_ConfigBBWithHeaderFile()
functions always return HAL_STATUS_SUCCESS, this patch makes use of this
to simplify the new code without the phy_Config*With*ParaFile() calls.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20191009123223.163241-1-hdegoede@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-10 10:51:18 +02:00
zhengbin 348c59749f staging: rtl8723bs: Remove set but not used variable 'i'
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/staging/rtl8723bs/core/rtw_xmit.c: In function update_attrib:
drivers/staging/rtl8723bs/core/rtw_xmit.c:680:7: warning: variable i set but not used [-Wunused-but-set-variable]

It is not used since commit 554c0a3abf ("staging:
Add rtl8723bs sdio wifi driver")

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
Link: https://lore.kernel.org/r/1570578905-95675-1-git-send-email-zhengbin13@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-10 10:51:10 +02:00
Javier F. Arias a883d97fc5 staging: rtl8723bs: Remove space before tab
Fix warning by removing space before tab.

Signed-off-by: Javier F. Arias <jarias.linux@gmail.com>
Link: https://lore.kernel.org/r/20191008211557.iv3hdpbklgaddlt3@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-10 10:51:09 +02:00
Javier F. Arias cf490d84db staging: rtl8723bs: Replace string with identifier
Replace the hardcoded function name with its predefined identifier.

Signed-off-by: Javier F. Arias <jarias.linux@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Link: https://lore.kernel.org/r/20191008214851.p4w7cbpuldnwkne4@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-10 10:51:09 +02:00
Nachammai Karuppiah 2dac96b334 staging: rtl8723bs: core: Remove typecast in call to kfree
Remove typecast in the call to kfree as it is not needed.
Issue found using the below coccinelle script with options -I and
--recursive-includes,

@@
type t1;
expression *e;
@@

-kfree((t1 *)e);
+kfree(e);

Signed-off-by: Nachammai Karuppiah <nachukannan@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Link: https://lore.kernel.org/r/1570565858-91737-1-git-send-email-nachukannan@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-10 10:51:09 +02:00
zhengbin 8fd1fe824f staging: wfx: Make some functions static in sta.c
Fix sparse warnings:

drivers/staging/wfx/sta.c:269:6: warning: symbol 'wfx_update_filtering_work' was not declared. Should it be static?
drivers/staging/wfx/sta.c:475:6: warning: symbol 'wfx_event_handler_work' was not declared. Should it be static?
drivers/staging/wfx/sta.c:521:6: warning: symbol 'wfx_bss_loss_work' was not declared. Should it be static?
drivers/staging/wfx/sta.c:528:6: warning: symbol 'wfx_bss_params_work' was not declared. Should it be static?
drivers/staging/wfx/sta.c:539:6: warning: symbol 'wfx_set_beacon_wakeup_period_work' was not declared. Should it be static?
drivers/staging/wfx/sta.c:732:6: warning: symbol 'wfx_unjoin_work' was not declared. Should it be static?
drivers/staging/wfx/sta.c:794:6: warning: symbol 'wfx_set_cts_work' was not declared. Should it be static?
drivers/staging/wfx/sta.c🔢6: warning: symbol 'wfx_set_tim_work' was not declared. Should it be static?

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
Reviewed-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/1570629030-29888-4-git-send-email-zhengbin13@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-10 10:47:13 +02:00
zhengbin dc3d13fba4 staging: wfx: Make function 'wfx_tx_queue_get' static
Fix sparse warnings:

drivers/staging/wfx/queue.c:218:16: warning: symbol 'wfx_tx_queue_get' was not declared. Should it be static?

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
Reviewed-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/1570629030-29888-3-git-send-email-zhengbin13@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-10 10:47:12 +02:00
zhengbin 7638621da7 staging: wfx: Make function 'sram_write_dma_safe', 'load_firmware_secure' static
Fix sparse warnings:

drivers/staging/wfx/fwio.c:83:5: warning: symbol 'sram_write_dma_safe' was not declared. Should it be static?
drivers/staging/wfx/fwio.c:229:5: warning: symbol 'load_firmware_secure' was not declared. Should it be static?

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
Reviewed-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/1570629030-29888-2-git-send-email-zhengbin13@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-10 10:47:12 +02:00
Colin Ian King 0bb0dff0cc staging: wfx: fix swapped arguments in memset call
The memset appears to have the 2nd and 3rd arguments in the wrong
order, fix this by swapping these around into the correct order.

Addresses-Coverity: ("Memset fill truncated")
Fixes: 4f8b7fabb1 ("staging: wfx: allow to send commands to chip")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20191009094602.19663-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-10 10:46:26 +02:00
Wambui Karuga c0981afd8c staging: kpc2000: Remove unnecessary return variable
Remove unnecessary variable `val` in kp_spi_read_reg() that only holds
the return value from readq().
Issue found by coccinelle using the script:

@@
local idexpression ret;
expression e;
@@

-ret =
+return
     e;
-return ret;

Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Link: https://lore.kernel.org/r/20191009170703.GA2869@wambui
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-10 10:44:50 +02:00
zhengbin d49d1c76b9 staging: comedi: Remove set but not used variable 'aref'
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/staging/comedi/drivers/dt3000.c: In function dt3k_ai_insn_read:
drivers/staging/comedi/drivers/dt3000.c:511:27: warning: variable aref set but not used [-Wunused-but-set-variable]

It is not used since commit 2e310235ca ("staging:
comedi: dt3000: rename dt3k_ai_insn()")

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://lore.kernel.org/r/1570520515-2186-7-git-send-email-zhengbin13@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-08 17:15:23 +02:00
Matteo Croce 82d20bc508 staging: vchiq: don't print pointless kernel address
Since commit ad67b74d24 ("printk: hash addresses printed with %p"),
an obfuscated kernel pointer is printed at boot:

    vchiq: vchiq_init_state: slot_zero = (____ptrval____)

Remove the the print completely, as it's useless without the address.

Signed-off-by: Matteo Croce <mcroce@redhat.com>
Link: https://lore.kernel.org/r/20191008123346.3931-1-mcroce@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-08 17:15:05 +02:00
zhengbin 3740b63515 staging: sm750fb: Remove set but not used variable 'actual_mx_clk'
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/staging/sm750fb/ddk750_chip.c: In function set_chip_clock:
drivers/staging/sm750fb/ddk750_chip.c:59:15: warning: variable actual_mx_clk set but not used [-Wunused-but-set-variable]

It is not used since commit f0977109a5 ("staging:
sm750fb: lower case to fix camelcase checkpatch warning")

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/1570520515-2186-4-git-send-email-zhengbin13@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-08 14:52:56 +02:00
zhengbin 66bc9cde24 staging: sm750fb: Remove set but not used variable 'uiActualPixelClk'
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/staging/sm750fb/ddk750_mode.c: In function ddk750_setModeTiming:
drivers/staging/sm750fb/ddk750_mode.c:212:15: warning: variable uiActualPixelClk set but not used [-Wunused-but-set-variable]

It is not used since commit 81dee67e21 ("staging:
sm750fb: add sm750 to staging")

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/1570520515-2186-3-git-send-email-zhengbin13@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-08 14:52:56 +02:00
zhengbin 5193dbdaf0 staging: bcm2835-audio: Need to judge the return value of vchi_msg_dequeue in audio_vchi_callback
If vchi_msg_dequeue return -1, variable m is not assigined,
need to return.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/1570520515-2186-2-git-send-email-zhengbin13@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-08 14:52:55 +02:00
Paul Burton 17a29fea08 staging/octeon: Use stubs for MIPS && !CAVIUM_OCTEON_SOC
When building for a non-Cavium MIPS system with COMPILE_TEST=y, the
Octeon ethernet driver hits a number of issues due to use of macros
provided only for CONFIG_CAVIUM_OCTEON_SOC=y configurations. For
example:

  drivers/staging/octeon/ethernet-rx.c:190:6: error:
    'CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE' undeclared (first use in this function)
  drivers/staging/octeon/ethernet-rx.c:472:25: error:
    'OCTEON_IRQ_WORKQ0' undeclared (first use in this function)

These come from various asm/ headers that a non-Octeon build will be
using a non-Octeon version of.

Fix this by using the octeon-stubs.h header for non-Cavium MIPS builds,
and only using the real asm/octeon/ headers when building a Cavium
Octeon kernel configuration.

This requires that octeon-stubs.h doesn't redefine XKPHYS_TO_PHYS, which
is defined for MIPS by asm/addrspace.h which is pulled in by many other
common asm/ headers.

Signed-off-by: Paul Burton <paul.burton@mips.com>
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
URL: https://lore.kernel.org/linux-mips/CAMuHMdXvu+BppwzsU9imNWVKea_hoLcRt9N+a29Q-QsjW=ip2g@mail.gmail.com/
Fixes: 171a9bae68 ("staging/octeon: Allow test build on !MIPS")
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: David S. Miller <davem@davemloft.net>

Link: https://lore.kernel.org/r/20191007231741.2012860-1-paul.burton@mips.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-08 14:50:15 +02:00
Nachammai Karuppiah a30b30f004 staging: rtl8723bs: os_dep: Remove typecast in kfree
Remove typecast in the call to kfree as it is not needed.
Issue found using the below coccinelle script,

@@
type t1;
expression e;
@@

-kfree((t1 *)e);
+kfree(e);

Signed-off-by: Nachammai Karuppiah <nachukannan@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Link: https://lore.kernel.org/r/1570511353-64646-1-git-send-email-nachukannan@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-08 14:48:42 +02:00
Javier F. Arias c67855589c staging: rtl8723bs: Remove commented code
Remove commented code for a cleaner file. Issue found by checkpatch.

Signed-off-by: Javier F. Arias <jarias.linux@gmail.com>
Link: https://lore.kernel.org/r/20191008025221.q4j4igctqjowur2s@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-08 14:48:42 +02:00
Antonio Borneo f806c4d557 staging: rtl8723bs: fix typo of "mechanism" in comment
Fix typo s/mechansim/mechanism/

Signed-off-by: Antonio Borneo <antonio.borneo@st.com>
Link: https://lore.kernel.org/r/20191007154306.95827-2-antonio.borneo@st.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-08 14:48:42 +02:00