LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] staging: r8188eu: make rtw_deinit_intf_priv return void
@ 2021-08-23 18:40 Pavel Skripkin
  2021-08-23 19:30 ` Martin Kaiser
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Pavel Skripkin @ 2021-08-23 18:40 UTC (permalink / raw)
  To: Larry.Finger, phil, gregkh, straube.linux
  Cc: linux-staging, linux-kernel, Pavel Skripkin

rtw_deinit_intf_priv() always return success, so there is no need in
return value

Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
---
 drivers/staging/r8188eu/os_dep/usb_intf.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/staging/r8188eu/os_dep/usb_intf.c b/drivers/staging/r8188eu/os_dep/usb_intf.c
index e002070f7fba..37694aa96d13 100644
--- a/drivers/staging/r8188eu/os_dep/usb_intf.c
+++ b/drivers/staging/r8188eu/os_dep/usb_intf.c
@@ -129,13 +129,10 @@ static u8 rtw_init_intf_priv(struct dvobj_priv *dvobj)
 	return rst;
 }
 
-static u8 rtw_deinit_intf_priv(struct dvobj_priv *dvobj)
+static void rtw_deinit_intf_priv(struct dvobj_priv *dvobj)
 {
-	u8 rst = _SUCCESS;
-
 	kfree(dvobj->usb_alloc_vendor_req_buf);
 	_rtw_mutex_free(&dvobj->usb_vendor_req_mutex);
-	return rst;
 }
 
 static struct dvobj_priv *usb_dvobj_init(struct usb_interface *usb_intf)
-- 
2.32.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] staging: r8188eu: make rtw_deinit_intf_priv return void
  2021-08-23 18:40 [PATCH] staging: r8188eu: make rtw_deinit_intf_priv return void Pavel Skripkin
@ 2021-08-23 19:30 ` Martin Kaiser
  2021-08-23 19:34 ` Michael Straube
  2021-08-23 21:20 ` Phillip Potter
  2 siblings, 0 replies; 7+ messages in thread
From: Martin Kaiser @ 2021-08-23 19:30 UTC (permalink / raw)
  To: Pavel Skripkin
  Cc: Larry.Finger, phil, gregkh, straube.linux, linux-staging, linux-kernel

Thus wrote Pavel Skripkin (paskripkin@gmail.com):

> rtw_deinit_intf_priv() always return success, so there is no need in
> return value

> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
> ---
>  drivers/staging/r8188eu/os_dep/usb_intf.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)

> diff --git a/drivers/staging/r8188eu/os_dep/usb_intf.c b/drivers/staging/r8188eu/os_dep/usb_intf.c
> index e002070f7fba..37694aa96d13 100644
> --- a/drivers/staging/r8188eu/os_dep/usb_intf.c
> +++ b/drivers/staging/r8188eu/os_dep/usb_intf.c
> @@ -129,13 +129,10 @@ static u8 rtw_init_intf_priv(struct dvobj_priv *dvobj)
>  	return rst;
>  }

> -static u8 rtw_deinit_intf_priv(struct dvobj_priv *dvobj)
> +static void rtw_deinit_intf_priv(struct dvobj_priv *dvobj)
>  {
> -	u8 rst = _SUCCESS;
> -
>  	kfree(dvobj->usb_alloc_vendor_req_buf);
>  	_rtw_mutex_free(&dvobj->usb_vendor_req_mutex);
> -	return rst;
>  }

>  static struct dvobj_priv *usb_dvobj_init(struct usb_interface *usb_intf)
> -- 
> 2.32.0

Acked-by: Martin Kaiser <martin@kaiser.cx>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] staging: r8188eu: make rtw_deinit_intf_priv return void
  2021-08-23 18:40 [PATCH] staging: r8188eu: make rtw_deinit_intf_priv return void Pavel Skripkin
  2021-08-23 19:30 ` Martin Kaiser
@ 2021-08-23 19:34 ` Michael Straube
  2021-08-23 21:20 ` Phillip Potter
  2 siblings, 0 replies; 7+ messages in thread
From: Michael Straube @ 2021-08-23 19:34 UTC (permalink / raw)
  To: Pavel Skripkin, Larry.Finger, phil, gregkh; +Cc: linux-staging, linux-kernel

On 8/23/21 8:40 PM, Pavel Skripkin wrote:
> rtw_deinit_intf_priv() always return success, so there is no need in
> return value
> 
> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
> ---
>   drivers/staging/r8188eu/os_dep/usb_intf.c | 5 +----
>   1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/r8188eu/os_dep/usb_intf.c b/drivers/staging/r8188eu/os_dep/usb_intf.c
> index e002070f7fba..37694aa96d13 100644
> --- a/drivers/staging/r8188eu/os_dep/usb_intf.c
> +++ b/drivers/staging/r8188eu/os_dep/usb_intf.c
> @@ -129,13 +129,10 @@ static u8 rtw_init_intf_priv(struct dvobj_priv *dvobj)
>   	return rst;
>   }
>   
> -static u8 rtw_deinit_intf_priv(struct dvobj_priv *dvobj)
> +static void rtw_deinit_intf_priv(struct dvobj_priv *dvobj)
>   {
> -	u8 rst = _SUCCESS;
> -
>   	kfree(dvobj->usb_alloc_vendor_req_buf);
>   	_rtw_mutex_free(&dvobj->usb_vendor_req_mutex);
> -	return rst;
>   }
>   
>   static struct dvobj_priv *usb_dvobj_init(struct usb_interface *usb_intf)
> 

Looks good to me, thanks.

Acked-by: Michael Straube <straube.linux@gmail.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] staging: r8188eu: make rtw_deinit_intf_priv return void
  2021-08-23 18:40 [PATCH] staging: r8188eu: make rtw_deinit_intf_priv return void Pavel Skripkin
  2021-08-23 19:30 ` Martin Kaiser
  2021-08-23 19:34 ` Michael Straube
@ 2021-08-23 21:20 ` Phillip Potter
  2021-08-23 21:29   ` Pavel Skripkin
  2 siblings, 1 reply; 7+ messages in thread
From: Phillip Potter @ 2021-08-23 21:20 UTC (permalink / raw)
  To: Pavel Skripkin
  Cc: Larry Finger, Greg KH, Michael Straube,
	open list:STAGING SUBSYSTEM, Linux Kernel Mailing List

On Mon, 23 Aug 2021 at 19:41, Pavel Skripkin <paskripkin@gmail.com> wrote:
>
> rtw_deinit_intf_priv() always return success, so there is no need in
> return value
>
> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
> ---
>  drivers/staging/r8188eu/os_dep/usb_intf.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/staging/r8188eu/os_dep/usb_intf.c b/drivers/staging/r8188eu/os_dep/usb_intf.c
> index e002070f7fba..37694aa96d13 100644
> --- a/drivers/staging/r8188eu/os_dep/usb_intf.c
> +++ b/drivers/staging/r8188eu/os_dep/usb_intf.c
> @@ -129,13 +129,10 @@ static u8 rtw_init_intf_priv(struct dvobj_priv *dvobj)
>         return rst;
>  }
>
> -static u8 rtw_deinit_intf_priv(struct dvobj_priv *dvobj)
> +static void rtw_deinit_intf_priv(struct dvobj_priv *dvobj)
>  {
> -       u8 rst = _SUCCESS;
> -
>         kfree(dvobj->usb_alloc_vendor_req_buf);
>         _rtw_mutex_free(&dvobj->usb_vendor_req_mutex);
> -       return rst;
>  }
>
>  static struct dvobj_priv *usb_dvobj_init(struct usb_interface *usb_intf)
> --
> 2.32.0
>

Dear Pavel,

Looks good - going to test your RFC series now btw.

Acked-by: Phillip Potter <phil@philpotter.co.uk>

Regards,
Phil

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] staging: r8188eu: make rtw_deinit_intf_priv return void
  2021-08-23 21:20 ` Phillip Potter
@ 2021-08-23 21:29   ` Pavel Skripkin
  2021-08-23 22:23     ` Phillip Potter
  2021-08-23 22:26     ` Phillip Potter
  0 siblings, 2 replies; 7+ messages in thread
From: Pavel Skripkin @ 2021-08-23 21:29 UTC (permalink / raw)
  To: Phillip Potter
  Cc: Larry Finger, Greg KH, Michael Straube,
	open list:STAGING SUBSYSTEM, Linux Kernel Mailing List

On 8/24/21 12:20 AM, Phillip Potter wrote:
> On Mon, 23 Aug 2021 at 19:41, Pavel Skripkin <paskripkin@gmail.com> wrote:
>>
>> rtw_deinit_intf_priv() always return success, so there is no need in
>> return value
>>
>> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
>> ---
>>  drivers/staging/r8188eu/os_dep/usb_intf.c | 5 +----
>>  1 file changed, 1 insertion(+), 4 deletions(-)
>>
>> diff --git a/drivers/staging/r8188eu/os_dep/usb_intf.c b/drivers/staging/r8188eu/os_dep/usb_intf.c
>> index e002070f7fba..37694aa96d13 100644
>> --- a/drivers/staging/r8188eu/os_dep/usb_intf.c
>> +++ b/drivers/staging/r8188eu/os_dep/usb_intf.c
>> @@ -129,13 +129,10 @@ static u8 rtw_init_intf_priv(struct dvobj_priv *dvobj)
>>         return rst;
>>  }
>>
>> -static u8 rtw_deinit_intf_priv(struct dvobj_priv *dvobj)
>> +static void rtw_deinit_intf_priv(struct dvobj_priv *dvobj)
>>  {
>> -       u8 rst = _SUCCESS;
>> -
>>         kfree(dvobj->usb_alloc_vendor_req_buf);
>>         _rtw_mutex_free(&dvobj->usb_vendor_req_mutex);
>> -       return rst;
>>  }
>>
>>  static struct dvobj_priv *usb_dvobj_init(struct usb_interface *usb_intf)
>> --
>> 2.32.0
>>
> 
> Dear Pavel,
> 
> Looks good - going to test your RFC series now btw.
> 

Thank you, Phillip!


Testing this RFC is very important. If it's all ok with it, I am going 
to add proper error handling all across the driver code, based on read() 
errors :)

Btw, we also can add error handling for write() operations, but I think 
it's not _very_ important, since driver won't misbehave in case of write 
failures



With regards,
Pavel Skripkin

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] staging: r8188eu: make rtw_deinit_intf_priv return void
  2021-08-23 21:29   ` Pavel Skripkin
@ 2021-08-23 22:23     ` Phillip Potter
  2021-08-23 22:26     ` Phillip Potter
  1 sibling, 0 replies; 7+ messages in thread
From: Phillip Potter @ 2021-08-23 22:23 UTC (permalink / raw)
  To: Pavel Skripkin
  Cc: Larry Finger, Greg KH, Michael Straube,
	open list:STAGING SUBSYSTEM, Linux Kernel Mailing List

On Mon, 23 Aug 2021 at 22:29, Pavel Skripkin <paskripkin@gmail.com> wrote:
>
> On 8/24/21 12:20 AM, Phillip Potter wrote:
> > On Mon, 23 Aug 2021 at 19:41, Pavel Skripkin <paskripkin@gmail.com> wrote:
> >>
> >> rtw_deinit_intf_priv() always return success, so there is no need in
> >> return value
> >>
> >> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
> >> ---
> >>  drivers/staging/r8188eu/os_dep/usb_intf.c | 5 +----
> >>  1 file changed, 1 insertion(+), 4 deletions(-)
> >>
> >> diff --git a/drivers/staging/r8188eu/os_dep/usb_intf.c b/drivers/staging/r8188eu/os_dep/usb_intf.c
> >> index e002070f7fba..37694aa96d13 100644
> >> --- a/drivers/staging/r8188eu/os_dep/usb_intf.c
> >> +++ b/drivers/staging/r8188eu/os_dep/usb_intf.c
> >> @@ -129,13 +129,10 @@ static u8 rtw_init_intf_priv(struct dvobj_priv *dvobj)
> >>         return rst;
> >>  }
> >>
> >> -static u8 rtw_deinit_intf_priv(struct dvobj_priv *dvobj)
> >> +static void rtw_deinit_intf_priv(struct dvobj_priv *dvobj)
> >>  {
> >> -       u8 rst = _SUCCESS;
> >> -
> >>         kfree(dvobj->usb_alloc_vendor_req_buf);
> >>         _rtw_mutex_free(&dvobj->usb_vendor_req_mutex);
> >> -       return rst;
> >>  }
> >>
> >>  static struct dvobj_priv *usb_dvobj_init(struct usb_interface *usb_intf)
> >> --
> >> 2.32.0
> >>
> >
> > Dear Pavel,
> >
> > Looks good - going to test your RFC series now btw.
> >
>
> Thank you, Phillip!
>
>
> Testing this RFC is very important. If it's all ok with it, I am going
> to add proper error handling all across the driver code, based on read()
> errors :)
>
> Btw, we also can add error handling for write() operations, but I think
> it's not _very_ important, since driver won't misbehave in case of write
> failures
>
>
>
> With regards,
> Pavel Skripkin

Dear Pavel,

Happy to help :-)

Sorry to report, but your RFC series generates an OOPS on boot for me,
in usb_read32. Just doing a stack trace decode to figure out where
failure is and I will report back.

Regards,
Phil

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] staging: r8188eu: make rtw_deinit_intf_priv return void
  2021-08-23 21:29   ` Pavel Skripkin
  2021-08-23 22:23     ` Phillip Potter
@ 2021-08-23 22:26     ` Phillip Potter
  1 sibling, 0 replies; 7+ messages in thread
From: Phillip Potter @ 2021-08-23 22:26 UTC (permalink / raw)
  To: Pavel Skripkin
  Cc: Larry Finger, Greg KH, Michael Straube,
	open list:STAGING SUBSYSTEM, Linux Kernel Mailing List

On Mon, 23 Aug 2021 at 22:29, Pavel Skripkin <paskripkin@gmail.com> wrote:
>
> On 8/24/21 12:20 AM, Phillip Potter wrote:
> > On Mon, 23 Aug 2021 at 19:41, Pavel Skripkin <paskripkin@gmail.com> wrote:
> >>
> >> rtw_deinit_intf_priv() always return success, so there is no need in
> >> return value
> >>
> >> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
> >> ---
> >>  drivers/staging/r8188eu/os_dep/usb_intf.c | 5 +----
> >>  1 file changed, 1 insertion(+), 4 deletions(-)
> >>
> >> diff --git a/drivers/staging/r8188eu/os_dep/usb_intf.c b/drivers/staging/r8188eu/os_dep/usb_intf.c
> >> index e002070f7fba..37694aa96d13 100644
> >> --- a/drivers/staging/r8188eu/os_dep/usb_intf.c
> >> +++ b/drivers/staging/r8188eu/os_dep/usb_intf.c
> >> @@ -129,13 +129,10 @@ static u8 rtw_init_intf_priv(struct dvobj_priv *dvobj)
> >>         return rst;
> >>  }
> >>
> >> -static u8 rtw_deinit_intf_priv(struct dvobj_priv *dvobj)
> >> +static void rtw_deinit_intf_priv(struct dvobj_priv *dvobj)
> >>  {
> >> -       u8 rst = _SUCCESS;
> >> -
> >>         kfree(dvobj->usb_alloc_vendor_req_buf);
> >>         _rtw_mutex_free(&dvobj->usb_vendor_req_mutex);
> >> -       return rst;
> >>  }
> >>
> >>  static struct dvobj_priv *usb_dvobj_init(struct usb_interface *usb_intf)
> >> --
> >> 2.32.0
> >>
> >
> > Dear Pavel,
> >
> > Looks good - going to test your RFC series now btw.
> >
>
> Thank you, Phillip!
>
>
> Testing this RFC is very important. If it's all ok with it, I am going
> to add proper error handling all across the driver code, based on read()
> errors :)
>
> Btw, we also can add error handling for write() operations, but I think
> it's not _very_ important, since driver won't misbehave in case of write
> failures
>
>
>
> With regards,
> Pavel Skripkin

Sorry, it also occurred to me after sending it would be better to have
mentioned this as a reply to that patch series rather than to this
e-mail. Apologies if I've confused anyone. Anyhow, I shall report my
findings on that e-mail thread.

Regards,
Phil

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-08-23 22:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-23 18:40 [PATCH] staging: r8188eu: make rtw_deinit_intf_priv return void Pavel Skripkin
2021-08-23 19:30 ` Martin Kaiser
2021-08-23 19:34 ` Michael Straube
2021-08-23 21:20 ` Phillip Potter
2021-08-23 21:29   ` Pavel Skripkin
2021-08-23 22:23     ` Phillip Potter
2021-08-23 22:26     ` Phillip Potter

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).