* [PATCH] am33xx: ignore return value from usb_ether_init()
@ 2023-08-31 2:49 Trevor Woerner
2023-08-31 10:15 ` Michal Suchánek
2023-09-19 15:14 ` Tom Rini
0 siblings, 2 replies; 6+ messages in thread
From: Trevor Woerner @ 2023-08-31 2:49 UTC (permalink / raw)
To: U-Boot Mailing List; +Cc: Simon Glass, Bin Meng, Michal Suchanek
In 2cb43ef1c223 ("usb: ether: Fix error handling in usb_ether_init") the error
handling of usb_ether_init() was changed. Not a single other call site of this
function checks its return value, therefore follow suit in the am33xx code.
Do not cause the boot to halt if the usb gadget ethernet initialization fails:
initcall sequence 9ffdbd84 failed at call 808024b9 (err=-19)
### ERROR ### Please RESET the board ###
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
arch/arm/mach-omap2/am33xx/board.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/arch/arm/mach-omap2/am33xx/board.c b/arch/arm/mach-omap2/am33xx/board.c
index ecc0a592e993..8f772310a1a7 100644
--- a/arch/arm/mach-omap2/am33xx/board.c
+++ b/arch/arm/mach-omap2/am33xx/board.c
@@ -270,11 +270,7 @@ int arch_misc_init(void)
return ret;
#if defined(CONFIG_DM_ETH) && defined(CONFIG_USB_ETHER)
- ret = usb_ether_init();
- if (ret) {
- pr_err("USB ether init failed\n");
- return ret;
- }
+ usb_ether_init();
#endif
return 0;
--
2.41.0.327.gaa9166bcc0ba
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] am33xx: ignore return value from usb_ether_init()
2023-08-31 2:49 [PATCH] am33xx: ignore return value from usb_ether_init() Trevor Woerner
@ 2023-08-31 10:15 ` Michal Suchánek
2023-09-13 12:50 ` Trevor Woerner
2023-09-19 15:14 ` Tom Rini
1 sibling, 1 reply; 6+ messages in thread
From: Michal Suchánek @ 2023-08-31 10:15 UTC (permalink / raw)
To: Trevor Woerner; +Cc: U-Boot Mailing List, Simon Glass, Bin Meng
Hello,
On Wed, Aug 30, 2023 at 10:49:50PM -0400, Trevor Woerner wrote:
> In 2cb43ef1c223 ("usb: ether: Fix error handling in usb_ether_init") the error
> handling of usb_ether_init() was changed. Not a single other call site of this
> function checks its return value, therefore follow suit in the am33xx code.
then there is the question what point is there in having a return value
in this function at all.
Anyway, it's fine to not check the return value in the caller if there
is no use for the error.
Reviewed-by: Michal Suchánek <msuchanek@suse.de>
>
> Do not cause the boot to halt if the usb gadget ethernet initialization fails:
>
> initcall sequence 9ffdbd84 failed at call 808024b9 (err=-19)
> ### ERROR ### Please RESET the board ###
>
> Signed-off-by: Trevor Woerner <twoerner@gmail.com>
> ---
> arch/arm/mach-omap2/am33xx/board.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/am33xx/board.c b/arch/arm/mach-omap2/am33xx/board.c
> index ecc0a592e993..8f772310a1a7 100644
> --- a/arch/arm/mach-omap2/am33xx/board.c
> +++ b/arch/arm/mach-omap2/am33xx/board.c
> @@ -270,11 +270,7 @@ int arch_misc_init(void)
> return ret;
>
> #if defined(CONFIG_DM_ETH) && defined(CONFIG_USB_ETHER)
> - ret = usb_ether_init();
> - if (ret) {
> - pr_err("USB ether init failed\n");
> - return ret;
> - }
> + usb_ether_init();
> #endif
>
> return 0;
> --
> 2.41.0.327.gaa9166bcc0ba
>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] am33xx: ignore return value from usb_ether_init()
2023-08-31 10:15 ` Michal Suchánek
@ 2023-09-13 12:50 ` Trevor Woerner
2023-09-13 18:32 ` Tom Rini
0 siblings, 1 reply; 6+ messages in thread
From: Trevor Woerner @ 2023-09-13 12:50 UTC (permalink / raw)
To: U-Boot Mailing List, Tom Rini
Can this get added to the next release? I don't see it in -next.
On Thu, Aug 31, 2023 at 6:15 AM Michal Suchánek <msuchanek@suse.de> wrote:
> Hello,
>
> On Wed, Aug 30, 2023 at 10:49:50PM -0400, Trevor Woerner wrote:
> > In 2cb43ef1c223 ("usb: ether: Fix error handling in usb_ether_init") the
> error
> > handling of usb_ether_init() was changed. Not a single other call site
> of this
> > function checks its return value, therefore follow suit in the am33xx
> code.
>
> then there is the question what point is there in having a return value
> in this function at all.
>
> Anyway, it's fine to not check the return value in the caller if there
> is no use for the error.
>
> Reviewed-by: Michal Suchánek <msuchanek@suse.de>
>
> >
> > Do not cause the boot to halt if the usb gadget ethernet initialization
> fails:
> >
> > initcall sequence 9ffdbd84 failed at call 808024b9 (err=-19)
> > ### ERROR ### Please RESET the board ###
> >
> > Signed-off-by: Trevor Woerner <twoerner@gmail.com>
> > ---
> > arch/arm/mach-omap2/am33xx/board.c | 6 +-----
> > 1 file changed, 1 insertion(+), 5 deletions(-)
> >
> > diff --git a/arch/arm/mach-omap2/am33xx/board.c
> b/arch/arm/mach-omap2/am33xx/board.c
> > index ecc0a592e993..8f772310a1a7 100644
> > --- a/arch/arm/mach-omap2/am33xx/board.c
> > +++ b/arch/arm/mach-omap2/am33xx/board.c
> > @@ -270,11 +270,7 @@ int arch_misc_init(void)
> > return ret;
> >
> > #if defined(CONFIG_DM_ETH) && defined(CONFIG_USB_ETHER)
> > - ret = usb_ether_init();
> > - if (ret) {
> > - pr_err("USB ether init failed\n");
> > - return ret;
> > - }
> > + usb_ether_init();
> > #endif
> >
> > return 0;
> > --
> > 2.41.0.327.gaa9166bcc0ba
> >
>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] am33xx: ignore return value from usb_ether_init()
2023-09-13 12:50 ` Trevor Woerner
@ 2023-09-13 18:32 ` Tom Rini
2023-09-13 18:42 ` Trevor Woerner
0 siblings, 1 reply; 6+ messages in thread
From: Tom Rini @ 2023-09-13 18:32 UTC (permalink / raw)
To: Trevor Woerner; +Cc: U-Boot Mailing List
[-- Attachment #1: Type: text/plain, Size: 2077 bytes --]
On Wed, Sep 13, 2023 at 08:50:49AM -0400, Trevor Woerner wrote:
> Can this get added to the next release? I don't see it in -next.
I was going to pick this up for v2024.01 (i.e. the next branch)
soon'ish.
>
> On Thu, Aug 31, 2023 at 6:15 AM Michal Suchánek <msuchanek@suse.de> wrote:
>
> > Hello,
> >
> > On Wed, Aug 30, 2023 at 10:49:50PM -0400, Trevor Woerner wrote:
> > > In 2cb43ef1c223 ("usb: ether: Fix error handling in usb_ether_init") the
> > error
> > > handling of usb_ether_init() was changed. Not a single other call site
> > of this
> > > function checks its return value, therefore follow suit in the am33xx
> > code.
> >
> > then there is the question what point is there in having a return value
> > in this function at all.
> >
> > Anyway, it's fine to not check the return value in the caller if there
> > is no use for the error.
> >
> > Reviewed-by: Michal Suchánek <msuchanek@suse.de>
> >
> > >
> > > Do not cause the boot to halt if the usb gadget ethernet initialization
> > fails:
> > >
> > > initcall sequence 9ffdbd84 failed at call 808024b9 (err=-19)
> > > ### ERROR ### Please RESET the board ###
> > >
> > > Signed-off-by: Trevor Woerner <twoerner@gmail.com>
> > > ---
> > > arch/arm/mach-omap2/am33xx/board.c | 6 +-----
> > > 1 file changed, 1 insertion(+), 5 deletions(-)
> > >
> > > diff --git a/arch/arm/mach-omap2/am33xx/board.c
> > b/arch/arm/mach-omap2/am33xx/board.c
> > > index ecc0a592e993..8f772310a1a7 100644
> > > --- a/arch/arm/mach-omap2/am33xx/board.c
> > > +++ b/arch/arm/mach-omap2/am33xx/board.c
> > > @@ -270,11 +270,7 @@ int arch_misc_init(void)
> > > return ret;
> > >
> > > #if defined(CONFIG_DM_ETH) && defined(CONFIG_USB_ETHER)
> > > - ret = usb_ether_init();
> > > - if (ret) {
> > > - pr_err("USB ether init failed\n");
> > > - return ret;
> > > - }
> > > + usb_ether_init();
> > > #endif
> > >
> > > return 0;
> > > --
> > > 2.41.0.327.gaa9166bcc0ba
> > >
> >
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] am33xx: ignore return value from usb_ether_init()
2023-09-13 18:32 ` Tom Rini
@ 2023-09-13 18:42 ` Trevor Woerner
0 siblings, 0 replies; 6+ messages in thread
From: Trevor Woerner @ 2023-09-13 18:42 UTC (permalink / raw)
To: Tom Rini; +Cc: U-Boot Mailing List
On Wed, Sep 13, 2023 at 2:32 PM Tom Rini <trini@konsulko.com> wrote:
> On Wed, Sep 13, 2023 at 08:50:49AM -0400, Trevor Woerner wrote:
>
> > Can this get added to the next release? I don't see it in -next.
>
> I was going to pick this up for v2024.01 (i.e. the next branch)
> soon'ish.
>
Awesome, thanks! :-)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] am33xx: ignore return value from usb_ether_init()
2023-08-31 2:49 [PATCH] am33xx: ignore return value from usb_ether_init() Trevor Woerner
2023-08-31 10:15 ` Michal Suchánek
@ 2023-09-19 15:14 ` Tom Rini
1 sibling, 0 replies; 6+ messages in thread
From: Tom Rini @ 2023-09-19 15:14 UTC (permalink / raw)
To: Trevor Woerner
Cc: U-Boot Mailing List, Simon Glass, Bin Meng, Michal Suchanek
[-- Attachment #1: Type: text/plain, Size: 667 bytes --]
On Wed, Aug 30, 2023 at 10:49:50PM -0400, Trevor Woerner wrote:
> In 2cb43ef1c223 ("usb: ether: Fix error handling in usb_ether_init") the error
> handling of usb_ether_init() was changed. Not a single other call site of this
> function checks its return value, therefore follow suit in the am33xx code.
>
> Do not cause the boot to halt if the usb gadget ethernet initialization fails:
>
> initcall sequence 9ffdbd84 failed at call 808024b9 (err=-19)
> ### ERROR ### Please RESET the board ###
>
> Signed-off-by: Trevor Woerner <twoerner@gmail.com>
> Reviewed-by: Michal Suchánek <msuchanek@suse.de>
Applied to u-boot/next, thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-09-19 15:14 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-31 2:49 [PATCH] am33xx: ignore return value from usb_ether_init() Trevor Woerner
2023-08-31 10:15 ` Michal Suchánek
2023-09-13 12:50 ` Trevor Woerner
2023-09-13 18:32 ` Tom Rini
2023-09-13 18:42 ` Trevor Woerner
2023-09-19 15:14 ` Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox