2023-09-21 02:30:48

by Xiaolei Wang

[permalink] [raw]
Subject: [PATCH v3] usb: cdns3: Modify the return value of cdns_set_active () to void when CONFIG_PM_SLEEP is disabled

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 <[email protected]>
Closes: https://lore.kernel.org/all/[email protected]/
Fixes: 2319b9c87fe2 ("usb: cdns3: Put the cdns set active part outside the spin lock")
Cc: [email protected]
Signed-off-by: Xiaolei Wang <[email protected]>
Reviewed-by: Pavel Machek <[email protected]>
Reviewed-by: Roger Quadros <[email protected]>
---

Changes in v3:
- Add Cc: [email protected]

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


2023-09-25 11:59:09

by Peter Chen

[permalink] [raw]
Subject: Re: [PATCH v3] usb: cdns3: Modify the return value of cdns_set_active () to void when CONFIG_PM_SLEEP is disabled

On 23-09-20 22:40:45, 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 <[email protected]>
> Closes: https://lore.kernel.org/all/[email protected]/
> Fixes: 2319b9c87fe2 ("usb: cdns3: Put the cdns set active part outside the spin lock")
> Cc: [email protected]
> Signed-off-by: Xiaolei Wang <[email protected]>
> Reviewed-by: Pavel Machek <[email protected]>
> Reviewed-by: Roger Quadros <[email protected]>
> ---
>
> Changes in v3:
> - Add Cc: [email protected]
>
> ---

Above "---" doesn't need.

Peter

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

--

Thanks,
Peter Chen

2023-09-25 12:28:40

by Peter Chen

[permalink] [raw]
Subject: Re: [PATCH v3] usb: cdns3: Modify the return value of cdns_set_active () to void when CONFIG_PM_SLEEP is disabled

On 23-09-20 22:40:45, 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 <[email protected]>
> Closes: https://lore.kernel.org/all/[email protected]/
> Fixes: 2319b9c87fe2 ("usb: cdns3: Put the cdns set active part outside the spin lock")
> Cc: [email protected]
> Signed-off-by: Xiaolei Wang <[email protected]>
> Reviewed-by: Pavel Machek <[email protected]>
> Reviewed-by: Roger Quadros <[email protected]>

Acked-by: Peter Chen <[email protected]>
> ---
>
> Changes in v3:
> - Add Cc: [email protected]
>
> ---
> 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
>

--

Thanks,
Peter Chen