[PATCH] oprofile, x86: fix init_sysfs error handling

Robert Richter robert.richter at amd.com
Wed Sep 1 09:07:48 EDT 2010


On 01.09.10 05:51:17, Ingo Molnar wrote:
> > @@ -774,7 +781,10 @@ int __init op_nmi_init(struct oprofile_operations *ops)
> >  
> >  	mux_init(ops);
> >  
> > -	init_sysfs();
> > +	ret = init_sysfs();
> 
> FYI, this causes a build error if CONFIG_PM is off:
> 
>    arch/x86/oprofile/nmi_int.c:784: error: expected expression before ‘do’
> 
> Due to this assymetric form of the wrapper:
> 
>   #define init_sysfs() do { } while (0)
> 
> The wrapper should be changed to return 0 i suspect, via something like 
> this:
> 
>   static inline int init_sysfs(void) { return 0; }
> 
> (untested)

Ingo, thanks for catching this, fix below.

-Robert

--



More information about the linux-arm-kernel mailing list