linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Geoff Levand <geoff@infradead.org>
To: Michael Ellerman <mpe@ellerman.id.au>,
	Zhen Lei <thunder.leizhen@huawei.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH 1/1] powerpc/ps3: Fix error return code in ps3_register_devices()
Date: Sun, 23 May 2021 13:15:54 -0700	[thread overview]
Message-ID: <71764790-4be0-d177-37fc-a2d91d47a0da@infradead.org> (raw)
In-Reply-To: <87tumxioki.fsf@mpe.ellerman.id.au>

Hi,

On 5/20/21 5:20 AM, Michael Ellerman wrote:
> 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.
...
>> --- a/arch/powerpc/platforms/ps3/device-init.c
>>  
>>  	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.

That probe is for the storage devices (PS3_BUS_TYPE_STORAGE).

There are cases where the system is usable even if the storage
devices are not available, for example, when using an NFS root
filesystem.

ps3_start_probe_thread was made to be quite verbose on error
to make up for it's return value not being checked.

> Anyway please leave this code alone unless you're willing to test your
> changes, or at least provide a more thorough justification for them.

Agreed, this change should not be merged.

-Geoff

  reply	other threads:[~2021-05-23 20:17 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
2021-05-23 20:15   ` Geoff Levand [this message]
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=71764790-4be0-d177-37fc-a2d91d47a0da@infradead.org \
    --to=geoff@infradead.org \
    --cc=benh@kernel.crashing.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    --cc=thunder.leizhen@huawei.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).