All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Boyd <swboyd@chromium.org>
To: Brian Norris <briannorris@chromium.org>,
	 Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Benson Leung <bleung@chromium.org>,
	chrome-platform@lists.linux.dev,  linux-kernel@vger.kernel.org,
	Samuel Holland <samuel@sholland.org>,
	 Julius Werner <jwerner@chromium.org>,
	Guenter Roeck <linux@roeck-us.net>,
	stable@vger.kernel.org
Subject: Re: [PATCH] firmware: coreboot: Register bus in module init
Date: Thu, 20 Oct 2022 20:04:19 -0400	[thread overview]
Message-ID: <CAE-0n53L9c5fTC9vut6+at583qoi2ecs29uQZF=6fAmZX2r2qA@mail.gmail.com> (raw)
In-Reply-To: <20221019180934.1.If29e167d8a4771b0bf4a39c89c6946ed764817b9@changeid>

Quoting Brian Norris (2022-10-19 18:10:53)
[...]
> [    0.114560]  do_initcall_level+0x134/0x160
> [    0.114571]  do_initcalls+0x60/0xa0
> [    0.114579]  do_basic_setup+0x28/0x34
> [    0.114588]  kernel_init_freeable+0xf8/0x150
> [    0.114596]  kernel_init+0x2c/0x12c
> [    0.114607]  ret_from_fork+0x10/0x20
> [    0.114624] Code: 5280002b 1100054a b900092a f9800011 (885ffc01)
> [    0.114631] ---[ end trace 0000000000000000 ]---
>
> Fixes: b81e3140e412 ("firmware: coreboot: Make bus registration symmetric")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Brian Norris <briannorris@chromium.org>
> ---

Reviewed-by: Stephen Boyd <swboyd@chromium.org>

> diff --git a/drivers/firmware/google/coreboot_table.c b/drivers/firmware/google/coreboot_table.c
> index c52bcaa9def6..9ca21feb9d45 100644
> --- a/drivers/firmware/google/coreboot_table.c
> +++ b/drivers/firmware/google/coreboot_table.c
> @@ -199,6 +194,32 @@ static struct platform_driver coreboot_table_driver = {
>                 .of_match_table = of_match_ptr(coreboot_of_match),
>         },
>  };
> -module_platform_driver(coreboot_table_driver);
> +
> +static int __init coreboot_table_driver_init(void)
> +{
> +       int ret;
> +
> +       ret = bus_register(&coreboot_bus_type);
> +       if (ret)
> +               return ret;
> +
> +       ret = platform_driver_register(&coreboot_table_driver);
> +       if (ret) {
> +               bus_unregister(&coreboot_bus_type);
> +               return ret;
> +       }
> +
> +       return 0;

This could be 'return ret' and two lines could be saved, but that is
super nitpick so whatever.

  parent reply	other threads:[~2022-10-21  0:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-20  1:10 [PATCH] firmware: coreboot: Register bus in module init Brian Norris
2022-10-20  1:20 ` Guenter Roeck
2022-10-22  0:28   ` Brian Norris
2022-10-21  0:04 ` Stephen Boyd [this message]
2022-12-26  3:32 ` patchwork-bot+chrome-platform
2022-12-26  3:41 ` patchwork-bot+chrome-platform

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAE-0n53L9c5fTC9vut6+at583qoi2ecs29uQZF=6fAmZX2r2qA@mail.gmail.com' \
    --to=swboyd@chromium.org \
    --cc=bleung@chromium.org \
    --cc=briannorris@chromium.org \
    --cc=chrome-platform@lists.linux.dev \
    --cc=gregkh@linuxfoundation.org \
    --cc=jwerner@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=samuel@sholland.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.