* [PATCH 1/4] staging: rtl8188eu: change bLeisurePs' type to bool
@ 2021-04-17 18:00 Martin Kaiser
2021-04-17 18:00 ` [PATCH 2/4] staging: rtl8188eu: remove constant variable and dead code Martin Kaiser
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Martin Kaiser @ 2021-04-17 18:00 UTC (permalink / raw)
To: Larry Finger, Greg Kroah-Hartman
Cc: linux-staging, kernel-janitors, linux-kernel, Martin Kaiser
bLeisurePs is used as a boolean variable. Change its type from
u8 to bool.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
drivers/staging/rtl8188eu/include/rtw_pwrctrl.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h b/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h
index 06062643c868..4345dc0c7cf9 100644
--- a/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h
+++ b/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h
@@ -171,7 +171,7 @@ struct pwrctrl_priv {
unsigned long ips_deny_time; /* will deny IPS when system time less than this */
u8 ps_processing; /* temp used to mark whether in rtw_ps_processor */
- u8 bLeisurePs;
+ bool bLeisurePs;
u8 LpsIdleCount;
u8 power_mgnt;
u8 bFwCurrentInPSMode;
--
2.20.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/4] staging: rtl8188eu: remove constant variable and dead code
2021-04-17 18:00 [PATCH 1/4] staging: rtl8188eu: change bLeisurePs' type to bool Martin Kaiser
@ 2021-04-17 18:00 ` Martin Kaiser
2021-04-17 19:57 ` kernel test robot
2021-04-17 18:00 ` [PATCH 3/4] staging: rtl8188eu: cmdThread is a task_struct Martin Kaiser
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Martin Kaiser @ 2021-04-17 18:00 UTC (permalink / raw)
To: Larry Finger, Greg Kroah-Hartman
Cc: linux-staging, kernel-janitors, linux-kernel, Martin Kaiser
g_wifi_on is always true. Remove the variable and the code that would
be run only if g_wifi_on was false.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
drivers/staging/rtl8188eu/os_dep/rtw_android.c | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/drivers/staging/rtl8188eu/os_dep/rtw_android.c b/drivers/staging/rtl8188eu/os_dep/rtw_android.c
index f5763a9d70c5..2d21767bc1a3 100644
--- a/drivers/staging/rtl8188eu/os_dep/rtw_android.c
+++ b/drivers/staging/rtl8188eu/os_dep/rtw_android.c
@@ -53,15 +53,9 @@ struct android_wifi_priv_cmd {
};
/**
- * Local (static) functions and variables
+ * Local (static) functions
*/
-/* Initialize g_wifi_on to 1 so dhd_bus_start will be called for the first
- * time (only) in dhd_open, subsequential wifi on will be handled by
- * wl_android_wifi_on
- */
-static int g_wifi_on = true;
-
int rtw_android_cmdstr_to_num(char *cmdstr)
{
int cmd_num;
@@ -154,12 +148,6 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
case ANDROID_WIFI_CMD_SETFWPATH:
goto response;
}
- if (!g_wifi_on) {
- DBG_88E("%s: Ignore private cmd \"%s\" - iface %s is down\n",
- __func__, command, ifr->ifr_name);
- ret = 0;
- goto free;
- }
switch (cmd_num) {
case ANDROID_WIFI_CMD_STOP:
break;
@@ -244,7 +232,6 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
} else {
ret = bytes_written;
}
-free:
kfree(command);
return ret;
}
--
2.20.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/4] staging: rtl8188eu: cmdThread is a task_struct
2021-04-17 18:00 [PATCH 1/4] staging: rtl8188eu: change bLeisurePs' type to bool Martin Kaiser
2021-04-17 18:00 ` [PATCH 2/4] staging: rtl8188eu: remove constant variable and dead code Martin Kaiser
@ 2021-04-17 18:00 ` Martin Kaiser
2021-04-17 18:00 ` [PATCH 4/4] staging: rtl8188eu: remove unused function parameters Martin Kaiser
2021-04-19 20:11 ` [PATCH v2 1/4] staging: rtl8188eu: change bLeisurePs' type to bool Martin Kaiser
3 siblings, 0 replies; 9+ messages in thread
From: Martin Kaiser @ 2021-04-17 18:00 UTC (permalink / raw)
To: Larry Finger, Greg Kroah-Hartman
Cc: linux-staging, kernel-janitors, linux-kernel, Martin Kaiser
cmdThread is the return value of kthread_run, i.e. a struct task_struct.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
drivers/staging/rtl8188eu/include/drv_types.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8188eu/include/drv_types.h b/drivers/staging/rtl8188eu/include/drv_types.h
index 0a3acb378d6d..4116051a9a65 100644
--- a/drivers/staging/rtl8188eu/include/drv_types.h
+++ b/drivers/staging/rtl8188eu/include/drv_types.h
@@ -150,7 +150,7 @@ struct adapter {
u8 hw_init_completed;
- void *cmdThread;
+ struct task_struct *cmdThread;
struct net_device *pnetdev;
struct net_device *pmondev;
--
2.20.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 4/4] staging: rtl8188eu: remove unused function parameters
2021-04-17 18:00 [PATCH 1/4] staging: rtl8188eu: change bLeisurePs' type to bool Martin Kaiser
2021-04-17 18:00 ` [PATCH 2/4] staging: rtl8188eu: remove constant variable and dead code Martin Kaiser
2021-04-17 18:00 ` [PATCH 3/4] staging: rtl8188eu: cmdThread is a task_struct Martin Kaiser
@ 2021-04-17 18:00 ` Martin Kaiser
2021-04-19 20:11 ` [PATCH v2 1/4] staging: rtl8188eu: change bLeisurePs' type to bool Martin Kaiser
3 siblings, 0 replies; 9+ messages in thread
From: Martin Kaiser @ 2021-04-17 18:00 UTC (permalink / raw)
To: Larry Finger, Greg Kroah-Hartman
Cc: linux-staging, kernel-janitors, linux-kernel, Martin Kaiser
The Enable and Linked parameters of _BeaconFunctionEnable are not used.
Remove them.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
drivers/staging/rtl8188eu/hal/usb_halinit.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8188eu/hal/usb_halinit.c b/drivers/staging/rtl8188eu/hal/usb_halinit.c
index abe58cf2de16..80cdcf6f7879 100644
--- a/drivers/staging/rtl8188eu/hal/usb_halinit.c
+++ b/drivers/staging/rtl8188eu/hal/usb_halinit.c
@@ -574,8 +574,7 @@ static void _InitBeaconParameters(struct adapter *Adapter)
haldata->RegCR_1 = usb_read8(Adapter, REG_CR + 1);
}
-static void _BeaconFunctionEnable(struct adapter *Adapter,
- bool Enable, bool Linked)
+static void _BeaconFunctionEnable(struct adapter *Adapter)
{
usb_write8(Adapter, REG_BCN_CTRL, (BIT(4) | BIT(3) | BIT(1)));
@@ -1961,7 +1960,7 @@ void beacon_timing_control(struct adapter *adapt)
usb_write8(adapt, REG_RXTSF_OFFSET_CCK, 0x50);
usb_write8(adapt, REG_RXTSF_OFFSET_OFDM, 0x50);
- _BeaconFunctionEnable(adapt, true, true);
+ _BeaconFunctionEnable(adapt);
ResumeTxBeacon(adapt);
--
2.20.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 2/4] staging: rtl8188eu: remove constant variable and dead code
2021-04-17 18:00 ` [PATCH 2/4] staging: rtl8188eu: remove constant variable and dead code Martin Kaiser
@ 2021-04-17 19:57 ` kernel test robot
0 siblings, 0 replies; 9+ messages in thread
From: kernel test robot @ 2021-04-17 19:57 UTC (permalink / raw)
To: Martin Kaiser, Larry Finger, Greg Kroah-Hartman
Cc: kbuild-all, linux-staging, kernel-janitors, linux-kernel, Martin Kaiser
[-- Attachment #1: Type: text/plain, Size: 2855 bytes --]
Hi Martin,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on staging/staging-testing]
url: https://github.com/0day-ci/linux/commits/Martin-Kaiser/staging-rtl8188eu-change-bLeisurePs-type-to-bool/20210418-020200
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 71d3edc61e29e45b613b841108688d711846f969
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/c2b80185c47f9f13ed748eca0df39494668481ee
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Martin-Kaiser/staging-rtl8188eu-change-bLeisurePs-type-to-bool/20210418-020200
git checkout c2b80185c47f9f13ed748eca0df39494668481ee
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/staging/rtl8188eu/os_dep/rtw_android.c:60: warning: Function parameter or member 'cmdstr' not described in 'rtw_android_cmdstr_to_num'
>> drivers/staging/rtl8188eu/os_dep/rtw_android.c:60: warning: expecting prototype for functions(). Prototype was for rtw_android_cmdstr_to_num() instead
vim +60 drivers/staging/rtl8188eu/os_dep/rtw_android.c
5adef66acf7370 Larry Finger 2013-08-21 54
5adef66acf7370 Larry Finger 2013-08-21 55 /**
c2b80185c47f9f Martin Kaiser 2021-04-17 56 * Local (static) functions
5adef66acf7370 Larry Finger 2013-08-21 57 */
5adef66acf7370 Larry Finger 2013-08-21 58
5adef66acf7370 Larry Finger 2013-08-21 59 int rtw_android_cmdstr_to_num(char *cmdstr)
5adef66acf7370 Larry Finger 2013-08-21 @60 {
5adef66acf7370 Larry Finger 2013-08-21 61 int cmd_num;
37ad17a4b48ca7 Yamanappagouda Patil 2016-12-22 62
5adef66acf7370 Larry Finger 2013-08-21 63 for (cmd_num = 0; cmd_num < ANDROID_WIFI_CMD_MAX; cmd_num++)
fd078b42096163 Puranjay Mohan 2019-05-21 64 if (!strncasecmp(cmdstr, android_wifi_cmd_str[cmd_num],
5adef66acf7370 Larry Finger 2013-08-21 65 strlen(android_wifi_cmd_str[cmd_num])))
5adef66acf7370 Larry Finger 2013-08-21 66 break;
5adef66acf7370 Larry Finger 2013-08-21 67 return cmd_num;
5adef66acf7370 Larry Finger 2013-08-21 68 }
5adef66acf7370 Larry Finger 2013-08-21 69
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 67515 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 1/4] staging: rtl8188eu: change bLeisurePs' type to bool
2021-04-17 18:00 [PATCH 1/4] staging: rtl8188eu: change bLeisurePs' type to bool Martin Kaiser
` (2 preceding siblings ...)
2021-04-17 18:00 ` [PATCH 4/4] staging: rtl8188eu: remove unused function parameters Martin Kaiser
@ 2021-04-19 20:11 ` Martin Kaiser
2021-04-19 20:11 ` [PATCH v2 2/4] staging: rtl8188eu: remove constant variable and dead code Martin Kaiser
` (2 more replies)
3 siblings, 3 replies; 9+ messages in thread
From: Martin Kaiser @ 2021-04-19 20:11 UTC (permalink / raw)
To: Larry Finger, Greg Kroah-Hartman
Cc: linux-staging, kernel-janitors, linux-kernel, Martin Kaiser
bLeisurePs is used as a boolean variable. Change its type from
u8 to bool.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
v2:
- no change, re-sending the entire series
drivers/staging/rtl8188eu/include/rtw_pwrctrl.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h b/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h
index 06062643c868..4345dc0c7cf9 100644
--- a/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h
+++ b/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h
@@ -171,7 +171,7 @@ struct pwrctrl_priv {
unsigned long ips_deny_time; /* will deny IPS when system time less than this */
u8 ps_processing; /* temp used to mark whether in rtw_ps_processor */
- u8 bLeisurePs;
+ bool bLeisurePs;
u8 LpsIdleCount;
u8 power_mgnt;
u8 bFwCurrentInPSMode;
--
2.20.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 2/4] staging: rtl8188eu: remove constant variable and dead code
2021-04-19 20:11 ` [PATCH v2 1/4] staging: rtl8188eu: change bLeisurePs' type to bool Martin Kaiser
@ 2021-04-19 20:11 ` Martin Kaiser
2021-04-19 20:11 ` [PATCH v2 3/4] staging: rtl8188eu: cmdThread is a task_struct Martin Kaiser
2021-04-19 20:11 ` [PATCH v2 4/4] staging: rtl8188eu: remove unused function parameters Martin Kaiser
2 siblings, 0 replies; 9+ messages in thread
From: Martin Kaiser @ 2021-04-19 20:11 UTC (permalink / raw)
To: Larry Finger, Greg Kroah-Hartman
Cc: linux-staging, kernel-janitors, linux-kernel, Martin Kaiser,
kernel test robot
g_wifi_on is always true. Remove the variable and the code that would
be run only if g_wifi_on was false.
While at it, remove a pointlesss comment that starts with /** and is
misinterpreted as a kernel-doc comment.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Reported-by: kernel test robot <lkp@intel.com>
---
v2:
- fix compiler warning, remove a comment that looks like kernel-doc
drivers/staging/rtl8188eu/os_dep/rtw_android.c | 17 -----------------
1 file changed, 17 deletions(-)
diff --git a/drivers/staging/rtl8188eu/os_dep/rtw_android.c b/drivers/staging/rtl8188eu/os_dep/rtw_android.c
index f5763a9d70c5..f1470ac56874 100644
--- a/drivers/staging/rtl8188eu/os_dep/rtw_android.c
+++ b/drivers/staging/rtl8188eu/os_dep/rtw_android.c
@@ -52,16 +52,6 @@ struct android_wifi_priv_cmd {
int total_len;
};
-/**
- * Local (static) functions and variables
- */
-
-/* Initialize g_wifi_on to 1 so dhd_bus_start will be called for the first
- * time (only) in dhd_open, subsequential wifi on will be handled by
- * wl_android_wifi_on
- */
-static int g_wifi_on = true;
-
int rtw_android_cmdstr_to_num(char *cmdstr)
{
int cmd_num;
@@ -154,12 +144,6 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
case ANDROID_WIFI_CMD_SETFWPATH:
goto response;
}
- if (!g_wifi_on) {
- DBG_88E("%s: Ignore private cmd \"%s\" - iface %s is down\n",
- __func__, command, ifr->ifr_name);
- ret = 0;
- goto free;
- }
switch (cmd_num) {
case ANDROID_WIFI_CMD_STOP:
break;
@@ -244,7 +228,6 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
} else {
ret = bytes_written;
}
-free:
kfree(command);
return ret;
}
--
2.20.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 3/4] staging: rtl8188eu: cmdThread is a task_struct
2021-04-19 20:11 ` [PATCH v2 1/4] staging: rtl8188eu: change bLeisurePs' type to bool Martin Kaiser
2021-04-19 20:11 ` [PATCH v2 2/4] staging: rtl8188eu: remove constant variable and dead code Martin Kaiser
@ 2021-04-19 20:11 ` Martin Kaiser
2021-04-19 20:11 ` [PATCH v2 4/4] staging: rtl8188eu: remove unused function parameters Martin Kaiser
2 siblings, 0 replies; 9+ messages in thread
From: Martin Kaiser @ 2021-04-19 20:11 UTC (permalink / raw)
To: Larry Finger, Greg Kroah-Hartman
Cc: linux-staging, kernel-janitors, linux-kernel, Martin Kaiser
cmdThread is the return value of kthread_run, i.e. a struct task_struct.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
v2:
- no change, re-sending the entire series
drivers/staging/rtl8188eu/include/drv_types.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8188eu/include/drv_types.h b/drivers/staging/rtl8188eu/include/drv_types.h
index 0a3acb378d6d..4116051a9a65 100644
--- a/drivers/staging/rtl8188eu/include/drv_types.h
+++ b/drivers/staging/rtl8188eu/include/drv_types.h
@@ -150,7 +150,7 @@ struct adapter {
u8 hw_init_completed;
- void *cmdThread;
+ struct task_struct *cmdThread;
struct net_device *pnetdev;
struct net_device *pmondev;
--
2.20.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 4/4] staging: rtl8188eu: remove unused function parameters
2021-04-19 20:11 ` [PATCH v2 1/4] staging: rtl8188eu: change bLeisurePs' type to bool Martin Kaiser
2021-04-19 20:11 ` [PATCH v2 2/4] staging: rtl8188eu: remove constant variable and dead code Martin Kaiser
2021-04-19 20:11 ` [PATCH v2 3/4] staging: rtl8188eu: cmdThread is a task_struct Martin Kaiser
@ 2021-04-19 20:11 ` Martin Kaiser
2 siblings, 0 replies; 9+ messages in thread
From: Martin Kaiser @ 2021-04-19 20:11 UTC (permalink / raw)
To: Larry Finger, Greg Kroah-Hartman
Cc: linux-staging, kernel-janitors, linux-kernel, Martin Kaiser
The Enable and Linked parameters of _BeaconFunctionEnable are not used.
Remove them.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
v2:
- no change, re-sending the entire series
drivers/staging/rtl8188eu/hal/usb_halinit.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8188eu/hal/usb_halinit.c b/drivers/staging/rtl8188eu/hal/usb_halinit.c
index abe58cf2de16..80cdcf6f7879 100644
--- a/drivers/staging/rtl8188eu/hal/usb_halinit.c
+++ b/drivers/staging/rtl8188eu/hal/usb_halinit.c
@@ -574,8 +574,7 @@ static void _InitBeaconParameters(struct adapter *Adapter)
haldata->RegCR_1 = usb_read8(Adapter, REG_CR + 1);
}
-static void _BeaconFunctionEnable(struct adapter *Adapter,
- bool Enable, bool Linked)
+static void _BeaconFunctionEnable(struct adapter *Adapter)
{
usb_write8(Adapter, REG_BCN_CTRL, (BIT(4) | BIT(3) | BIT(1)));
@@ -1961,7 +1960,7 @@ void beacon_timing_control(struct adapter *adapt)
usb_write8(adapt, REG_RXTSF_OFFSET_CCK, 0x50);
usb_write8(adapt, REG_RXTSF_OFFSET_OFDM, 0x50);
- _BeaconFunctionEnable(adapt, true, true);
+ _BeaconFunctionEnable(adapt);
ResumeTxBeacon(adapt);
--
2.20.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2021-04-19 20:13 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-17 18:00 [PATCH 1/4] staging: rtl8188eu: change bLeisurePs' type to bool Martin Kaiser
2021-04-17 18:00 ` [PATCH 2/4] staging: rtl8188eu: remove constant variable and dead code Martin Kaiser
2021-04-17 19:57 ` kernel test robot
2021-04-17 18:00 ` [PATCH 3/4] staging: rtl8188eu: cmdThread is a task_struct Martin Kaiser
2021-04-17 18:00 ` [PATCH 4/4] staging: rtl8188eu: remove unused function parameters Martin Kaiser
2021-04-19 20:11 ` [PATCH v2 1/4] staging: rtl8188eu: change bLeisurePs' type to bool Martin Kaiser
2021-04-19 20:11 ` [PATCH v2 2/4] staging: rtl8188eu: remove constant variable and dead code Martin Kaiser
2021-04-19 20:11 ` [PATCH v2 3/4] staging: rtl8188eu: cmdThread is a task_struct Martin Kaiser
2021-04-19 20:11 ` [PATCH v2 4/4] staging: rtl8188eu: remove unused function parameters Martin Kaiser
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).