Re: [PATCH 2/2] perf report: Fix build with NO_NEWT=1

From: Michael Ellerman
Date: Tue Feb 26 2013 - 06:46:26 EST


On Tue, Feb 26, 2013 at 04:48:50PM +0800, Feng Tang wrote:
> On Tue, Feb 26, 2013 at 04:02:03PM +1100, Michael Ellerman wrote:
> > Commit ad0de09 "Enable the runtime switching of perf data file" broke
> > the build with NO_NEWT=1:
> >
> > CC builtin-report.o
> > builtin-report.c: In function '__cmd_report':
> > builtin-report.c:479:15: error: 'K_SWITCH_INPUT_DATA' undeclared (first use in this function)
> > builtin-report.c:479:15: note: each undeclared identifier is reported only once for each function it appears in
> > builtin-report.c: In function 'cmd_report':
> > builtin-report.c:823:13: error: 'K_SWITCH_INPUT_DATA' undeclared (first use in this function)
> > make: *** [builtin-report.o] Error 1
> >
> > Fix it by adding a dummy definition of K_SWITCH_INPUT_DATA.
> >
> > Signed-off-by: Michael Ellerman <michael@xxxxxxxxxxxxxx>
> > ---
> > tools/perf/util/hist.h | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h
> > index 609a115..226a4ae 100644
> > --- a/tools/perf/util/hist.h
> > +++ b/tools/perf/util/hist.h
> > @@ -210,6 +210,7 @@ static inline int script_browse(const char *script_opt __maybe_unused)
> >
> > #define K_LEFT -1000
> > #define K_RIGHT -2000
> > +#define K_SWITCH_INPUT_DATA -3000
>
> Both patches look good to me, thanks for the fix. But can we use
> a better value? -1000, -2000 looks a little awkward.

Better how? I'm not bothered what the values are, I was just trying to
prevent the same bug happening again by shifting the values out of the
-ERRNO range - which goes to ~130.

cheers
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/