Skip to contentSkip to conversation

usb: cdns3: Modify the return value of cdns_set_active () to void when CONFIG_PM_SLEEP is disabled

PATCH Superseded Xiaolei Wang 3 participants 5 messages Sep 12, 2023 – Sep 20, 2023

Subsystems (3)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

Fixes 2319b9c87fe2 ("usb: cdns3: Put the cdns set active part outside the spin lock")
---
 drivers/usb/cdns3/core.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/usb/cdns3/core.h +1 -2
index 4a4dbc2c1561..81a9c9d6be08 100644
@@ -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 */
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw

Hi!

Quoted 4 lines

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.

Quoted 2 lines
Fixes 2319b9c87fe2 ("usb: cdns3: Put the cdns set active part outside the spin lock")

Best regards,
Pavel

Signature · 2 lines
DENX Software Engineering GmbH,        Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
reviewer Reviewed-by on v1 1/1
#2 lore raw
In reply to Xiaolei Wang
Quoted 9 lines · Xiaolei Wang

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.

Fixes 2319b9c87fe2 ("usb: cdns3: Put the cdns set active part outside the spin lock")

---

reviewer
#3 lore raw
In reply to Xiaolei Wang

Hi Xiaolei,

Quoted 8 lines · Xiaolei Wang

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.

Fixes 2319b9c87fe2 ("usb: cdns3: Put the cdns set active part outside the spin lock")

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

Quoted 18 lines
---
 drivers/usb/cdns3/core.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/usb/cdns3/core.h +1 -2
index 4a4dbc2c1561..81a9c9d6be08 100644
@@ -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 */
Signature · 2 lines
cheers,
-roger
#4 lore raw
Quoted 10 lines · Roger Quadros

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,

Quoted 4 lines · Xiaolei Wang

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.

Quoted 6 lines
Quoted 4 lines
Fixes 2319b9c87fe2 ("usb: cdns3: Put the cdns set active part outside the spin lock")

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: [email protected],

thanks

xiaolei

Quoted 22 lines
Quoted 10 lines
---
  drivers/usb/cdns3/core.h | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
drivers/usb/cdns3/core.h +0 -0
index 4a4dbc2c1561..81a9c9d6be08 100644

drivers/usb/cdns3/core.h void cdns_set_active(struct cdns *cdns, u8 set_active); · line 137

Quoted 9 lines
drivers/usb/cdns3/core.h +1 -2
@@ -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