mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] usb: cdns3: Modify the return value of cdns_set_active () to void when CONFIG_PM_SLEEP is disabled
@ 2023-09-12  6:49 Xiaolei Wang
  2023-09-20  7:02 ` Pavel Machek
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Xiaolei Wang @ 2023-09-12  6:49 UTC (permalink / raw)
  To: peter.chen, pawell, rogerq, gregkh, pavel; +Cc: linux-usb, linux-kernel

The return type of cdns_set_active () is inconsistent
depending on whether CONFIG_PM_SLEEP is enabled, so the
return value is modified to void type.

Reported-by: Pavel Machek <pavel@denx.de>
Closes: https://lore.kernel.org/all/ZP7lIKUzD68XA91j@duo.ucw.cz/
Fixes: 2319b9c87fe2 ("usb: cdns3: Put the cdns set active part outside the spin lock")
Signed-off-by: Xiaolei Wang <xiaolei.wang@windriver.com>
---
 drivers/usb/cdns3/core.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/usb/cdns3/core.h b/drivers/usb/cdns3/core.h
index 4a4dbc2c1561..81a9c9d6be08 100644
--- a/drivers/usb/cdns3/core.h
+++ b/drivers/usb/cdns3/core.h
@@ -131,8 +131,7 @@ void cdns_set_active(struct cdns *cdns, u8 set_active);
 #else /* CONFIG_PM_SLEEP */
 static inline int cdns_resume(struct cdns *cdns)
 { return 0; }
-static inline int cdns_set_active(struct cdns *cdns, u8 set_active)
-{ return 0; }
+static inline void cdns_set_active(struct cdns *cdns, u8 set_active) { }
 static inline int cdns_suspend(struct cdns *cdns)
 { return 0; }
 #endif /* CONFIG_PM_SLEEP */
-- 
2.25.1


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

* Re: [PATCH] usb: cdns3: Modify the return value of cdns_set_active () to void when CONFIG_PM_SLEEP is disabled
  2023-09-12  6:49 [PATCH] usb: cdns3: Modify the return value of cdns_set_active () to void when CONFIG_PM_SLEEP is disabled Xiaolei Wang
@ 2023-09-20  7:02 ` Pavel Machek
  2023-09-20  7:23 ` Roger Quadros
  2023-09-20  7:29 ` Roger Quadros
  2 siblings, 0 replies; 5+ messages in thread
From: Pavel Machek @ 2023-09-20  7:02 UTC (permalink / raw)
  To: Xiaolei Wang
  Cc: peter.chen, pawell, rogerq, gregkh, pavel, linux-usb, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 553 bytes --]

Hi!

> The return type of cdns_set_active () is inconsistent
> depending on whether CONFIG_PM_SLEEP is enabled, so the
> return value is modified to void type.
> 

Reviewed-by: Pavel Machek <pavel@denx.de>

> Closes: https://lore.kernel.org/all/ZP7lIKUzD68XA91j@duo.ucw.cz/
> Fixes: 2319b9c87fe2 ("usb: cdns3: Put the cdns set active part outside the spin lock")

Best regards,
								Pavel
-- 
DENX Software Engineering GmbH,        Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

* Re: [PATCH] usb: cdns3: Modify the return value of cdns_set_active () to void when CONFIG_PM_SLEEP is disabled
  2023-09-12  6:49 [PATCH] usb: cdns3: Modify the return value of cdns_set_active () to void when CONFIG_PM_SLEEP is disabled Xiaolei Wang
  2023-09-20  7:02 ` Pavel Machek
@ 2023-09-20  7:23 ` Roger Quadros
  2023-09-20  7:29 ` Roger Quadros
  2 siblings, 0 replies; 5+ messages in thread
From: Roger Quadros @ 2023-09-20  7:23 UTC (permalink / raw)
  To: Xiaolei Wang, peter.chen, pawell, gregkh, pavel; +Cc: linux-usb, linux-kernel



On 12/09/2023 09:49, Xiaolei Wang wrote:
> The return type of cdns_set_active () is inconsistent
> depending on whether CONFIG_PM_SLEEP is enabled, so the
> return value is modified to void type.
> 
> Reported-by: Pavel Machek <pavel@denx.de>
> Closes: https://lore.kernel.org/all/ZP7lIKUzD68XA91j@duo.ucw.cz/
> Fixes: 2319b9c87fe2 ("usb: cdns3: Put the cdns set active part outside the spin lock")
> Signed-off-by: Xiaolei Wang <xiaolei.wang@windriver.com>
> ---

Reviewed-by: Roger Quadros <rogerq@kernel.org>

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

* Re: [PATCH] usb: cdns3: Modify the return value of cdns_set_active () to void when CONFIG_PM_SLEEP is disabled
  2023-09-12  6:49 [PATCH] usb: cdns3: Modify the return value of cdns_set_active () to void when CONFIG_PM_SLEEP is disabled Xiaolei Wang
  2023-09-20  7:02 ` Pavel Machek
  2023-09-20  7:23 ` Roger Quadros
@ 2023-09-20  7:29 ` Roger Quadros
  2023-09-20  7:45   ` wangxiaolei
  2 siblings, 1 reply; 5+ messages in thread
From: Roger Quadros @ 2023-09-20  7:29 UTC (permalink / raw)
  To: Xiaolei Wang, peter.chen, pawell, gregkh, pavel; +Cc: linux-usb, linux-kernel

Hi Xiaolei,

On 12/09/2023 09:49, Xiaolei Wang wrote:
> The return type of cdns_set_active () is inconsistent
> depending on whether CONFIG_PM_SLEEP is enabled, so the
> return value is modified to void type.
> 
> Reported-by: Pavel Machek <pavel@denx.de>
> Closes: https://lore.kernel.org/all/ZP7lIKUzD68XA91j@duo.ucw.cz/
> Fixes: 2319b9c87fe2 ("usb: cdns3: Put the cdns set active part outside the spin lock")
> Signed-off-by: Xiaolei Wang <xiaolei.wang@windriver.com>

Should this be CC to stable as the original patch which this patch is
fixing has made it into the stable trees.

> ---
>  drivers/usb/cdns3/core.h | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/cdns3/core.h b/drivers/usb/cdns3/core.h
> index 4a4dbc2c1561..81a9c9d6be08 100644
> --- a/drivers/usb/cdns3/core.h
> +++ b/drivers/usb/cdns3/core.h
> @@ -131,8 +131,7 @@ void cdns_set_active(struct cdns *cdns, u8 set_active);
>  #else /* CONFIG_PM_SLEEP */
>  static inline int cdns_resume(struct cdns *cdns)
>  { return 0; }
> -static inline int cdns_set_active(struct cdns *cdns, u8 set_active)
> -{ return 0; }
> +static inline void cdns_set_active(struct cdns *cdns, u8 set_active) { }
>  static inline int cdns_suspend(struct cdns *cdns)
>  { return 0; }
>  #endif /* CONFIG_PM_SLEEP */

-- 
cheers,
-roger

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

* Re: [PATCH] usb: cdns3: Modify the return value of cdns_set_active () to void when CONFIG_PM_SLEEP is disabled
  2023-09-20  7:29 ` Roger Quadros
@ 2023-09-20  7:45   ` wangxiaolei
  0 siblings, 0 replies; 5+ messages in thread
From: wangxiaolei @ 2023-09-20  7:45 UTC (permalink / raw)
  To: Roger Quadros, peter.chen, pawell, gregkh, pavel; +Cc: linux-usb, linux-kernel


On 9/20/23 3:29 PM, Roger Quadros wrote:
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> Hi Xiaolei,
>
> On 12/09/2023 09:49, Xiaolei Wang wrote:
>> The return type of cdns_set_active () is inconsistent
>> depending on whether CONFIG_PM_SLEEP is enabled, so the
>> return value is modified to void type.
>>
>> Reported-by: Pavel Machek <pavel@denx.de>
>> Closes: https://lore.kernel.org/all/ZP7lIKUzD68XA91j@duo.ucw.cz/
>> Fixes: 2319b9c87fe2 ("usb: cdns3: Put the cdns set active part outside the spin lock")
>> Signed-off-by: Xiaolei Wang <xiaolei.wang@windriver.com>
> Should this be CC to stable as the original patch which this patch is
> fixing has made it into the stable trees.

Oh yes, I will send a v2 version with Cc: stable@vger.kernel.org,

thanks

xiaolei

>
>> ---
>>   drivers/usb/cdns3/core.h | 3 +--
>>   1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/drivers/usb/cdns3/core.h b/drivers/usb/cdns3/core.h
>> index 4a4dbc2c1561..81a9c9d6be08 100644
>> --- a/drivers/usb/cdns3/core.h
>> +++ b/drivers/usb/cdns3/core.h
>> @@ -131,8 +131,7 @@ void cdns_set_active(struct cdns *cdns, u8 set_active);
>>   #else /* CONFIG_PM_SLEEP */
>>   static inline int cdns_resume(struct cdns *cdns)
>>   { return 0; }
>> -static inline int cdns_set_active(struct cdns *cdns, u8 set_active)
>> -{ return 0; }
>> +static inline void cdns_set_active(struct cdns *cdns, u8 set_active) { }
>>   static inline int cdns_suspend(struct cdns *cdns)
>>   { return 0; }
>>   #endif /* CONFIG_PM_SLEEP */
> --
> cheers,
> -roger

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

end of thread, other threads:[~2023-09-20  7:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-12  6:49 [PATCH] usb: cdns3: Modify the return value of cdns_set_active () to void when CONFIG_PM_SLEEP is disabled Xiaolei Wang
2023-09-20  7:02 ` Pavel Machek
2023-09-20  7:23 ` Roger Quadros
2023-09-20  7:29 ` Roger Quadros
2023-09-20  7:45   ` wangxiaolei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®