Skip to contentSkip to conversation

ARM: OMAP1: usb: fix sparse warnings

PATCH New Paul Walmsley 3 participants 8 messages Oct 26, 2012 – Oct 29, 2012

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: OMAP1: usb: fix sparse warnings

Resolve the following sparse warnings:

arch/arm/mach-omap1/usb.c:304:12: warning: symbol 'omap1_usb0_init' was not declared. Should it be static? arch/arm/mach-omap1/usb.c:412:12: warning: symbol 'omap1_usb1_init' was not declared. Should it be static? arch/arm/mach-omap1/usb.c:478:12: warning: symbol 'omap1_usb2_init' was not declared. Should it be static?

by declaring those functions as static. Also remove the unneeded prototypes and related code from the plat/usb.h header file.

Cc Tony Lindgren <[email protected]>
Cc Felipe Balbi <[email protected]>

---

Tony, care to take this one?

 arch/arm/mach-omap1/usb.c             |    6 +++---
 arch/arm/plat-omap/include/plat/usb.h |   20 --------------------
 2 files changed, 3 insertions(+), 23 deletions(-)
arch/arm/mach-omap1/usb.c +3 -3
index 84267ed..104fed3 100644
@@ -301,7 +301,7 @@ static inline void otg_device_init(struct omap_usb_config *pdata)
 
 #endif
 
-u32 __init omap1_usb0_init(unsigned nwires, unsigned is_device)
+static u32 __init omap1_usb0_init(unsigned nwires, unsigned is_device)
 {
 	u32	syscon1 = 0;
 
@@ -409,7 +409,7 @@ u32 __init omap1_usb0_init(unsigned nwires, unsigned is_device)
 	return syscon1 << 16;
 }
 
-u32 __init omap1_usb1_init(unsigned nwires)
+static u32 __init omap1_usb1_init(unsigned nwires)
 {
 	u32	syscon1 = 0;
 
@@ -475,7 +475,7 @@ bad:
 	return syscon1 << 20;
 }
 
-u32 __init omap1_usb2_init(unsigned nwires, unsigned alt_pingroup)
+static u32 __init omap1_usb2_init(unsigned nwires, unsigned alt_pingroup)
 {
 	u32	syscon1 = 0;
 
arch/arm/plat-omap/include/plat/usb.h +0 -20
index 87ee140..669baa1 100644
@@ -156,24 +156,4 @@ extern void ti81xx_musb_phy_power(u8 on);
 #define USBPHY_OTGSESSEND_EN	(1 << 20)
 #define USBPHY_DATA_POLARITY	(1 << 23)
 
-#if defined(CONFIG_ARCH_OMAP1) && defined(CONFIG_USB)
-u32 omap1_usb0_init(unsigned nwires, unsigned is_device);
-u32 omap1_usb1_init(unsigned nwires);
-u32 omap1_usb2_init(unsigned nwires, unsigned alt_pingroup);
-#else
-static inline u32 omap1_usb0_init(unsigned nwires, unsigned is_device)
-{
-	return 0;
-}
-static inline u32 omap1_usb1_init(unsigned nwires)
-{
-	return 0;
-
-}
-static inline u32 omap1_usb2_init(unsigned nwires, unsigned alt_pingroup)
-{
-	return 0;
-}
-#endif
-
 #endif	/* __ASM_ARCH_OMAP_USB_H */
Signature · 1 line
1.7.10.4
reviewer
#1 lore raw

PATCH 1/1 ARM: OMAP1: usb: fix sparse warnings

Quoted 10 lines · Paul Walmsley

Resolve the following sparse warnings:

arch/arm/mach-omap1/usb.c:304:12: warning: symbol 'omap1_usb0_init' was not declared. Should it be static? arch/arm/mach-omap1/usb.c:412:12: warning: symbol 'omap1_usb1_init' was not declared. Should it be static? arch/arm/mach-omap1/usb.c:478:12: warning: symbol 'omap1_usb2_init' was not declared. Should it be static?

by declaring those functions as static. Also remove the unneeded prototypes and related code from the plat/usb.h header file.

Quoted 6 lines
Cc Tony Lindgren <[email protected]>
Cc Felipe Balbi <[email protected]>

---

Tony, care to take this one?

Let's apply just the usb.c changes on omap-for-v3.8/cleanup-headers as plat/usb.h is now gone?

Regards,

Tony

Quoted 71 lines
 arch/arm/mach-omap1/usb.c             |    6 +++---
 arch/arm/plat-omap/include/plat/usb.h |   20 --------------------
 2 files changed, 3 insertions(+), 23 deletions(-)
arch/arm/mach-omap1/usb.c +3 -3
index 84267ed..104fed3 100644
@@ -301,7 +301,7 @@ static inline void otg_device_init(struct omap_usb_config *pdata)
 
 #endif
 
-u32 __init omap1_usb0_init(unsigned nwires, unsigned is_device)
+static u32 __init omap1_usb0_init(unsigned nwires, unsigned is_device)
 {
 	u32	syscon1 = 0;
 
@@ -409,7 +409,7 @@ u32 __init omap1_usb0_init(unsigned nwires, unsigned is_device)
 	return syscon1 << 16;
 }
 
-u32 __init omap1_usb1_init(unsigned nwires)
+static u32 __init omap1_usb1_init(unsigned nwires)
 {
 	u32	syscon1 = 0;
 
@@ -475,7 +475,7 @@ bad:
 	return syscon1 << 20;
 }
 
-u32 __init omap1_usb2_init(unsigned nwires, unsigned alt_pingroup)
+static u32 __init omap1_usb2_init(unsigned nwires, unsigned alt_pingroup)
 {
 	u32	syscon1 = 0;
 
arch/arm/plat-omap/include/plat/usb.h +0 -20
index 87ee140..669baa1 100644
@@ -156,24 +156,4 @@ extern void ti81xx_musb_phy_power(u8 on);
 #define USBPHY_OTGSESSEND_EN	(1 << 20)
 #define USBPHY_DATA_POLARITY	(1 << 23)
 
-#if defined(CONFIG_ARCH_OMAP1) && defined(CONFIG_USB)
-u32 omap1_usb0_init(unsigned nwires, unsigned is_device);
-u32 omap1_usb1_init(unsigned nwires);
-u32 omap1_usb2_init(unsigned nwires, unsigned alt_pingroup);
-#else
-static inline u32 omap1_usb0_init(unsigned nwires, unsigned is_device)
-{
-	return 0;
-}
-static inline u32 omap1_usb1_init(unsigned nwires)
-{
-	return 0;
-
-}
-static inline u32 omap1_usb2_init(unsigned nwires, unsigned alt_pingroup)
-{
-	return 0;
-}
-#endif
-
 #endif	/* __ASM_ARCH_OMAP_USB_H */
Signature · 6 lines
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw

PATCH 1/1 ARM: OMAP1: usb: fix sparse warnings

Quoted 16 lines · Tony Lindgren
Quoted 15 lines · Paul Walmsley

Resolve the following sparse warnings:

arch/arm/mach-omap1/usb.c:304:12: warning: symbol 'omap1_usb0_init' was not declared. Should it be static? arch/arm/mach-omap1/usb.c:412:12: warning: symbol 'omap1_usb1_init' was not declared. Should it be static? arch/arm/mach-omap1/usb.c:478:12: warning: symbol 'omap1_usb2_init' was not declared. Should it be static?

by declaring those functions as static. Also remove the unneeded prototypes and related code from the plat/usb.h header file.

Cc Tony Lindgren <[email protected]>
Cc Felipe Balbi <[email protected]>

---

Quoted 4 lines
Quoted 1 line

Tony, care to take this one?

Let's apply just the usb.c changes on omap-for-v3.8/cleanup-headers as plat/usb.h is now gone?

OK no problem, thought you might want it for the -rc series...

- Paul

reviewer
#3 lore raw

PATCH 1/1 ARM: OMAP1: usb: fix sparse warnings

Quoted 18 lines · Paul Walmsley
Quoted 16 lines · Tony Lindgren
Quoted 15 lines · Paul Walmsley

Resolve the following sparse warnings:

arch/arm/mach-omap1/usb.c:304:12: warning: symbol 'omap1_usb0_init' was not declared. Should it be static? arch/arm/mach-omap1/usb.c:412:12: warning: symbol 'omap1_usb1_init' was not declared. Should it be static? arch/arm/mach-omap1/usb.c:478:12: warning: symbol 'omap1_usb2_init' was not declared. Should it be static?

by declaring those functions as static. Also remove the unneeded prototypes and related code from the plat/usb.h header file.

Cc Tony Lindgren <[email protected]>
Cc Felipe Balbi <[email protected]>

---

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Tony, care to take this one?

Let's apply just the usb.c changes on omap-for-v3.8/cleanup-headers as plat/usb.h is now gone?

OK no problem, thought you might want it for the -rc series...

Looks like it's not urgent for the -rc series, so let's not introduce more self-inflicted merge conflicts. If that's OK with you, I can apply it to omap-for-v3.8/cleanup-headers without the header changes.

Regards,

Tony

#4 lore raw

PATCH 1/1 ARM: OMAP1: usb: fix sparse warnings

Quoted 4 lines · Tony Lindgren

Looks like it's not urgent for the -rc series, so let's not introduce more self-inflicted merge conflicts. If that's OK with you, I can apply it to omap-for-v3.8/cleanup-headers without the header changes.

Yep that's fine, better to avoid creating unnecessary merge conflicts for sure. Just sent the version against omap-for-v3.8/cleanup-headers...

- Paul

#5 lore raw

PATCH v2 1/1 ARM: OMAP1: usb: fix sparse warnings

In reply to Tony Lindgren

Resolve the following sparse warnings:

arch/arm/mach-omap1/usb.c:304:12: warning: symbol 'omap1_usb0_init' was not declared. Should it be static? arch/arm/mach-omap1/usb.c:412:12: warning: symbol 'omap1_usb1_init' was not declared. Should it be static? arch/arm/mach-omap1/usb.c:478:12: warning: symbol 'omap1_usb2_init' was not declared. Should it be static?

by declaring those functions as static.

Cc Tony Lindgren <[email protected]>
Cc Felipe Balbi <[email protected]>

---

Applies on linux-omap/omap-for-v3.8/cleanup-headers.

 arch/arm/mach-omap1/usb.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/mach-omap1/usb.c +3 -3
index 84267ed..104fed3 100644
@@ -301,7 +301,7 @@ static inline void otg_device_init(struct omap_usb_config *pdata)
 
 #endif
 
-u32 __init omap1_usb0_init(unsigned nwires, unsigned is_device)
+static u32 __init omap1_usb0_init(unsigned nwires, unsigned is_device)
 {
 	u32	syscon1 = 0;
 
@@ -409,7 +409,7 @@ u32 __init omap1_usb0_init(unsigned nwires, unsigned is_device)
 	return syscon1 << 16;
 }
 
-u32 __init omap1_usb1_init(unsigned nwires)
+static u32 __init omap1_usb1_init(unsigned nwires)
 {
 	u32	syscon1 = 0;
 
@@ -475,7 +475,7 @@ bad:
 	return syscon1 << 20;
 }
 
-u32 __init omap1_usb2_init(unsigned nwires, unsigned alt_pingroup)
+static u32 __init omap1_usb2_init(unsigned nwires, unsigned alt_pingroup)
 {
 	u32	syscon1 = 0;
 
Signature · 1 line
1.7.10.4
reviewer Applied
#6 lore raw

PATCH v2 1/1 ARM: OMAP1: usb: fix sparse warnings

Quoted 7 lines · Paul Walmsley

Resolve the following sparse warnings:

arch/arm/mach-omap1/usb.c:304:12: warning: symbol 'omap1_usb0_init' was not declared. Should it be static? arch/arm/mach-omap1/usb.c:412:12: warning: symbol 'omap1_usb1_init' was not declared. Should it be static? arch/arm/mach-omap1/usb.c:478:12: warning: symbol 'omap1_usb2_init' was not declared. Should it be static?

Quoted 8 lines

by declaring those functions as static.

Cc Tony Lindgren <[email protected]>
Cc Felipe Balbi <[email protected]>

---

Applies on linux-omap/omap-for-v3.8/cleanup-headers.

Thanks applied.

Regards,

Tony

#7 lore raw

PATCH v2 1/1 ARM: OMAP1: usb: fix sparse warnings

In reply to Paul Walmsley
Quoted 7 lines · Paul Walmsley

Resolve the following sparse warnings:

arch/arm/mach-omap1/usb.c:304:12: warning: symbol 'omap1_usb0_init' was not declared. Should it be static? arch/arm/mach-omap1/usb.c:412:12: warning: symbol 'omap1_usb1_init' was not declared. Should it be static? arch/arm/mach-omap1/usb.c:478:12: warning: symbol 'omap1_usb2_init' was not declared. Should it be static?

Quoted 5 lines

by declaring those functions as static.

Cc Tony Lindgren <[email protected]>
Cc Felipe Balbi <[email protected]>
Quoted 41 lines

---

Applies on linux-omap/omap-for-v3.8/cleanup-headers.

 arch/arm/mach-omap1/usb.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/mach-omap1/usb.c +3 -3
index 84267ed..104fed3 100644
@@ -301,7 +301,7 @@ static inline void otg_device_init(struct omap_usb_config *pdata)
 
 #endif
 
-u32 __init omap1_usb0_init(unsigned nwires, unsigned is_device)
+static u32 __init omap1_usb0_init(unsigned nwires, unsigned is_device)
 {
 	u32	syscon1 = 0;
 
@@ -409,7 +409,7 @@ u32 __init omap1_usb0_init(unsigned nwires, unsigned is_device)
 	return syscon1 << 16;
 }
 
-u32 __init omap1_usb1_init(unsigned nwires)
+static u32 __init omap1_usb1_init(unsigned nwires)
 {
 	u32	syscon1 = 0;
 
@@ -475,7 +475,7 @@ bad:
 	return syscon1 << 20;
 }
 
-u32 __init omap1_usb2_init(unsigned nwires, unsigned alt_pingroup)
+static u32 __init omap1_usb2_init(unsigned nwires, unsigned alt_pingroup)
 {
 	u32	syscon1 = 0;
 
Signature · 1 line
1.7.10.4
Signature · 8 lines
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20121029/cecc3b45/attachment.sig>