Philipp Hortmann [Tue, 18 Apr 2023 20:02:01 +0000 (22:02 +0200)]
staging: rtl8192e: Fix W_DISABLE# does not work after stop/start
When loading the driver for rtl8192e, the W_DISABLE# switch is working as
intended. But when the WLAN is turned off in software and then turned on
again the W_DISABLE# does not work anymore. Reason for this is that in
the function _rtl92e_dm_check_rf_ctrl_gpio() the bfirst_after_down is
checked and returned when true. bfirst_after_down is set true when
switching the WLAN off in software. But it is not set to false again
when WLAN is turned on again.
Add bfirst_after_down = false in _rtl92e_sta_up to reset bit and fix
above described bug.
Fixes: 94a799425eee ("From: wlanfae <wlanfae@realtek.com> [PATCH 1/8] rtl8192e: Import new version of driver from realtek")
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230418200201.GA17398@matrix-ESPRIMO-P710
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sun, 16 Apr 2023 07:20:25 +0000 (09:20 +0200)]
staging: rtl8192e: Remove unchanged variables bfsync_processing and more
Remove unchanged variable bfsync_processing and
rfc_txpowertrackingindex_real to shorten code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/cb609f904d988febaa579526514586877b1dabf7.1681627603.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sun, 16 Apr 2023 07:20:19 +0000 (09:20 +0200)]
staging: rtl8192e: Remove unchanged variable frame_sync_monitor
Remove unchanged variable frame_sync_monitor and equations that have
always the same result to shorten code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/0c4bdca5f5dbb93bb05c6b7f32136d4dfb3b0e4b.1681627603.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sun, 16 Apr 2023 07:20:12 +0000 (09:20 +0200)]
staging: rtl8192e: Remove unchanged variable chan_forced
Remove unchanged variable chan_forced and equations that have always the
same result to shorten code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/3f218531a9d31c399d1351d3da7f9ca13d20df0c.1681627603.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sun, 16 Apr 2023 07:20:06 +0000 (09:20 +0200)]
staging: rtl8192e: Remove set to true while true of bfirst_after_down
Remove set to true while true of bfirst_after_down to shorten code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/053ab341e80909e81867e42ec4c077e76b762051.1681627603.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sun, 16 Apr 2023 07:19:58 +0000 (09:19 +0200)]
staging: rtl8192e: Remove second initialization of bActuallySet
Remove second initialization of bActuallySet to shorten code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/ebf51fbd56bad4f8fd7fb51fe031f376c3ab6d2c.1681627603.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sun, 16 Apr 2023 07:19:52 +0000 (09:19 +0200)]
staging: rtl8192e: Remove unused macro RT_SET_PS_LEVEL
Remove unused macro RT_SET_PS_LEVEL to shorten code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/0d397210830f77ad3231c3b4a0465ae89aacb962.1681627603.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sun, 16 Apr 2023 07:19:45 +0000 (09:19 +0200)]
staging: rtl8192e: Remove unused function rtl92e_disable_nic
Remove unused function rtl92e_disable_nic to shorten code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/5ce2ef58f66e25d7db7432c56c7b7c37a2b15fc1.1681627603.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sun, 16 Apr 2023 07:19:37 +0000 (09:19 +0200)]
staging: rtl8192e: Remove unchanged variable RegRfPsLevel
Remove unchanged variable RegRfPsLevel and equations that have always the
same result to shorten code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/49162b0041db33c6c43c4126839baed69c76cb89.1681627603.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Srihari S [Sat, 8 Apr 2023 15:16:23 +0000 (20:46 +0530)]
staging: rtl8172: Add blank lines after declarations
Add blank lines as reported by checkpatch.pl as below
CHECK: Please use a blank line after function/struct/union/enum declarations
Signed-off-by: Srihari S <sriharisat@gmail.com>
Link: https://lore.kernel.org/r/1680966983-11609-1-git-send-email-sriharisat@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Fri, 7 Apr 2023 21:50:41 +0000 (23:50 +0200)]
staging: rtl8192e: Remove unused variable RF_Type
Remove unused variable RF_Type.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/7710a87f627dcfd2d0c34f14f583625ffab10660.1680902603.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Fri, 7 Apr 2023 21:50:34 +0000 (23:50 +0200)]
staging: rtl8192e: Remove one of two checks for hardware RTL8192SE
Check for hardware RTL8192SE is done in function _rtl92e_pci_probe()
directly and also two lines later in function rtl92e_check_adapter().
Remove top level check to increase readability.
This pci_read does not follow a pci_write to ensure data is written to
the device.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/4126cca73739c75b1a0379af2ef8b0c63a705639.1680902603.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Fri, 7 Apr 2023 21:50:28 +0000 (23:50 +0200)]
staging: rtl8192e: Remove unused function _rtl92e_dm_init_wa_broadcom_iot
Remove unused function _rtl92e_dm_init_wa_broadcom_iot and the variables
that are not any longer used.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/0e7a2a5b9edc85b7f8e3fc0f9e0e6ab7f2830d02.1680902603.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Fri, 7 Apr 2023 21:50:21 +0000 (23:50 +0200)]
staging: rtl8192e: Remove macro IS_HARDWARE_TYPE_8192SE
Remove unused macro IS_HARDWARE_TYPE_8192SE as it is used only in code
areas that are not executed when 8192SE hardware is found.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/e9b19862ace002462e870e62c6f62bab3cc81c5a.1680902603.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Thu, 6 Apr 2023 08:18:16 +0000 (10:18 +0200)]
staging: greybus: drop loopback test files
The greybus loopback test tool does not belong burried down in a
driver-specific directory. If it is needed, it should be somewhere
else, like in the testing directory. But as the loopback driver is
probably never going to be merged out of the staging directory, let's
just delete the test alltogether for now. If it's needed in the future,
it can be brought back with a revert.
Also, having an Android.mk file in the kernel source tree breaks some
Android build systems when trying to build from a read-only source tree,
the report of which prompted this being a good reason to remove it as
well.
Cc: Johan Hovold <johan@kernel.org>
Cc: Jack Schofield <schofija@oregonstate.edu>
Cc: Vaibhav Nagare <vnagare@redhat.com>
Cc: greybus-dev@lists.linaro.org
Acked-by: Alex Elder <elder@linaro.org>
Link: https://lore.kernel.org/r/2023040613-huntsman-goldsmith-4a41@gregkh
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sumitra Sharma [Wed, 5 Apr 2023 06:30:03 +0000 (23:30 -0700)]
staging: rtl8192e: Add blank lines after declarations
Add blank lines after declarations to adhere to the Linux kernel
coding-style. Check reported by checkpatch.pl
"CHECK: Please use a blank line after function/struct/union/enum
declarations"
Signed-off-by: Sumitra Sharma <sumitraartsy@gmail.com>
Link: https://lore.kernel.org/r/20230405063003.GA218972@sumitra.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Khadija Kamran [Sun, 2 Apr 2023 14:32:46 +0000 (19:32 +0500)]
staging: rtl8192e: avoid CamelCase <dot11RSNAStatsCCMPDecryptErrors>
Linux kernel coding-style suggests to not use mixed-case names. Fix
checkpatch issue by changing the variable name from camel case to snake
case.
Signed-off-by: Khadija Kamran <kamrankhadijadj@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/d29ff5db6f19d79ee762a835db88155bee2aefba.1680445545.git.kamrankhadijadj@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Khadija Kamran [Sun, 2 Apr 2023 14:32:45 +0000 (19:32 +0500)]
staging: rtl8192e: avoid CamelCase <dot11RSNAStatsCCMPReplays>
Linux kernel coding-style suggests to not use mixed-case names. Fix
checkpatch issue by changing the variable name from camel case to snake
case.
Signed-off-by: Khadija Kamran <kamrankhadijadj@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/7166160c0face9e32dbb28c44727eb8856173f0a.1680445545.git.kamrankhadijadj@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Khadija Kamran [Sun, 2 Apr 2023 14:32:44 +0000 (19:32 +0500)]
staging: rtl8192e: avoid CamelCase <dot11RSNAStatsCCMPFormatErrors>
Linux kernel coding-style suggests to not use mixed-case names. Fix
checkpatch issue by changing the variable name from camel case to snake
case.
Signed-off-by: Khadija Kamran <kamrankhadijadj@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/ebfd9c40400eac872b9af2a5120b0829ff71e077.1680445545.git.kamrankhadijadj@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Khadija Kamran [Sun, 2 Apr 2023 14:32:43 +0000 (19:32 +0500)]
staging: rtl8192e: fix alignment to match open parenthesis
Fix alignemnt to match opening parenthesis as suggested by Linux kernel
coding-style. This issue is reported by checkpatch.
Signed-off-by: Khadija Kamran <kamrankhadijadj@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/76814f7a2a026ef195334b0c42ecd2aeb8e8ea40.1680445545.git.kamrankhadijadj@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Khadija Kamran [Sun, 2 Apr 2023 14:32:42 +0000 (19:32 +0500)]
staging: rtl8192e: remove extra blank lines in rtllib_crypt_ccmp.c
Remove extra blank lines as suggested by the Linux kernel coding-style.
These issues were reported by checkpatch.
"CHECK: Please don't use multiple blank lines"
Signed-off-by: Khadija Kamran <kamrankhadijadj@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/283265f6a5ff938f8425e14af86cee9e2da36318.1680445545.git.kamrankhadijadj@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sun, 2 Apr 2023 09:52:13 +0000 (11:52 +0200)]
staging: rtl8192e: Remove case customer_id = RT_CID_DEFAULT, ..
customer_id is initialize to zero. Changing customer_id to RT_CID_DEFAULT
will not change customer_id as it is already zero. default and
EEPROM_CID_WHQL contain only a break. Remove useless code lines to
increase readability.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/58df9db5da84991206266e739b2a12c893d1be8e.1680427945.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sun, 2 Apr 2023 09:52:05 +0000 (11:52 +0200)]
staging: rtl8192e: Remove case customer_id = RT_CID_819x_CAMEO, ..
customer_id is initialize to zero. Changing customer_id to
RT_CID_819x_CAMEO, RT_CID_819x_RUNTOP, RT_CID_Nettronix or RT_CID_PRONET
would not change the program execution as there is no equation for
RT_CID_819x_CAMEO, RT_CID_819x_RUNTOP, RT_CID_Nettronix or RT_CID_PRONET.
Remove useless code lines to increase readability.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/b546933897acc20a6ac5be2bd5ef5ad979599c66.1680427945.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sun, 2 Apr 2023 09:51:59 +0000 (11:51 +0200)]
staging: rtl8192e: Remove case customer_id = RT_CID_DLINK
customer_id is initialize to zero. Changing customer_id to RT_CID_DLINK
would not change the program execution as there is no equation for
RT_CID_DLINK. Remove useless code lines to increase readability.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/e4ecef11015c32c9909cd07e0939c4de53fd501a.1680427945.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sun, 2 Apr 2023 09:51:54 +0000 (11:51 +0200)]
staging: rtl8192e: Remove local variable Value and powerlevelOFDM24G
powerlevelOFDM24G is set to priv->pwr_track. Then Value is set to
powerlevelOFDM24G and then only once used. Remove both variables to
increase readability.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/2076dc2f8f5afc11cbab23bc3f5d4ace9bf33bfd.1680427945.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sun, 2 Apr 2023 09:51:47 +0000 (11:51 +0200)]
staging: rtl8192e: Remove enum RF_1T2R and RF_Type
enum RF_1T2R is used to initialize a local variable RF_Type that is then
shifted. The result of the shift is zero. Remove code that has always
the same result to increase readability.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/6c29e709f5c328703870ca8e7d61ee6338886fa7.1680427945.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sun, 2 Apr 2023 09:51:42 +0000 (11:51 +0200)]
staging: rtl8192e: Remove RF_Type from .._dm_tx_update_tssi_weak_signal
Remove RF_Type from _rtl92e_dm_tx_update_tssi_weak_signal and
_rtl92e_dm_tx_update_tssi_strong_signal as it is unused.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/95744a9d271723b44b92465809d092f90edf9bc9.1680427945.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Daniel Watson [Fri, 31 Mar 2023 23:00:24 +0000 (16:00 -0700)]
staging: rtl8723bs: indent with tab, align with space
Use tabs to indent code and spaces to align in order to make the code
consistent and easier to read.
Signed-off-by: Daniel Watson <ozzloy@gmail.com>
Link: https://lore.kernel.org/r/ZCdmCBIdabBGqm11@trent-reznor
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Lukas Bulwahn [Wed, 29 Mar 2023 07:43:42 +0000 (09:43 +0200)]
staging: vme: clean up duplicate definitions of dependencies
The file staging/vme_user/Kconfig is only included by the top-level
staging/Kconfig if STAGING is enabled. So, there is no need to mention the
dependency on STAGING within the vme_user Kconfig file. Further, the config
VME_USER is already within the "if VME_BUS" block, so there is no need to
mention the dependency on VME_BUS.
Clean up these duplications of dependencies. No semantic change.
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Link: https://lore.kernel.org/r/20230329074342.27595-1-lukas.bulwahn@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Uwe Kleine-König [Mon, 3 Apr 2023 15:40:14 +0000 (17:40 +0200)]
staging: vc04_services: vchiq_arm: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.
Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230403154014.2564054-25-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Uwe Kleine-König [Mon, 3 Apr 2023 15:40:13 +0000 (17:40 +0200)]
staging: vc04_services: bcm2835-camera: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.
Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230403154014.2564054-24-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Uwe Kleine-König [Mon, 3 Apr 2023 15:40:12 +0000 (17:40 +0200)]
staging: octeon: ethernet: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.
Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230403154014.2564054-23-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Uwe Kleine-König [Mon, 3 Apr 2023 15:40:11 +0000 (17:40 +0200)]
staging: nvec_ps2: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.
Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230403154014.2564054-22-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Uwe Kleine-König [Mon, 3 Apr 2023 15:40:10 +0000 (17:40 +0200)]
staging: nvec_power: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.
Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230403154014.2564054-21-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Uwe Kleine-König [Mon, 3 Apr 2023 15:40:09 +0000 (17:40 +0200)]
staging: nvec: nvec_kbd: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.
Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230403154014.2564054-20-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Uwe Kleine-König [Mon, 3 Apr 2023 15:40:08 +0000 (17:40 +0200)]
staging: nvec: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.
Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230403154014.2564054-19-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Uwe Kleine-König [Mon, 3 Apr 2023 15:40:07 +0000 (17:40 +0200)]
staging: most: dim2: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.
Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230403154014.2564054-18-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Uwe Kleine-König [Mon, 3 Apr 2023 15:39:55 +0000 (17:39 +0200)]
staging: greybus: arche: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.
Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230403154014.2564054-6-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Uwe Kleine-König [Mon, 3 Apr 2023 15:39:54 +0000 (17:39 +0200)]
staging: greybus: arche-apb-ctrl: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.
Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230403154014.2564054-5-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Uwe Kleine-König [Mon, 3 Apr 2023 15:39:53 +0000 (17:39 +0200)]
staging: fieldbus: arcx-anybus: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.
Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230403154014.2564054-4-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Uwe Kleine-König [Mon, 3 Apr 2023 15:39:52 +0000 (17:39 +0200)]
staging: emxx_udc: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.
Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230403154014.2564054-3-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Uwe Kleine-König [Mon, 3 Apr 2023 15:39:51 +0000 (17:39 +0200)]
staging: axis-fifo: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.
Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230403154014.2564054-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Daniel Watson [Wed, 29 Mar 2023 00:29:58 +0000 (17:29 -0700)]
staging: rtl8723bs: conform if's braces to kernel style
Move the open brace of if-statements to the same line. This matches the
brace placement style described in the kernel's style guide.
Signed-off-by: Daniel Watson <ozzloy@gmail.com>
Link: https://lore.kernel.org/r/ZCOGhkLvLtBEo92Y@trent-reznor
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Khadija Kamran [Mon, 27 Mar 2023 22:00:57 +0000 (03:00 +0500)]
staging: rtl8192e: fix unbalanced braces around else
Balance if/else braces as recommended by checkpatch.pl
Signed-off-by: Khadija Kamran <kamrankhadijadj@gmail.com>
Link: https://lore.kernel.org/r/ZCISGaFELBfDyGRT@khadija-virtual-machine
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Khadija Kamran [Mon, 27 Mar 2023 19:49:09 +0000 (00:49 +0500)]
staging: rtl8192u: add '*/' on separate line in block comments
Linux kernel coding style uses '*/' on a separate line at the end of
multi line comments.
Fix block comments by moving '*/' at the end of block comments on a
separate line as reported by checkpatch.pl script.
Signed-off-by: Khadija Kamran <kamrankhadijadj@gmail.com>
Link: https://lore.kernel.org/r/140e0928531e61dc7396271a5b16a6be17514c76.1679945728.git.kamrankhadijadj@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Khadija Kamran [Mon, 27 Mar 2023 19:49:08 +0000 (00:49 +0500)]
staging: rtl8192u: add '*' on subsequent lines in block comment
Linux kernel coding style for block comments uses a column of '*' on the
left side.
Fix block comment by adding '*' on subsequent lines as reported by
checkatch.pl script.
Signed-off-by: Khadija Kamran <kamrankhadijadj@gmail.com>
Link: https://lore.kernel.org/r/3a581aae65a152ce41fdd2db667574eba1783113.1679945728.git.kamrankhadijadj@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Khadija Kamran [Mon, 27 Mar 2023 19:49:07 +0000 (00:49 +0500)]
staging: rtl8192u: remove commented out code
Remove all of the commented out code lines as they are not being used
and can be brought back in the future if they are ever needed again.
Signed-off-by: Khadija Kamran <kamrankhadijadj@gmail.com>
Link: https://lore.kernel.org/r/e5e2fabde70d497cc8b683ff444854299180812b.1679945728.git.kamrankhadijadj@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Khadija Kamran [Mon, 27 Mar 2023 19:49:06 +0000 (00:49 +0500)]
staging: rtl8192u: remove change history from comments
Remove the change history information as it is not required in the
comments.
Signed-off-by: Khadija Kamran <kamrankhadijadj@gmail.com>
Link: https://lore.kernel.org/r/95fff39231ebb2bb683c2a8f252a93f4845fffb1.1679945728.git.kamrankhadijadj@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Mon, 27 Mar 2023 21:03:14 +0000 (23:03 +0200)]
staging: rtl8192e: Remove wireless mode WIRELESS_MODE_N_5G
Remove WIRELESS_MODE_N_5G from equations as it is not supported by
hardware and to improve readability.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/fdefd4d706493fa3f080550d31eb5bea3f4e1a7e.1679949171.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Mon, 27 Mar 2023 21:03:06 +0000 (23:03 +0200)]
staging: rtl8192e: Remove wireless modes A, N_5G from rtl92e_set_channel
Remove WIRELESS_MODE_N_5G and WIRELESS_MODE_A as those are not supported
by hardware and to improve readability.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/aaaf832fe5f90ad2c618bef22c1bdbd5209c4359.1679949171.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Mon, 27 Mar 2023 21:02:57 +0000 (23:02 +0200)]
staging: rtl8192e: Remove wireless modes A, N_5G from _rtl92e_hwconfig
Remove WIRELESS_MODE_N_5G and WIRELESS_MODE_A as those are not supported
by hardware and to improve readability. Combine WIRELESS_MODE_G with
default to improve readability.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/ab96af426f090ac2fe4a2536b052fcf8a2e38aa8.1679949171.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Mon, 27 Mar 2023 21:02:51 +0000 (23:02 +0200)]
staging: rtl8192e: Remove unused if clauses in rtl92e_set_wireless_mode
Equation (support_mode & WIRELESS_MODE_N_24G) will always be true. Remove
resulting dead code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/359ed203ab08afe5c2f449f40d2958868b4e55b4.1679949171.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Mon, 27 Mar 2023 21:02:45 +0000 (23:02 +0200)]
staging: rtl8192e: Remove 5G wireless_mode in rtl92e_set_wireless_mode
Remove wireless_mode == WIRELESS_MODE_N_5G as 5G is not supported by
hardware and to improve readability.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/693a34b187f21d9d48accd3b0b953dff2f0795eb.1679949171.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Mon, 27 Mar 2023 21:02:37 +0000 (23:02 +0200)]
staging: rtl8192e: Remove _rtl92e_get_supported_wireless_mode
Remove _rtl92e_get_supported_wireless_mode to improve readability.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/f8470fff23d5870cbcda3d6f4978ba17016a8fe8.1679949171.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Mon, 27 Mar 2023 21:02:19 +0000 (23:02 +0200)]
staging: rtl8192e: Remove rtl92e_config_phy
Remove rtl92e_config_phy to improve readability.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/5c433417b4e8e96a70c23a03bec30d26e45791d0.1679949171.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sumitra Sharma [Mon, 27 Mar 2023 17:16:53 +0000 (10:16 -0700)]
staging: rtl8192e: remove extra blank lines
Remove the extra blank line in accordance with the Linux kernel
coding-style regulations. These issues were reported by checkpatch.pl
"CHECK: Please don't use multiple blank lines"
Signed-off-by: Sumitra Sharma <sumitraartsy@gmail.com>
Link: https://lore.kernel.org/r/20230327171653.GA188371@sumitra.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sumitra Sharma [Mon, 27 Mar 2023 17:13:51 +0000 (10:13 -0700)]
staging: rtl8192e: fix line ending with '('
Splitting function header to multiple lines because of 80 characters per
line limit, results in ending the function call line with '('.
This leads to CHECK reported by checkpatch.pl
Move the first parameter right after the '(' in the function call line.
Align the rest of the parameters to the opening parenthesis.
Signed-off-by: Sumitra Sharma <sumitraartsy@gmail.com>
Link: https://lore.kernel.org/r/20230327171351.GA188288@sumitra.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nuno Sá [Mon, 27 Mar 2023 14:54:14 +0000 (16:54 +0200)]
staging: iio: resolver: ads1210: fix config mode
As stated in the device datasheet [1], bits a0 and a1 have to be set to
1 for the configuration mode.
[1]: https://www.analog.com/media/en/technical-documentation/data-sheets/ad2s1210.pdf
Fixes: b19e9ad5e2cb9 ("staging:iio:resolver:ad2s1210 general driver cleanup")
Cc: stable <stable@kernel.org>
Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20230327145414.1505537-1-nuno.sa@analog.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sumitra Sharma [Sun, 26 Mar 2023 06:45:19 +0000 (23:45 -0700)]
staging: greybus: Inline pwm_chip_to_gb_pwm_chip()
Convert 'pwm_chip_to_gb_pwm_chip' from a macro to a static
inline function, to make the relevant types apparent in the
definition and to benefit from the type checking performed by
the compiler at call sites.
Signed-off-by: Sumitra Sharma <sumitraartsy@gmail.com>
Link: https://lore.kernel.org/r/20230326064519.GA179449@sumitra.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sat, 25 Mar 2023 13:28:23 +0000 (14:28 +0100)]
staging: rtl8192e: remove rf_type from struct r8192_priv
The field rf_type of struct r8192_priv is always RF_1T2R and only used
in one place. Use RF_1T2R directly there and remove rf_type from struct
r8192_priv.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230325132823.22872-5-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sat, 25 Mar 2023 13:28:22 +0000 (14:28 +0100)]
staging: rtl8192e: priv->rf_type is always RF_1T2R
The value of priv->rf_type is always RF_1T2R. Remove if statements
that check for priv->rf_type == RF_1T2R and remove resulting dead
code.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230325132823.22872-4-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sat, 25 Mar 2023 13:28:21 +0000 (14:28 +0100)]
staging: rtl8192e: remove redundant setting of rf_type
At this point the value of priv->rf_type is RF_1T2R already. Setting
it again is redundant and can be removed.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230325132823.22872-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sat, 25 Mar 2023 13:28:20 +0000 (14:28 +0100)]
staging: rtl8192e: remove RTL819X_DEFAULT_RF_TYPE
Remove RTL819X_DEFAULT_RF_TYPE and use RF_1T2R directly to make
follow up patches, which will remove priv->rf_type, easier to review.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230325132823.22872-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Abhirup Deb [Mon, 20 Mar 2023 18:42:50 +0000 (00:12 +0530)]
staging: vme_user: Replace "<<" with BIT macro
Replace the "<<" operator with BIT macro, in accordance to the
checkpatch.pl script and Linux kernel coding-style guidelines.
Signed-off-by: Abhirup Deb <abhirupdeb@linux.vnet.ibm.com>
Link: https://lore.kernel.org/r/ZBipKh/e2lK3YcQr@li-27defe4c-32e1-11b2-a85c-e202e9981075.ibm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sumitra Sharma [Sat, 25 Mar 2023 08:31:06 +0000 (01:31 -0700)]
staging: greybus: Inline gb_audio_manager_module()
Convert 'gb_audio_manager_module' from a macro to a static
inline function, to make the relevant types apparent in the
definition and to benefit from the type checking performed by
the compiler at call sites.
Signed-off-by: Sumitra Sharma <sumitraartsy@gmail.com>
Link: https://lore.kernel.org/r/7470bf9d9a57e8bf27e55bd5e3791c5e0ee31385.1679732179.git.sumitraartsy@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sumitra Sharma [Sat, 25 Mar 2023 08:23:33 +0000 (01:23 -0700)]
staging: greybus: Inline gpio_chip_to_gb_gpio_controller()
Convert 'gpio_chip_to_gb_gpio_controller' from a macro to a static
inline function, to make the relevant types apparent in the
definition and to benefit from the type checking performed by
the compiler at call sites.
Signed-off-by: Sumitra Sharma <sumitraartsy@gmail.com>
Link: https://lore.kernel.org/r/3fc5d84a99574ac4a76d26427ac544de375adeb4.1679732179.git.sumitraartsy@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Fri, 24 Mar 2023 08:43:34 +0000 (09:43 +0100)]
staging: rtl8723bs: remove hal_btcoex_SetChipType()
Remove the function hal_btcoex_SetChipType() as it does nothing and
produces the following gcc warning when compiling with W=1.
drivers/staging/rtl8723bs/hal/hal_btcoex.c:1182:30: warning: variable 'pHalData' set but not used [-Wunused-but-set-variable]
1182 | struct hal_com_data *pHalData;
| ^~~~~~~~
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230324084334.12183-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Menna Mahmoud [Wed, 22 Mar 2023 11:37:34 +0000 (13:37 +0200)]
staging: greybus: remove unnecessary blank line
Remove unnecessary blank line before struct as reported
by checkpatch:
" CHECK: Please don't use multiple blank lines "
Signed-off-by: Menna Mahmoud <eng.mennamahmoud.mm@gmail.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230322113735.31214-1-eng.mennamahmoud.mm@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sat, 25 Mar 2023 08:37:10 +0000 (09:37 +0100)]
staging: rtl8192e: Remove priv->rf_chip
priv->rf_chip is initialized to RF_8256 and not used. Remove
initialization, variable and enum as it is dead code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/2ce85c1a159ae376d82c19c61e694924f07d1093.1679732276.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sat, 25 Mar 2023 08:37:02 +0000 (09:37 +0100)]
staging: rtl8192e: Remove priv->rf_chip in _rtl92e_get_channel_map
priv->rf_chip is initialized to RF_8256 and never changed. Remove
condition in function _rtl92e_get_channel_map as it is dead code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/b8c5a719c6f8930adb87a4ad9bd5d368ba5f348b.1679732276.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sat, 25 Mar 2023 08:36:54 +0000 (09:36 +0100)]
staging: rtl8192e: Remove rf_chip in _rtl92e_get_supported_wireless_mode
priv->rf_chip is initialized to RF_8256 and never changed. Remove
condition in function _rtl92e_get_supported_wireless_mode as it is dead
code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/e2db309dea3208560337376fec26fa5cfba93848.1679732276.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sat, 25 Mar 2023 08:36:43 +0000 (09:36 +0100)]
staging: rtl8192e: Remove priv->rf_chip in _rtl92e_set_rf_power_state
priv->rf_chip is initialized to RF_8256 and never changed. Remove
conditions in function _rtl92e_set_rf_power_state as those are dead
code. Removed unnecessary blank lines to shorten code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/a83b95c68697e6eade68bfd0bf8e22a1340c1457.1679732276.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sat, 25 Mar 2023 08:36:34 +0000 (09:36 +0100)]
staging: rtl8192e: Remove priv->rf_chip in _rtl92e_set_bw_mode_work_item
priv->rf_chip is initialized to RF_8256 and never changed. Remove
conditions in function _rtl92e_set_bw_mode_work_item as those are dead
code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/a872bb67f71b9992740d5f9b154f794604a2dbb0.1679732276.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sat, 25 Mar 2023 08:36:23 +0000 (09:36 +0100)]
staging: rtl8192e: Remove priv->rf_chip in _rtl92e_phy_switch_channel_step
priv->rf_chip is initialized to RF_8256 and never changed. Remove
condition in function _rtl92e_phy_switch_channel_step as it is dead code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/1b9e10de4f539aa24150275c80ec4bbd925c853d.1679732276.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sat, 25 Mar 2023 08:36:13 +0000 (09:36 +0100)]
staging: rtl8192e: Remove priv->rf_chip in _rtl92e_set_tx_power_level
priv->rf_chip is initialized to RF_8256 and never changed. Remove
condition in function _rtl92e_set_tx_power_level as it is dead code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/465a789243287c1420fdce68f9a861784a164140.1679732276.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sat, 25 Mar 2023 08:36:00 +0000 (09:36 +0100)]
staging: rtl8192e: Remove priv->rf_chip in rtl92e_config_phy
priv->rf_chip is initialized to RF_8256 and never changed. Remove
condition in function rtl92e_config_phy as it is dead code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/c0d4e98308c9198776d8d04d1c2910f089f45a90.1679732276.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sat, 25 Mar 2023 08:35:45 +0000 (09:35 +0100)]
staging: rtl8192e: Remove priv->rf_chip in rtl92e_set_tx_power
priv->rf_chip is initialized to RF_8256 and never changed. Remove
condition in function rtl92e_set_tx_power as it is dead code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/190d0a77602cb89bc24512c99b72f25f4ca5d5e2.1679732276.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sat, 25 Mar 2023 08:35:28 +0000 (09:35 +0100)]
staging: rtl8192e: Remove priv->rf_chip in _rtl92e_phy_rf_write
priv->rf_chip is initialized to RF_8256 and never changed. Remove
conditions in function _rtl92e_phy_rf_write as those are dead code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/77628b7ecade212401d7da5e3c0b79f8ef55b5c1.1679732276.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Sat, 25 Mar 2023 08:35:13 +0000 (09:35 +0100)]
staging: rtl8192e: Remove priv->rf_chip in _rtl92e_phy_rf_read
priv->rf_chip is initialized to RF_8256 and never changed. Remove
conditions in function _rtl92e_phy_rf_read as those are dead code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/c3b2e2a41cc450c1cb9ac41b8ed19b090d9627a6.1679732276.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Khadija Kamran [Fri, 24 Mar 2023 22:31:31 +0000 (03:31 +0500)]
staging: rtl8192e: remove blank lines after '{'
Remove unnecessary blank lines after an open brace to adhere to the
Linux kernel coding-style guidelines. These issues are reported by
checkpatch.pl
"CHECK: Blank lines aren't necessary after an open brace '{'"
Signed-off-by: Khadija Kamran <kamrankhadijadj@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/e7cd8152e6986d361f81289868040889224bd1bf.1679696777.git.kamrankhadijadj@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Khadija Kamran [Fri, 24 Mar 2023 22:31:30 +0000 (03:31 +0500)]
staging: rtl8192e: add spaces around binary operators
Use spaces around binary operators as suggested by Linux kernel coding
style guidelines.
Issues reported by checkpatch.pl for the following binary operators:
+ , - , * , | , <<
Signed-off-by: Khadija Kamran <kamrankhadijadj@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/44a545cf8e99ebfdbfc3f5bb314f3828abe98558.1679696777.git.kamrankhadijadj@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Khadija Kamran [Fri, 24 Mar 2023 22:31:29 +0000 (03:31 +0500)]
staging: rtl8192e: add blank lines after declarations
Add blank lines after declarations to adhere to the Linux kernel
coding-style guidelines. These issues are reported by checkpatch.pl
"CHECK: Please use a blank line after function/struct/union/enum
declarations"
Signed-off-by: Khadija Kamran <kamrankhadijadj@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/d8a5e738046ffdc1b257e1935eacb8e16af34d5e.1679696777.git.kamrankhadijadj@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Khadija Kamran [Fri, 24 Mar 2023 22:31:28 +0000 (03:31 +0500)]
staging: rtl8192e: remove extra blank lines
Remove the extra blank line in accordance with the Linux kernel
coding-style regulations. These issues were reported by checkpatch.pl
"CHECK: Please don't use multiple blank lines"
Signed-off-by: Khadija Kamran <kamrankhadijadj@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/6d7388f944e8296227269c7472a462ea7c94149c.1679696777.git.kamrankhadijadj@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tom Rix [Thu, 23 Mar 2023 16:59:31 +0000 (12:59 -0400)]
staging: rtl8192u: remove unused ieee80211_SignalStrengthTranslate function
clang with W=1 reports
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c:1961:18: error: unused
function 'ieee80211_SignalStrengthTranslate' [-Werror,-Wunused-function]
static inline u8 ieee80211_SignalStrengthTranslate(
^
This function is not used so remove it.
It may have been used in the past but that has been commented out.
Also remove the comment.
Signed-off-by: Tom Rix <trix@redhat.com>
Link: https://lore.kernel.org/r/20230323165931.2634587-1-trix@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Wed, 22 Mar 2023 17:15:32 +0000 (18:15 +0100)]
staging: rtl8192e: Replace macro iwe_stream_add_point_rsl with standard function
Replace macro iwe_stream_add_point_rsl with standard function
iwe_stream_add_point to increase readability.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/563af664b3186e73d99f73a6396f8ebcd3c52be2.1679504314.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Wed, 22 Mar 2023 17:15:24 +0000 (18:15 +0100)]
staging: rtl8192e: Replace macro iwe_stream_add_event_rsl with standard function
Replace macro iwe_stream_add_event_rsl with standard function
iwe_stream_add_event to increase readability.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/00a8057acc994c139530a070974694b999a8f96a.1679504314.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Wed, 22 Mar 2023 17:15:18 +0000 (18:15 +0100)]
staging: rtl8192e: Replace macro container_of_work_rsl with standard macro
Replace macro container_of_work_rsl with standard macro container_of to
increase readability.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/d75688b6f884c526f6046fac522b8ed87db1ca2f.1679504314.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Wed, 22 Mar 2023 17:15:12 +0000 (18:15 +0100)]
staging: rtl8192e: Replace macro INIT_WORK_RSL with standard macro
Replace macro INIT_WORK_RSL with standard macro INIT_WORK to increase
readability.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/71879ccda54d57078f47c70cdba90ae2234adc91.1679504314.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Wed, 22 Mar 2023 17:15:06 +0000 (18:15 +0100)]
staging: rtl8192e: Replace macro INIT_DELAYED_WORK_RSL with standard macro
Replace macro INIT_DELAYED_WORK_RSL with standard macro INIT_DELAYED_WORK
to increase readability.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/61b589012a5efb4b68a76e52eb84ad19093013b3.1679504314.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Wed, 22 Mar 2023 17:15:00 +0000 (18:15 +0100)]
staging: rtl8192e: Remove unused macro queue_delayed_work_rsl and more
Remove unused macro queue_delayed_work_rsl and queue_work_rsl to increase
readability.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/3ed738a5d67a999ad42454fcb0d6668bfa706205.1679504314.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Wed, 22 Mar 2023 17:14:53 +0000 (18:14 +0100)]
staging: rtl8192e: Replace macro skb_tail_pointer_rsl with standard function
Replace macro skb_tail_pointer_rsl with function skb_tail_pointer to
increase readablility.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/6885112850b48c0f9ff16655f7d9efe085ccc001.1679504314.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Wed, 22 Mar 2023 17:14:48 +0000 (18:14 +0100)]
staging: rtl8192e: Remove double defined constants bMaskBytex and more
Remove double defined constants.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/3f31664d8751ebb8b78cbd7d019f002fb2ba4c3c.1679504314.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Khadija Kamran [Wed, 22 Mar 2023 13:36:03 +0000 (18:36 +0500)]
staging: ks7010: fix line ending with '('
Splitting function header to multiple lines because of 80 characters per
line limit, results in ending the function call line with '('.
This leads to CHECK reported by checkpatch.pl
Move the first parameter right after the '(' in the function call line.
Align the rest of the parameters to the opening parenthesis.
Signed-off-by: Khadija Kamran <kamrankhadijadj@gmail.com>
Link: https://lore.kernel.org/r/ZBsEQzL3Oidsmg/L@khadija-virtual-machine
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Khadija Kamran [Thu, 23 Mar 2023 19:56:11 +0000 (00:56 +0500)]
staging: most: fix line ending with '(' in dim2/
Splitting function header to multiple lines because of 80 characters per
line limit, results in ending the function call line with '('.
This leads to CHECK reported by checkpatch.pl
Move the function parameters right after the '(' in the function call
line. Align the rest of the parameters to the opening parenthesis.
Signed-off-by: Khadija Kamran <kamrankhadijadj@gmail.com>
Link: https://lore.kernel.org/r/ZByu29jb1mE3KOsn@khadija-virtual-machine
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Khadija Kamran [Thu, 23 Mar 2023 19:49:44 +0000 (00:49 +0500)]
staging: most: fix line ending with '(' in video/
Splitting function header to multiple lines because of 80 characters per
line limit, results in ending the function call line with '('.
This leads to CHECK reported by checkpatch.pl
Move the function parameters right after the '(' in the function call
line.
Signed-off-by: Khadija Kamran <kamrankhadijadj@gmail.com>
Link: https://lore.kernel.org/r/ZBytWDocM7XbXkRx@khadija-virtual-machine
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Khadija Kamran [Wed, 22 Mar 2023 14:22:50 +0000 (19:22 +0500)]
staging: most: remove extra blank line
Remove extra blank line reported by checkpatch script.
Signed-off-by: Khadija Kamran <kamrankhadijadj@gmail.com>
Link: https://lore.kernel.org/r/ZBsPOk3TgQTfNAAK@khadija-virtual-machine
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sumitra Sharma [Wed, 22 Mar 2023 05:40:51 +0000 (22:40 -0700)]
Staging: nvec: Remove macro definition to_nvec_led
Remove definition 'to_nvec_led' because it is only used once.
Rewrite the code directly in the calling function
'nvec_led_brightness_set'.
Signed-off-by: Sumitra Sharma <sumitraartsy@gmail.com>
Link: https://lore.kernel.org/r/20230322054051.GA150453@sumitra.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tom Rix [Tue, 21 Mar 2023 19:01:27 +0000 (15:01 -0400)]
staging: rts5208: remove unused xd_check_err_code function
clang with W=1 reports
drivers/staging/rts5208/xd.c:34:19: error: unused function
'xd_check_err_code' [-Werror,-Wunused-function]
static inline int xd_check_err_code(struct rtsx_chip *chip, u8 err_code)
^
This function is not used, so remove it.
Signed-off-by: Tom Rix <trix@redhat.com>
Link: https://lore.kernel.org/r/20230321190127.1827703-1-trix@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Menna Mahmoud [Sun, 19 Mar 2023 20:11:34 +0000 (22:11 +0200)]
staging: rtl8723bs: use inline functions for dvobj_to_dev
Convert `dvobj_to_dev` macro into a static inline function.
it is not great to have macro that use `container_of` macro,
because from looking at the definition one cannot tell
what type it applies to.
One can get the same benefit from an efficiency point of view
by making an inline function.
Suggested-by: Julia Lawall <julia.lawall@inria.fr>
Signed-off-by: Menna Mahmoud <eng.mennamahmoud.mm@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230319201134.253839-1-eng.mennamahmoud.mm@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Menna Mahmoud [Mon, 20 Mar 2023 21:22:39 +0000 (23:22 +0200)]
staging: most: define iface_to_hdm as an inline function
Convert `iface_to_hdm` macro into a static inline function.
it is not great to have macro that use `container_of` macro,
because from looking at the definition one cannot tell
what type it applies to.
One can get the same benefit from an efficiency point of view
by making an inline function.
Suggested-by: Julia Lawall <julia.lawall@inria.fr>
Signed-off-by: Menna Mahmoud <eng.mennamahmoud.mm@gmail.com>
Link: https://lore.kernel.org/r/20230320212239.22452-1-eng.mennamahmoud.mm@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>