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 2 participants 3 messages Sep 20, 2023 – Sep 25, 2023

Subsystems (3)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 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")

---

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

---
 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
maintainer Acked-by on v3 1/1
#1 lore raw
Quoted 11 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")
Quoted 26 lines

---

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

---
 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
Signature · 2 lines
Thanks,
Peter Chen
maintainer
#2 lore raw
In reply to Xiaolei Wang
Quoted 11 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")
Quoted 6 lines

---

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

---

Above "---" doesn't need.

Peter

Quoted 20 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 · 1 line
2.25.1
Signature · 2 lines
Thanks,
Peter Chen