Skip to contentSkip to conversation

usb: host: xhci-omap: fix build break

PATCH New Felipe Balbi 4 participants 12 messages Oct 1, 2015 – Nov 28, 2015

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

PATCH 1/2 usb: host: xhci-omap: fix build break

Fix the following build break:

drivers/usb/host/xhci-omap.c:35:5: error: ?board_usb_init? aliased to external symbol ?__board_usb_init?
int board_usb_init(int index, enum usb_init_type init)

      ^
---
 drivers/usb/host/xhci-omap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/host/xhci-omap.c +1 -1
index 104e7a7282cf..fd19f79f0fc5 100644
@@ -27,7 +27,7 @@ DECLARE_GLOBAL_DATA_PTR;
 
 static struct omap_xhci omap;
 
-inline int __board_usb_init(int index, enum usb_init_type init)
+__weak int __board_usb_init(int index, enum usb_init_type init)
 {
 	return 0;
 }
Signature · 1 line
2.5.3
#1 lore raw

PATCH 1/2 usb: host: xhci-omap: fix build break

Quoted 7 lines · Felipe Balbi

Fix the following build break:

drivers/usb/host/xhci-omap.c:35:5: error: ?board_usb_init? aliased to external symbol ?__board_usb_init?
int board_usb_init(int index, enum usb_init_type init)

      ^

ping

Quoted 20 lines
---
 drivers/usb/host/xhci-omap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/host/xhci-omap.c +1 -1
index 104e7a7282cf..fd19f79f0fc5 100644
@@ -27,7 +27,7 @@ DECLARE_GLOBAL_DATA_PTR;
 
 static struct omap_xhci omap;
 
-inline int __board_usb_init(int index, enum usb_init_type init)
+__weak int __board_usb_init(int index, enum usb_init_type init)
 {
 	return 0;
 }
Signature · 1 line
2.5.3
Signature · 8 lines
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151016/1fb52e2b/attachment.sig>
#2 lore raw

PATCH 1/2 usb: host: xhci-omap: fix build break

Quoted 10 lines · Felipe Balbi
Quoted 7 lines · Felipe Balbi

Fix the following build break:

drivers/usb/host/xhci-omap.c:35:5: error: ?board_usb_init? aliased to external symbol ?__board_usb_init?
int board_usb_init(int index, enum usb_init_type init)

      ^

ping

Where / how do I trigger this (or 2/2) ?

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151016/1b087c96/attachment.sig>
#3 lore raw

PATCH 1/2 usb: host: xhci-omap: fix build break

Quoted 8 lines · Tom Rini
Quoted 7 lines · Felipe Balbi
Quoted 6 lines · Felipe Balbi

Fix the following build break:

drivers/usb/host/xhci-omap.c:35:5: error: ?board_usb_init? aliased to external symbol ?__board_usb_init?
int board_usb_init(int index, enum usb_init_type init)

      ^
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

ping

Where / how do I trigger this (or 2/2) ?

GCC 5

Signature · 8 lines
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151016/016ce788/attachment.sig>
#4 lore raw

PATCH 1/2 usb: host: xhci-omap: fix build break

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines · Felipe Balbi

Fix the following build break:

drivers/usb/host/xhci-omap.c:35:5: error: ?board_usb_init? aliased to external symbol ?__board_usb_init?
int board_usb_init(int index, enum usb_init_type init)

      ^
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

ping

Where / how do I trigger this (or 2/2) ?

GCC 5

I'm seeing exactly the same issue with gcc5 on Fedora, I've also seen another issue with gcc5 with strcat for panda board variant names which we hacked around [1].

Peter

[1] http://pkgs.fedoraproject.org/cgit/uboot-tools.git/tree/0009-ARM-fix-pandaboard-es-and-a4-revision-ID.patch?h=f23

#5 lore raw

PATCH 1/2 usb: host: xhci-omap: fix build break

Quoted 11 lines · Peter Robinson
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
Quoted 7 lines · Felipe Balbi

Fix the following build break:

drivers/usb/host/xhci-omap.c:35:5: error: ?board_usb_init? aliased to external symbol ?__board_usb_init?
int board_usb_init(int index, enum usb_init_type init)

      ^

ping

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

Where / how do I trigger this (or 2/2) ?

GCC 5

I'm seeing exactly the same issue with gcc5 on Fedora, I've also seen another issue with gcc5 with strcat for panda board variant names which we hacked around [1].

So, I want to say that GCC 5.x (or at least 5.1) will be a known good compiler for v2016.01. I know that Fedora folks have been doing it for a while (yay, thanks) but I also know that Felipe has seen a few problems using some other (I think..) gcc-5 toolchain. So what I'm doing is getting the Fedora gcc-5 packages installed now, along with a Debian/unstable chroot where I can also get at all of their cross tools.

Quoted 1 line

[1] http://pkgs.fedoraproject.org/cgit/uboot-tools.git/tree/0009-ARM-fix-pandaboard-es-and-a4-revision-ID.patch?h=f23

That's interesting. I don't know why (and I would worry about) strcat failing, but since it's two string literals can't we just do a simple +? Or is my lack of coffee just yet causing me to forget that C is not every-other-language...

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151021/440bd7bb/attachment.sig>
#6 lore raw

PATCH 1/2 usb: host: xhci-omap: fix build break

Quoted 27 lines · Tom Rini
Quoted 11 lines · Peter Robinson
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
Quoted 7 lines · Felipe Balbi

Fix the following build break:

drivers/usb/host/xhci-omap.c:35:5: error: ?board_usb_init? aliased to external symbol ?__board_usb_init?
int board_usb_init(int index, enum usb_init_type init)

      ^

ping

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

Where / how do I trigger this (or 2/2) ?

GCC 5

I'm seeing exactly the same issue with gcc5 on Fedora, I've also seen another issue with gcc5 with strcat for panda board variant names which we hacked around [1].

So, I want to say that GCC 5.x (or at least 5.1) will be a known good compiler for v2016.01. I know that Fedora folks have been doing it for a while (yay, thanks) but I also know that Felipe has seen a few problems using some other (I think..) gcc-5 toolchain. So what I'm doing is getting the Fedora gcc-5 packages installed now, along with a Debian/unstable chroot where I can also get at all of their cross tools.

Quoted 6 lines
Quoted 1 line

[1] http://pkgs.fedoraproject.org/cgit/uboot-tools.git/tree/0009-ARM-fix-pandaboard-es-and-a4-revision-ID.patch?h=f23

That's interesting. I don't know why (and I would worry about) strcat failing, but since it's two string literals can't we just do a simple +? Or is my lack of coffee just yet causing me to forget that C is not every-other-language...

It's more pointing it out that it worked for gcc < 5 and we saw this regression with u-boot (numerous versions) built with gcc5, I'm not sure why the panda board implementation did it like it did as opposed to any other way, just worth looking out for those sorts of issues elsewhere in the code.

Peter

#7 lore raw

PATCH 1/2 usb: host: xhci-omap: fix build break

Quoted 35 lines · Peter Robinson
Quoted 27 lines · Tom Rini
Quoted 11 lines · Peter Robinson
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
Quoted 7 lines · Felipe Balbi

Fix the following build break:

drivers/usb/host/xhci-omap.c:35:5: error: ?board_usb_init? aliased to external symbol ?__board_usb_init?
int board_usb_init(int index, enum usb_init_type init)

      ^

ping

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

Where / how do I trigger this (or 2/2) ?

GCC 5

I'm seeing exactly the same issue with gcc5 on Fedora, I've also seen another issue with gcc5 with strcat for panda board variant names which we hacked around [1].

So, I want to say that GCC 5.x (or at least 5.1) will be a known good compiler for v2016.01. I know that Fedora folks have been doing it for a while (yay, thanks) but I also know that Felipe has seen a few problems using some other (I think..) gcc-5 toolchain. So what I'm doing is getting the Fedora gcc-5 packages installed now, along with a Debian/unstable chroot where I can also get at all of their cross tools.

Quoted 6 lines
Quoted 1 line

[1] http://pkgs.fedoraproject.org/cgit/uboot-tools.git/tree/0009-ARM-fix-pandaboard-es-and-a4-revision-ID.patch?h=f23

That's interesting. I don't know why (and I would worry about) strcat failing, but since it's two string literals can't we just do a simple +? Or is my lack of coffee just yet causing me to forget that C is not every-other-language...

Quoted 5 lines

It's more pointing it out that it worked for gcc < 5 and we saw this regression with u-boot (numerous versions) built with gcc5, I'm not sure why the panda board implementation did it like it did as opposed to any other way, just worth looking out for those sorts of issues elsewhere in the code.

OK, pulling up strcat(3) and I agree the current code is not correct. And a quick git grep shows that's the only abuse. I see the patch in question in my queue so I'll make sure to apply it. Thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151021/5d13ce87/attachment.sig>
#8 lore raw

PATCH 2/2 usb: dwc3: fix build warnings

In reply to Felipe Balbi

fix the following build warnings:

drivers/usb/dwc3/core.c: In function ?dwc3_uboot_init?:
drivers/usb/dwc3/core.c:625:6: warning: ?dev? is used uninitialized in this function [-Wuninitialized]

mem = devm_kzalloc(dev, sizeof(*dwc) + DWC3_ALIGN_MASK, GFP_KERNEL);
        ^

drivers/usb/dwc3/dwc3-omap.c: In function ?dwc3_omap_uboot_init?:
drivers/usb/dwc3/dwc3-omap.c:380:7: warning: ?dev? is used uninitialized in this function [-Wuninitialized] omap = devm_kzalloc(dev, sizeof(*omap), GFP_KERNEL);

---
 drivers/usb/dwc3/core.c      | 2 +-
 drivers/usb/dwc3/dwc3-omap.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/usb/dwc3/core.c +1 -1
index ab3c94e51275..a95d461a7cc4 100644
@@ -613,7 +613,7 @@ static void dwc3_core_exit_mode(struct dwc3 *dwc)
 int dwc3_uboot_init(struct dwc3_device *dwc3_dev)
 {
 	struct dwc3		*dwc;
-	struct device		*dev;
+	struct device		*dev = NULL;
 	u8			lpm_nyet_threshold;
 	u8			tx_de_emphasis;
 	u8			hird_threshold;
drivers/usb/dwc3/dwc3-omap.c +1 -1
index ac9a856190f0..3dcc2f484777 100644
@@ -374,7 +374,7 @@ static void dwc3_omap_set_utmi_mode(struct dwc3_omap *omap, int utmi_mode)
 int dwc3_omap_uboot_init(struct dwc3_omap_device *omap_dev)
 {
 	u32			reg;
-	struct device		*dev;
+	struct device		*dev = NULL;
 	struct dwc3_omap	*omap;
 
 	omap = devm_kzalloc(dev, sizeof(*omap), GFP_KERNEL);
Signature · 1 line
2.5.3
#9 lore raw

PATCH 2/2 usb: dwc3: fix build warnings

Quoted 11 lines · Felipe Balbi

fix the following build warnings:

drivers/usb/dwc3/core.c: In function ?dwc3_uboot_init?:
drivers/usb/dwc3/core.c:625:6: warning: ?dev? is used uninitialized in this function [-Wuninitialized]

mem = devm_kzalloc(dev, sizeof(*dwc) + DWC3_ALIGN_MASK, GFP_KERNEL);
        ^

drivers/usb/dwc3/dwc3-omap.c: In function ?dwc3_omap_uboot_init?:
drivers/usb/dwc3/dwc3-omap.c:380:7: warning: ?dev? is used uninitialized in this function [-Wuninitialized] omap = devm_kzalloc(dev, sizeof(*omap), GFP_KERNEL);

ping

Quoted 34 lines
---
 drivers/usb/dwc3/core.c      | 2 +-
 drivers/usb/dwc3/dwc3-omap.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/usb/dwc3/core.c +1 -1
index ab3c94e51275..a95d461a7cc4 100644
@@ -613,7 +613,7 @@ static void dwc3_core_exit_mode(struct dwc3 *dwc)
 int dwc3_uboot_init(struct dwc3_device *dwc3_dev)
 {
 	struct dwc3		*dwc;
-	struct device		*dev;
+	struct device		*dev = NULL;
 	u8			lpm_nyet_threshold;
 	u8			tx_de_emphasis;
 	u8			hird_threshold;
drivers/usb/dwc3/dwc3-omap.c +1 -1
index ac9a856190f0..3dcc2f484777 100644
@@ -374,7 +374,7 @@ static void dwc3_omap_set_utmi_mode(struct dwc3_omap *omap, int utmi_mode)
 int dwc3_omap_uboot_init(struct dwc3_omap_device *omap_dev)
 {
 	u32			reg;
-	struct device		*dev;
+	struct device		*dev = NULL;
 	struct dwc3_omap	*omap;
 
 	omap = devm_kzalloc(dev, sizeof(*omap), GFP_KERNEL);
Signature · 1 line
2.5.3
Signature · 8 lines
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151016/faef5ead/attachment.sig>
#10 lore raw

PATCH 2/2 usb: dwc3: fix build warnings

Quoted 10 lines · Felipe Balbi
Quoted 9 lines · Felipe Balbi

fix the following build warnings:

drivers/usb/dwc3/core.c: In function ?dwc3_uboot_init?:
drivers/usb/dwc3/core.c:625:6: warning: ?dev? is used uninitialized in this function [-Wuninitialized] mem = devm_kzalloc(dev, sizeof(*dwc) + DWC3_ALIGN_MASK, GFP_KERNEL);

        ^
Quoted 8 lines
Quoted 6 lines

drivers/usb/dwc3/dwc3-omap.c: In function ?dwc3_omap_uboot_init?:
drivers/usb/dwc3/dwc3-omap.c:380:7: warning: ?dev? is used uninitialized in this function [-Wuninitialized] omap = devm_kzalloc(dev, sizeof(*omap), GFP_KERNEL);

ping

I'd be really helpful if you CCed me ;)

Best regards,
Marek Vasut

Applied
#11 lore raw

PATCH 1/2 usb: host: xhci-omap: fix build break

In reply to Felipe Balbi
Quoted 8 lines · Felipe Balbi

Fix the following build break:

drivers/usb/host/xhci-omap.c:35:5: error: ?board_usb_init? aliased to external symbol ?__board_usb_init? int board_usb_init(int index, enum usb_init_type init)

      ^

Applied both, thanks!

Best regards,
Marek Vasut