From: Chen Gang <gang.chen@asianux•com>
To: Benjamin Herrenschmidt <benh@kernel•crashing.org>
Cc: chenhui.zhao@freescale•com, "paulus@samba•org" <paulus@samba•org>,
"Srivatsa S. Bhat" <srivatsa.bhat@linux•vnet.ibm.com>,
Thomas Gleixner <tglx@linutronix•de>,
"linuxppc-dev@lists•ozlabs.org" <linuxppc-dev@lists•ozlabs.org>
Subject: Re: [PATCH v2] powerpc: kernel: remove useless code which related with 'max_cpus'
Date: Thu, 25 Jul 2013 14:30:30 +0800 [thread overview]
Message-ID: <51F0C606.9090702@asianux.com> (raw)
In-Reply-To: <1374732225.6142.66.camel@pasglop>
On 07/25/2013 02:03 PM, Benjamin Herrenschmidt wrote:
> On Thu, 2013-07-25 at 15:51 +1000, Benjamin Herrenschmidt wrote:
>> On Thu, 2013-07-25 at 13:24 +0800, Chen Gang wrote:
>>> For an extern function, if the performance is not sensible, better to
>>> have the return value which can indicate the failure with the negative
>>> number.
>>
>> The return value is meaningless.
>>
>> We don't have a good way to handle it. It has no defined semantics. What
>> does "failure" means in that case ? Nothing !
>>
>> So just remove it.
>
> Note: If you want to create a concept of smp_ops->probe() failing, then
> not only you need to check all the implementations, but *also* add
> something sensible to do when it fails ... such as disabling bringup of
> CPUs.
>
Hmm... if critical, use BUG(), else (none critical), just print a
warning message ?
> In this case however, we have put the burden of doing whatever makes
> sense in the probe() function itself. If can adjust the possible map if
> it fails.
>
Excuse me, my English is not quite well, I guss your meaning is: "it can
be fail in internal implementation, but has no effect with the final
result to caller", is it correct ?
If what I understand is correct, it needn't let caller know about it.
Thanks.
--
Chen Gang
next prev parent reply other threads:[~2013-07-25 6:31 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-22 5:58 [PATCH] powerpc: kernel: remove useless code which related with 'max_cpus' Chen Gang
2013-07-22 6:18 ` Srivatsa S. Bhat
2013-07-22 6:27 ` Chen Gang
2013-07-22 6:40 ` [PATCH v2] " Chen Gang
2013-07-22 6:51 ` Srivatsa S. Bhat
2013-07-22 7:03 ` Chen Gang
2013-07-23 13:44 ` Michael Ellerman
2013-07-24 0:28 ` Chen Gang
2013-07-24 1:16 ` Michael Ellerman
2013-07-24 2:09 ` Chen Gang
2013-07-25 3:15 ` Michael Ellerman
2013-07-25 4:02 ` Chen Gang
2013-07-25 5:16 ` Benjamin Herrenschmidt
2013-07-25 5:24 ` Chen Gang
2013-07-25 5:51 ` Benjamin Herrenschmidt
2013-07-25 6:03 ` Benjamin Herrenschmidt
2013-07-25 6:30 ` Chen Gang [this message]
2013-07-25 6:17 ` Chen Gang
2013-07-25 7:33 ` Benjamin Herrenschmidt
2013-07-25 7:59 ` Chen Gang
2013-07-25 8:06 ` Benjamin Herrenschmidt
2013-07-25 8:22 ` Chen Gang
2013-07-25 8:28 ` Benjamin Herrenschmidt
2013-07-25 8:36 ` Chen Gang
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=51F0C606.9090702@asianux.com \
--to=gang.chen@asianux$(echo .)com \
--cc=benh@kernel$(echo .)crashing.org \
--cc=chenhui.zhao@freescale$(echo .)com \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=paulus@samba$(echo .)org \
--cc=srivatsa.bhat@linux$(echo .)vnet.ibm.com \
--cc=tglx@linutronix$(echo .)de \
/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