From: Michael Ellerman <mpe@ellerman•id.au>
To: Zhen Lei <thunder.leizhen@huawei•com>,
Geoff Levand <geoff@infradead•org>,
Benjamin Herrenschmidt <benh@kernel•crashing.org>,
Paul Mackerras <paulus@samba•org>,
linuxppc-dev <linuxppc-dev@lists•ozlabs.org>
Cc: Zhen Lei <thunder.leizhen@huawei•com>
Subject: Re: [PATCH 1/1] powerpc/ps3: Fix error return code in ps3_register_devices()
Date: Thu, 20 May 2021 22:20:45 +1000 [thread overview]
Message-ID: <87tumxioki.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <20210518065853.7590-1-thunder.leizhen@huawei.com>
Zhen Lei <thunder.leizhen@huawei•com> writes:
> When call ps3_start_probe_thread() failed, further initialization should
> be stopped and the returned error code should be propagated.
It's not clear to me that's a good change.
> diff --git a/arch/powerpc/platforms/ps3/device-init.c b/arch/powerpc/platforms/ps3/device-init.c
> index e87360a0fb40..9b6d8ca8fc01 100644
> --- a/arch/powerpc/platforms/ps3/device-init.c
> +++ b/arch/powerpc/platforms/ps3/device-init.c
> @@ -955,6 +955,8 @@ static int __init ps3_register_devices(void)
> /* ps3_repository_dump_bus_info(); */
>
> result = ps3_start_probe_thread(PS3_BUS_TYPE_STORAGE);
> + if (result < 0)
> + return result;
If you bail out here you skip:
> ps3_register_vuart_devices();
Which I suspect means there will be no console output?
Presumably the system won't boot if the probe thread fails, but it might
at least print an oops, whereas if we return we might get nothing at
all. Though I'm just guessing, I don't know this code that well.
Anyway please leave this code alone unless you're willing to test your
changes, or at least provide a more thorough justification for them.
cheers
next prev parent reply other threads:[~2021-05-20 12:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-18 6:58 [PATCH 1/1] powerpc/ps3: Fix error return code in ps3_register_devices() Zhen Lei
2021-05-20 12:20 ` Michael Ellerman [this message]
2021-05-23 20:15 ` Geoff Levand
2021-05-24 1:40 ` Leizhen (ThunderTown)
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=87tumxioki.fsf@mpe.ellerman.id.au \
--to=mpe@ellerman$(echo .)id.au \
--cc=benh@kernel$(echo .)crashing.org \
--cc=geoff@infradead$(echo .)org \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=paulus@samba$(echo .)org \
--cc=thunder.leizhen@huawei$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox