Skip to contentSkip to conversation

usb: musb: OMAP4430: Remove a redundant omap4430_phy_init call in usb_musb_init

PATCH In review Axel Lin 4 participants 5 messages Sep 20, 2011 – Oct 3, 2011

Subsystems (4)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 usb: musb: OMAP4430: Remove a redundant omap4430_phy_init call in usb_musb_init

Current code calls omap4430_phy_init() twice in usb_musb_init(). Calling omap4430_phy_init() once is enough.
This patch removes the first omap4430_phy_init() call, which using an uninitialized pointer as parameter.

This patch elimates below build warning:
arch/arm/mach-omap2/usb-musb.c: In function 'usb_musb_init':
arch/arm/mach-omap2/usb-musb.c:141: warning: 'dev' may be used uninitialized in this function

---
 arch/arm/mach-omap2/usb-musb.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
arch/arm/mach-omap2/usb-musb.c +0 -3
index a65145b..19e4dac 100644
@@ -137,9 +137,6 @@ void __init usb_musb_init(struct omap_musb_board_data *musb_board_data)
 	musb_plat.mode = board_data->mode;
 	musb_plat.extvbus = board_data->extvbus;
 
-	if (cpu_is_omap44xx())
-		omap4430_phy_init(dev);
-
 	if (cpu_is_omap3517() || cpu_is_omap3505()) {
 		oh_name = "am35x_otg_hs";
 		name = "musb-am35x";
Signature · 1 line
1.7.4.1
#1 lore raw

Ref thread starting at http://marc.info/?l=linux-omap&m=131316289211258&w=2

Bjarne Steinsbo

Quoted 38 lines · Axel Lin

Current code calls omap4430_phy_init() twice in usb_musb_init(). Calling omap4430_phy_init() once is enough.
This patch removes the first omap4430_phy_init() call, which using an uninitialized pointer as parameter.

This patch elimates below build warning:
arch/arm/mach-omap2/usb-musb.c: In function 'usb_musb_init':
arch/arm/mach-omap2/usb-musb.c:141: warning: 'dev' may be used uninitialized in this function

---
?arch/arm/mach-omap2/usb-musb.c | ? ?3 ---
?1 files changed, 0 insertions(+), 3 deletions(-)

arch/arm/mach-omap2/usb-musb.c +0 -4
index a65145b..19e4dac 100644
@@ -137,9 +137,6 @@ void __init usb_musb_init(struct omap_musb_board_data *musb_board_data)
 ? ? ? ?musb_plat.mode = board_data->mode;
 ? ? ? ?musb_plat.extvbus = board_data->extvbus;
 
- ? ? ? if (cpu_is_omap44xx())
- ? ? ? ? ? ? ? omap4430_phy_init(dev);
-
 ? ? ? ?if (cpu_is_omap3517() || cpu_is_omap3505()) {
 ? ? ? ? ? ? ? ?oh_name = "am35x_otg_hs";
 ? ? ? ? ? ? ? ?name = "musb-am35x";
--

1.7.4.1

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

Acked-by on v1 1/1
#2 lore raw
In reply to Axel Lin
Quoted 10 lines · Axel Lin

Current code calls omap4430_phy_init() twice in usb_musb_init(). Calling omap4430_phy_init() once is enough.
This patch removes the first omap4430_phy_init() call, which using an uninitialized pointer as parameter.

This patch elimates below build warning:
arch/arm/mach-omap2/usb-musb.c: In function 'usb_musb_init':
arch/arm/mach-omap2/usb-musb.c:141: warning: 'dev' may be used uninitialized in this function

Quoted 23 lines
---
 arch/arm/mach-omap2/usb-musb.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
arch/arm/mach-omap2/usb-musb.c +0 -3
index a65145b..19e4dac 100644
@@ -137,9 +137,6 @@ void __init usb_musb_init(struct omap_musb_board_data *musb_board_data)
 	musb_plat.mode = board_data->mode;
 	musb_plat.extvbus = board_data->extvbus;
 
-	if (cpu_is_omap44xx())
-		omap4430_phy_init(dev);
-
 	if (cpu_is_omap3517() || cpu_is_omap3505()) {
 		oh_name = "am35x_otg_hs";
 		name = "musb-am35x";
Signature · 1 line
1.7.4.1
Signature · 8 lines
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110929/e7ff6f51/attachment.sig>
maintainer
#3 lore raw
Quoted 6 lines · Felipe Balbi
Quoted 5 lines · Axel Lin

Current code calls omap4430_phy_init() twice in usb_musb_init(). Calling omap4430_phy_init() once is enough.
This patch removes the first omap4430_phy_init() call, which using an uninitialized pointer as parameter.

Quoted 7 lines
Quoted 5 lines

This patch elimates below build warning:
arch/arm/mach-omap2/usb-musb.c: In function 'usb_musb_init':
arch/arm/mach-omap2/usb-musb.c:141: warning: 'dev' may be used uninitialized in this function

Thanks, applying into fixes.

Tony

Quoted 27 lines
Quoted 24 lines
---
 arch/arm/mach-omap2/usb-musb.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
arch/arm/mach-omap2/usb-musb.c +0 -3
index a65145b..19e4dac 100644
@@ -137,9 +137,6 @@ void __init usb_musb_init(struct omap_musb_board_data *musb_board_data)
 	musb_plat.mode = board_data->mode;
 	musb_plat.extvbus = board_data->extvbus;
 
-	if (cpu_is_omap44xx())
-		omap4430_phy_init(dev);
-
 	if (cpu_is_omap3517() || cpu_is_omap3505()) {
 		oh_name = "am35x_otg_hs";
 		name = "musb-am35x";
Signature · 1 line
1.7.4.1
Signature · 1 line
balbi
maintainer
#4 lore raw
Quoted 11 lines · Tony Lindgren
Quoted 10 lines · Felipe Balbi
Quoted 9 lines · Axel Lin

Current code calls omap4430_phy_init() twice in usb_musb_init(). Calling omap4430_phy_init() once is enough.
This patch removes the first omap4430_phy_init() call, which using an uninitialized pointer as parameter.

This patch elimates below build warning:
arch/arm/mach-omap2/usb-musb.c: In function 'usb_musb_init':
arch/arm/mach-omap2/usb-musb.c:141: warning: 'dev' may be used uninitialized in this function

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

Thanks, applying into fixes.

FYI, I'll update this patch to have also Bjarne's SOB to this patch because of the earlier reference. Will still use Axel's patch as it shows the compile warning.

Regards,

Tony

Quoted 36 lines

Tony

Quoted 13 lines
Quoted 13 lines
---
 arch/arm/mach-omap2/usb-musb.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
arch/arm/mach-omap2/usb-musb.c +0 -0
index a65145b..19e4dac 100644
@@ -137,9 +137,6 @@ void __init usb_musb_init(struct omap_musb_board_data *musb_board_data)
 	musb_plat.mode = board_data->mode;
 	musb_plat.extvbus = board_data->extvbus;
 
Quoted 14 lines
Quoted 11 lines
arch/arm/mach-omap2/usb-musb.c +0 -3
-	if (cpu_is_omap44xx())
-		omap4430_phy_init(dev);
-
 	if (cpu_is_omap3517() || cpu_is_omap3505()) {
 		oh_name = "am35x_otg_hs";
 		name = "musb-am35x";
Signature · 1 line
1.7.4.1
Signature · 1 line
balbi

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel