[PATCH v2] powerpc: kernel: remove useless code which related with 'max_cpus'

Chen Gang gang.chen at asianux.com
Thu Jul 25 15:24:31 EST 2013


On 07/25/2013 01:16 PM, Benjamin Herrenschmidt wrote:
> On Thu, 2013-07-25 at 13:15 +1000, Michael Ellerman wrote:
>>> But for API (also include the internal API), at least, better to always
>>> provide the return value which can indicate failure by negative number
>>> (if succeed can return the meanness value, e.g. the number of cpus).
>>
>> Are we still talking about this?
>>
>> There is no point returning a value when no one checks it. Which is the
>> case here.
> 
> Right. The return value is historical, it dates from when we didn't have
> cpu_possible_mask etc...
> 
> Nowadays, the probe() routine is just some early init, and might also
> affect those masks if needed, the return value has become obsolete.
> 
> You are welcome to post a patch removing it.
> 

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.


Thanks.
-- 
Chen Gang


More information about the Linuxppc-dev mailing list