Thread (24 messages) 24 messages, 4 authors, 2013-07-25

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

From: Chen Gang <hidden>
Date: 2013-07-25 06:18:14

On 07/25/2013 01:51 PM, Benjamin Herrenschmidt wrote:
On Thu, 2013-07-25 at 13:24 +0800, Chen Gang wrote:
quoted
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.
Hmm... for an extern function (espeically have been implemented in
various modules), normally, we can assume it may fail in some cases
(although now, we don't know what cases can cause its failure).

If "we don't have a good way to handle the failure", "print the related
warning message" is an executable choice (or "BUG_ON()", if it is critical).

So, if the performance is not sensible, I still suggest to let extern
function have return value.


Thanks.
-- 
Chen Gang
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help