Prev: [RFC/PATCH 1/4] input: keyboard: twl4030: move to request_threaded_irq
Next: Use prepare_to_wait_exclusive() instead prepare_to_wait()
From: Frederic Weisbecker on 14 Dec 2009 09:10 On Mon, Dec 14, 2009 at 02:03:27PM +0000, David Howells wrote: > If there is no hardware breakpoint support, modify_user_hw_breakpoint() tries > to return a NULL pointer through as an 'int' return value: > > In file included from kernel/exit.c:53: > include/linux/hw_breakpoint.h: In function 'modify_user_hw_breakpoint': > include/linux/hw_breakpoint.h:96: warning: return makes integer from pointer without a cast > > Return 0 instead. > > Signed-off-by: David Howells <dhowells(a)redhat.com> Thanks, we have this fixed in tip:/perf/urgent already. It should reach upstream soon. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Ingo Molnar on 15 Dec 2009 02:30
* David Howells <dhowells(a)redhat.com> wrote: > If there is no hardware breakpoint support, modify_user_hw_breakpoint() tries > to return a NULL pointer through as an 'int' return value: > > In file included from kernel/exit.c:53: > include/linux/hw_breakpoint.h: In function 'modify_user_hw_breakpoint': > include/linux/hw_breakpoint.h:96: warning: return makes integer from pointer without a cast > > Return 0 instead. > > Signed-off-by: David Howells <dhowells(a)redhat.com> > --- > > include/linux/hw_breakpoint.h | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > > diff --git a/include/linux/hw_breakpoint.h b/include/linux/hw_breakpoint.h > index 69f07a9..e268388 100644 > --- a/include/linux/hw_breakpoint.h > +++ b/include/linux/hw_breakpoint.h > @@ -93,7 +93,7 @@ register_user_hw_breakpoint(struct perf_event_attr *attr, > struct task_struct *tsk) { return NULL; } > static inline int > modify_user_hw_breakpoint(struct perf_event *bp, > - struct perf_event_attr *attr) { return NULL; } > + struct perf_event_attr *attr) { return 0; } Note, this patch is wrong as it only papers over the warning without understanding the underlying bug: the right fix is to return an error code. The latest perf update has the right fix - AFAICS Linus did the conflict resolution correctly so upstream should be fine. Ingo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |