lkml.org 
[lkml]   [2013]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] smp: harmonize prototypes of smp functions
On Mon,  2 Sep 2013 15:33:13 +0100 Javi Merino <javi.merino@arm.com> wrote:

> Avoid unnecessary casts from int to bool in smp functions. Some
> functions in kernel/smp.c have a wait parameter that can be set to one
> if you want to wait for the command to complete. It's defined as bool
> in a few of them and int in the rest. If a function with wait
> declared as int calls a function whose prototype has wait defined as
> bool, the compiler needs to test if the int is != 0 and change it to 1
> if so. This useless check can be avoided if we are consistent and
> make all the functions use the same type for this parameter.

Yes, that's a problem with bool.

But the `wait' argument *is* a boolean and switching everything over to
use "bool" (instead of "int") should provide similar code-size savings.
Did you evaluate that approach?



\
 
 \ /
  Last update: 2013-09-17 23:41    [W:0.064 / U:1.828 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site