* [PATCH] staging: r8188eu: remove unneeded variable
@ 2021-11-02 7:32 cgel.zte
2021-11-02 8:23 ` Pavel Skripkin
2021-11-05 13:41 ` Dan Carpenter
0 siblings, 2 replies; 12+ messages in thread
From: cgel.zte @ 2021-11-02 7:32 UTC (permalink / raw)
To: Larry.Finger
Cc: phil, gregkh, straube.linux, fmdefrancesco, saurav.girepunje,
linux-staging, linux-kernel, Changcheng Deng, Zeal Robot
From: Changcheng Deng <deng.changcheng@zte.com.cn>
Remove unneeded variable used to store return value.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index 995a0248c26f..98863a06bdb6 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -350,7 +350,6 @@ static u8 init_channel_set(struct adapter *padapter, u8 ChannelPlan, struct rt_c
int init_mlme_ext_priv(struct adapter *padapter)
{
- int res = _SUCCESS;
struct registry_priv *pregistrypriv = &padapter->registrypriv;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
@@ -373,7 +372,7 @@ int init_mlme_ext_priv(struct adapter *padapter)
pmlmeext->active_keep_alive_check = true;
- return res;
+ return _SUCCESS;
}
void free_mlme_ext_priv(struct mlme_ext_priv *pmlmeext)
@@ -1611,7 +1610,6 @@ unsigned int OnAtim(struct adapter *padapter, struct recv_frame *precv_frame)
unsigned int on_action_spct(struct adapter *padapter, struct recv_frame *precv_frame)
{
- unsigned int ret = _FAIL;
struct sta_info *psta = NULL;
struct sta_priv *pstapriv = &padapter->stapriv;
u8 *pframe = precv_frame->rx_data;
@@ -1644,7 +1642,7 @@ unsigned int on_action_spct(struct adapter *padapter, struct recv_frame *precv_f
}
exit:
- return ret;
+ return _FAIL;
}
unsigned int OnAction_qos(struct adapter *padapter, struct recv_frame *precv_frame)
--
2.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH] staging: r8188eu: remove unneeded variable
2021-11-02 7:32 [PATCH] staging: r8188eu: remove unneeded variable cgel.zte
@ 2021-11-02 8:23 ` Pavel Skripkin
2021-11-05 13:41 ` Dan Carpenter
1 sibling, 0 replies; 12+ messages in thread
From: Pavel Skripkin @ 2021-11-02 8:23 UTC (permalink / raw)
To: cgel.zte, Larry.Finger
Cc: phil, gregkh, straube.linux, fmdefrancesco, saurav.girepunje,
linux-staging, linux-kernel, Changcheng Deng, Zeal Robot
On 11/2/21 10:32, cgel.zte@gmail.com wrote:
> From: Changcheng Deng <deng.changcheng@zte.com.cn>
>
> Remove unneeded variable used to store return value.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn>
> ---
> drivers/staging/r8188eu/core/rtw_mlme_ext.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
> index 995a0248c26f..98863a06bdb6 100644
> --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
> +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
> @@ -350,7 +350,6 @@ static u8 init_channel_set(struct adapter *padapter, u8 ChannelPlan, struct rt_c
>
> int init_mlme_ext_priv(struct adapter *padapter)
> {
> - int res = _SUCCESS;
> struct registry_priv *pregistrypriv = &padapter->registrypriv;
> struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
> struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
> @@ -373,7 +372,7 @@ int init_mlme_ext_priv(struct adapter *padapter)
>
> pmlmeext->active_keep_alive_check = true;
>
> - return res;
> + return _SUCCESS;
> }
Looks like it always return success, so, maybe, it should return just void?
>
> void free_mlme_ext_priv(struct mlme_ext_priv *pmlmeext)
> @@ -1611,7 +1610,6 @@ unsigned int OnAtim(struct adapter *padapter, struct recv_frame *precv_frame)
>
> unsigned int on_action_spct(struct adapter *padapter, struct recv_frame *precv_frame)
> {
> - unsigned int ret = _FAIL;
> struct sta_info *psta = NULL;
> struct sta_priv *pstapriv = &padapter->stapriv;
> u8 *pframe = precv_frame->rx_data;
> @@ -1644,7 +1642,7 @@ unsigned int on_action_spct(struct adapter *padapter, struct recv_frame *precv_f
> }
>
> exit:
> - return ret;
> + return _FAIL;
> }
>
> unsigned int OnAction_qos(struct adapter *padapter, struct recv_frame *precv_frame)
>
This looks odd from the beginning... Why return _FAIL even on success?
Anyway, nothing checks these handlers return values:
ptable = &OnAction_tbl[i];
if (category == ptable->num)
ptable->func(padapter, precv_frame);
So, it worth to make them void too, but, I guess, it's out of scope of
current patch
With regards,
Pavel Skripkin
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] staging: r8188eu: remove unneeded variable
2021-11-02 7:32 [PATCH] staging: r8188eu: remove unneeded variable cgel.zte
2021-11-02 8:23 ` Pavel Skripkin
@ 2021-11-05 13:41 ` Dan Carpenter
1 sibling, 0 replies; 12+ messages in thread
From: Dan Carpenter @ 2021-11-05 13:41 UTC (permalink / raw)
To: cgel.zte
Cc: Larry.Finger, phil, gregkh, straube.linux, fmdefrancesco,
saurav.girepunje, linux-staging, linux-kernel, Changcheng Deng,
Zeal Robot
On Tue, Nov 02, 2021 at 07:32:26AM +0000, cgel.zte@gmail.com wrote:
> @@ -1611,7 +1610,6 @@ unsigned int OnAtim(struct adapter *padapter, struct recv_frame *precv_frame)
>
> unsigned int on_action_spct(struct adapter *padapter, struct recv_frame *precv_frame)
> {
> - unsigned int ret = _FAIL;
> struct sta_info *psta = NULL;
> struct sta_priv *pstapriv = &padapter->stapriv;
> u8 *pframe = precv_frame->rx_data;
> @@ -1644,7 +1642,7 @@ unsigned int on_action_spct(struct adapter *padapter, struct recv_frame *precv_f
> }
>
> exit:
> - return ret;
> + return _FAIL;
> }
Heh... Let's make it return success on the success path. The other
implementation of this in rtl8723bs/ is wrong too.
No one ever checks, but it's called as a function pointer so we can't
make it void without changing a bunch of other code.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] staging: r8188eu: remove unneeded variable
2021-11-10 12:22 cgel.zte
@ 2021-11-13 11:14 ` Greg KH
0 siblings, 0 replies; 12+ messages in thread
From: Greg KH @ 2021-11-13 11:14 UTC (permalink / raw)
To: cgel.zte
Cc: Larry.Finger, phil, straube.linux, martin, linux-staging,
linux-kernel, Changcheng Deng, Zeal Robot
On Wed, Nov 10, 2021 at 12:22:57PM +0000, cgel.zte@gmail.com wrote:
> From: Changcheng Deng <deng.changcheng@zte.com.cn>
>
> Fix the following coccicheck review:
> ./drivers/staging/r8188eu/os_dep/ioctl_linux.c: 1388: 10-13:
> Unneeded variable ret. Return 0
>
> Remove unneeded variable used to store return value.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
coccicheck reported this, right? If so, what did this "robot" do?
confused,
greg k-h
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] staging: r8188eu: remove unneeded variable
2021-11-12 13:18 cgel.zte
@ 2021-11-12 16:31 ` Pavel Skripkin
0 siblings, 0 replies; 12+ messages in thread
From: Pavel Skripkin @ 2021-11-12 16:31 UTC (permalink / raw)
To: cgel.zte, phil
Cc: Larry.Finger, straube.linux, linux, martin, dan.carpenter,
linux-staging, linux-kernel, Changcheng Deng, Zeal Robot
On 11/12/21 16:18, cgel.zte@gmail.com wrote:
> From: Changcheng Deng <deng.changcheng@zte.com.cn>
>
> Fix the following coccicheck review:
> ./drivers/staging/r8188eu/core/rtw_ap.c: 1094: 5-8: Unneeded variable
>
> Remove unneeded variable used to store return value.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn>
> ---
> drivers/staging/r8188eu/core/rtw_ap.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/r8188eu/core/rtw_ap.c b/drivers/staging/r8188eu/core/rtw_ap.c
> index c78feeb9c862..d103a92ee2f1 100644
> --- a/drivers/staging/r8188eu/core/rtw_ap.c
> +++ b/drivers/staging/r8188eu/core/rtw_ap.c
> @@ -1091,7 +1091,6 @@ u8 ap_free_sta(struct adapter *padapter, struct sta_info *psta,
> int rtw_sta_flush(struct adapter *padapter)
> {
> struct list_head *phead, *plist;
> - int ret = 0;
None of the existing callers check the return value of this function.
Make it void, please.
With regards,
Pavel Skripkin
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] staging: r8188eu: remove unneeded variable
@ 2021-11-12 13:18 cgel.zte
2021-11-12 16:31 ` Pavel Skripkin
0 siblings, 1 reply; 12+ messages in thread
From: cgel.zte @ 2021-11-12 13:18 UTC (permalink / raw)
To: phil
Cc: Larry.Finger, straube.linux, linux, martin, dan.carpenter,
linux-staging, linux-kernel, Changcheng Deng, Zeal Robot
From: Changcheng Deng <deng.changcheng@zte.com.cn>
Fix the following coccicheck review:
./drivers/staging/r8188eu/core/rtw_ap.c: 1094: 5-8: Unneeded variable
Remove unneeded variable used to store return value.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn>
---
drivers/staging/r8188eu/core/rtw_ap.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_ap.c b/drivers/staging/r8188eu/core/rtw_ap.c
index c78feeb9c862..d103a92ee2f1 100644
--- a/drivers/staging/r8188eu/core/rtw_ap.c
+++ b/drivers/staging/r8188eu/core/rtw_ap.c
@@ -1091,7 +1091,6 @@ u8 ap_free_sta(struct adapter *padapter, struct sta_info *psta,
int rtw_sta_flush(struct adapter *padapter)
{
struct list_head *phead, *plist;
- int ret = 0;
struct sta_info *psta = NULL;
struct sta_priv *pstapriv = &padapter->stapriv;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
@@ -1101,7 +1100,7 @@ int rtw_sta_flush(struct adapter *padapter)
DBG_88E(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(padapter->pnetdev));
if ((pmlmeinfo->state & 0x03) != WIFI_FW_AP_STATE)
- return ret;
+ return 0;
spin_lock_bh(&pstapriv->asoc_list_lock);
phead = &pstapriv->asoc_list;
@@ -1124,7 +1123,7 @@ int rtw_sta_flush(struct adapter *padapter)
associated_clients_update(padapter, true);
- return ret;
+ return 0;
}
/* called > TSR LEVEL for USB or SDIO Interface*/
--
2.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH] staging: r8188eu: remove unneeded variable
@ 2021-11-10 12:22 cgel.zte
2021-11-13 11:14 ` Greg KH
0 siblings, 1 reply; 12+ messages in thread
From: cgel.zte @ 2021-11-10 12:22 UTC (permalink / raw)
To: Larry.Finger
Cc: phil, straube.linux, martin, linux-staging, linux-kernel,
Changcheng Deng, Zeal Robot
From: Changcheng Deng <deng.changcheng@zte.com.cn>
Fix the following coccicheck review:
./drivers/staging/r8188eu/os_dep/ioctl_linux.c: 1388: 10-13:
Unneeded variable ret. Return 0
Remove unneeded variable used to store return value.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn>
---
drivers/staging/r8188eu/os_dep/ioctl_linux.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/r8188eu/os_dep/ioctl_linux.c b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
index 51f46696a593..8ee1d37110e1 100644
--- a/drivers/staging/r8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
@@ -1385,7 +1385,7 @@ static int rtw_wx_get_essid(struct net_device *dev,
struct iw_request_info *a,
union iwreq_data *wrqu, char *extra)
{
- u32 len, ret = 0;
+ u32 len;
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct wlan_bssid_ex *pcur_bss = &pmlmepriv->cur_network.network;
@@ -1401,7 +1401,7 @@ static int rtw_wx_get_essid(struct net_device *dev,
wrqu->essid.length = len;
wrqu->essid.flags = 1;
- return ret;
+ return 0;
}
static int rtw_wx_set_rate(struct net_device *dev,
--
2.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH] staging: r8188eu: remove unneeded variable
2021-11-09 11:53 cgel.zte
2021-11-09 12:09 ` Pavel Skripkin
@ 2021-11-10 8:12 ` Greg KH
1 sibling, 0 replies; 12+ messages in thread
From: Greg KH @ 2021-11-10 8:12 UTC (permalink / raw)
To: cgel.zte
Cc: Larry.Finger, phil, straube.linux, linux-staging, linux-kernel,
Changcheng Deng, Zeal Robot
On Tue, Nov 09, 2021 at 11:53:07AM +0000, cgel.zte@gmail.com wrote:
> From: Changcheng Deng <deng.changcheng@zte.com.cn>
>
> Fix the following coccicheck review:
> ./drivers/staging/r8188eu/core/rtw_cmd.c: 66: 5-8: Unneeded variable
>
> Remove unneeded variable used to store return value.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
But this is coccicheck finding the issue, not the "Zeal Robot", right?
A script that just runs scripts already in the kernel tree does not mean
that an entity is deserving of an email address and reported-by tag,
right?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] staging: r8188eu: remove unneeded variable
2021-11-09 12:18 ` Dan Carpenter
@ 2021-11-09 12:23 ` Pavel Skripkin
0 siblings, 0 replies; 12+ messages in thread
From: Pavel Skripkin @ 2021-11-09 12:23 UTC (permalink / raw)
To: Dan Carpenter
Cc: cgel.zte, Larry.Finger, phil, gregkh, straube.linux,
linux-staging, linux-kernel, Changcheng Deng, Zeal Robot
On 11/9/21 15:18, Dan Carpenter wrote:
>> > static int _rtw_init_evt_priv(struct evt_priv *pevtpriv)
>> > {
>> > - int res = _SUCCESS;
>> > -
>> > /* allocate DMA-able/Non-Page memory for cmd_buf and rsp_buf */
>> > atomic_set(&pevtpriv->event_seq, 0);
>> > pevtpriv->evt_done_cnt = 0;
>> > @@ -72,7 +70,7 @@ static int _rtw_init_evt_priv(struct evt_priv *pevtpriv)
>> > pevtpriv->c2h_wk_alive = false;
>> > pevtpriv->c2h_queue = rtw_cbuf_alloc(C2H_QUEUE_MAX_LEN + 1);
>> > - return res;
>> > + return _SUCCESS;
>> > }
>>
>> Shouldn't it return just void then?
>>
>
> There is only one caller. It should be folded into the caller and
> deleted. Then the caller could be made void.
>
Ah, I see. I've overlooked, that this function name starts with _ and
the wrapper just does `return _rtw_init_evt_priv();`. Interesting
approach...
I agree, that _rtw_init_evt_priv should be just renamed to
rtw_init_evt_priv() and the old wrapper should be just removed
With regards,
Pavel Skripkin
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] staging: r8188eu: remove unneeded variable
2021-11-09 12:09 ` Pavel Skripkin
@ 2021-11-09 12:18 ` Dan Carpenter
2021-11-09 12:23 ` Pavel Skripkin
0 siblings, 1 reply; 12+ messages in thread
From: Dan Carpenter @ 2021-11-09 12:18 UTC (permalink / raw)
To: Pavel Skripkin
Cc: cgel.zte, Larry.Finger, phil, gregkh, straube.linux,
linux-staging, linux-kernel, Changcheng Deng, Zeal Robot
On Tue, Nov 09, 2021 at 03:09:21PM +0300, Pavel Skripkin wrote:
> On 11/9/21 14:53, cgel.zte@gmail.com wrote:
> > From: Changcheng Deng <deng.changcheng@zte.com.cn>
> >
> > Fix the following coccicheck review:
> > ./drivers/staging/r8188eu/core/rtw_cmd.c: 66: 5-8: Unneeded variable
> >
> > Remove unneeded variable used to store return value.
> >
> > Reported-by: Zeal Robot <zealci@zte.com.cn>
> > Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn>
> > ---
> > drivers/staging/r8188eu/core/rtw_cmd.c | 4 +---
> > 1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/drivers/staging/r8188eu/core/rtw_cmd.c b/drivers/staging/r8188eu/core/rtw_cmd.c
> > index e17332677daa..1b1c47f4a34e 100644
> > --- a/drivers/staging/r8188eu/core/rtw_cmd.c
> > +++ b/drivers/staging/r8188eu/core/rtw_cmd.c
> > @@ -62,8 +62,6 @@ static void c2h_wk_callback(struct work_struct *work);
> > static int _rtw_init_evt_priv(struct evt_priv *pevtpriv)
> > {
> > - int res = _SUCCESS;
> > -
> > /* allocate DMA-able/Non-Page memory for cmd_buf and rsp_buf */
> > atomic_set(&pevtpriv->event_seq, 0);
> > pevtpriv->evt_done_cnt = 0;
> > @@ -72,7 +70,7 @@ static int _rtw_init_evt_priv(struct evt_priv *pevtpriv)
> > pevtpriv->c2h_wk_alive = false;
> > pevtpriv->c2h_queue = rtw_cbuf_alloc(C2H_QUEUE_MAX_LEN + 1);
> > - return res;
> > + return _SUCCESS;
> > }
>
> Shouldn't it return just void then?
>
There is only one caller. It should be folded into the caller and
deleted. Then the caller could be made void.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] staging: r8188eu: remove unneeded variable
2021-11-09 11:53 cgel.zte
@ 2021-11-09 12:09 ` Pavel Skripkin
2021-11-09 12:18 ` Dan Carpenter
2021-11-10 8:12 ` Greg KH
1 sibling, 1 reply; 12+ messages in thread
From: Pavel Skripkin @ 2021-11-09 12:09 UTC (permalink / raw)
To: cgel.zte, Larry.Finger
Cc: phil, gregkh, straube.linux, linux-staging, linux-kernel,
Changcheng Deng, Zeal Robot
On 11/9/21 14:53, cgel.zte@gmail.com wrote:
> From: Changcheng Deng <deng.changcheng@zte.com.cn>
>
> Fix the following coccicheck review:
> ./drivers/staging/r8188eu/core/rtw_cmd.c: 66: 5-8: Unneeded variable
>
> Remove unneeded variable used to store return value.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn>
> ---
> drivers/staging/r8188eu/core/rtw_cmd.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/staging/r8188eu/core/rtw_cmd.c b/drivers/staging/r8188eu/core/rtw_cmd.c
> index e17332677daa..1b1c47f4a34e 100644
> --- a/drivers/staging/r8188eu/core/rtw_cmd.c
> +++ b/drivers/staging/r8188eu/core/rtw_cmd.c
> @@ -62,8 +62,6 @@ static void c2h_wk_callback(struct work_struct *work);
>
> static int _rtw_init_evt_priv(struct evt_priv *pevtpriv)
> {
> - int res = _SUCCESS;
> -
> /* allocate DMA-able/Non-Page memory for cmd_buf and rsp_buf */
> atomic_set(&pevtpriv->event_seq, 0);
> pevtpriv->evt_done_cnt = 0;
> @@ -72,7 +70,7 @@ static int _rtw_init_evt_priv(struct evt_priv *pevtpriv)
> pevtpriv->c2h_wk_alive = false;
> pevtpriv->c2h_queue = rtw_cbuf_alloc(C2H_QUEUE_MAX_LEN + 1);
>
> - return res;
> + return _SUCCESS;
> }
>
Shouldn't it return just void then?
With regards,
Pavel Skripkin
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] staging: r8188eu: remove unneeded variable
@ 2021-11-09 11:53 cgel.zte
2021-11-09 12:09 ` Pavel Skripkin
2021-11-10 8:12 ` Greg KH
0 siblings, 2 replies; 12+ messages in thread
From: cgel.zte @ 2021-11-09 11:53 UTC (permalink / raw)
To: Larry.Finger
Cc: phil, gregkh, straube.linux, linux-staging, linux-kernel,
Changcheng Deng, Zeal Robot
From: Changcheng Deng <deng.changcheng@zte.com.cn>
Fix the following coccicheck review:
./drivers/staging/r8188eu/core/rtw_cmd.c: 66: 5-8: Unneeded variable
Remove unneeded variable used to store return value.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn>
---
drivers/staging/r8188eu/core/rtw_cmd.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_cmd.c b/drivers/staging/r8188eu/core/rtw_cmd.c
index e17332677daa..1b1c47f4a34e 100644
--- a/drivers/staging/r8188eu/core/rtw_cmd.c
+++ b/drivers/staging/r8188eu/core/rtw_cmd.c
@@ -62,8 +62,6 @@ static void c2h_wk_callback(struct work_struct *work);
static int _rtw_init_evt_priv(struct evt_priv *pevtpriv)
{
- int res = _SUCCESS;
-
/* allocate DMA-able/Non-Page memory for cmd_buf and rsp_buf */
atomic_set(&pevtpriv->event_seq, 0);
pevtpriv->evt_done_cnt = 0;
@@ -72,7 +70,7 @@ static int _rtw_init_evt_priv(struct evt_priv *pevtpriv)
pevtpriv->c2h_wk_alive = false;
pevtpriv->c2h_queue = rtw_cbuf_alloc(C2H_QUEUE_MAX_LEN + 1);
- return res;
+ return _SUCCESS;
}
void rtw_free_evt_priv(struct evt_priv *pevtpriv)
--
2.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
end of thread, other threads:[~2021-11-13 11:14 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-02 7:32 [PATCH] staging: r8188eu: remove unneeded variable cgel.zte
2021-11-02 8:23 ` Pavel Skripkin
2021-11-05 13:41 ` Dan Carpenter
2021-11-09 11:53 cgel.zte
2021-11-09 12:09 ` Pavel Skripkin
2021-11-09 12:18 ` Dan Carpenter
2021-11-09 12:23 ` Pavel Skripkin
2021-11-10 8:12 ` Greg KH
2021-11-10 12:22 cgel.zte
2021-11-13 11:14 ` Greg KH
2021-11-12 13:18 cgel.zte
2021-11-12 16:31 ` Pavel Skripkin
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).