Re: [PATCH] oprofile, x86: fix init_sysfs error handling

From: Robert Richter
Date: Wed Sep 01 2010 - 09:29:46 EST


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

--