public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* linux-next: tip tree build warning
@ 2009-12-11  4:38 Stephen Rothwell
  2009-12-11 10:58 ` [PATCH] hw-breakpoints: Handle bad modify_user_hw_breakpoint off-case return value Frederic Weisbecker
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Rothwell @ 2009-12-11  4:38 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra
  Cc: linux-next, linux-kernel, Frederic Weisbecker

[-- Attachment #1: Type: text/plain, Size: 624 bytes --]

Hi all,

Today's linux-next build (powerpc allyesconfig) produced this warning:

In file included from kernel/trace/trace.h:14,
                 from kernel/trace/trace_selftest_dynamic.c:1:
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

Introduced by commit 44234adcdce38f83c56e05f808ce656175b4beeb
("hw-breakpoints: Modify breakpoints without unregistering them") from
the tip tree.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] hw-breakpoints: Handle bad modify_user_hw_breakpoint off-case return value
  2009-12-11  4:38 linux-next: tip tree build warning Stephen Rothwell
@ 2009-12-11 10:58 ` Frederic Weisbecker
  2009-12-11 11:06   ` [tip:perf/urgent] " tip-bot for Frederic Weisbecker
  0 siblings, 1 reply; 3+ messages in thread
From: Frederic Weisbecker @ 2009-12-11 10:58 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: LKML, Frederic Weisbecker, Prasad

While converting modify_user_hw_breakpoint() return value, we forgot
to handle the off-case. It's not returning a pointer anymore.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Prasad <prasad@linux.vnet.ibm.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..41235c9 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 -ENOSYS; }
 static inline struct perf_event *
 register_wide_hw_breakpoint_cpu(struct perf_event_attr *attr,
 				perf_overflow_handler_t	 triggered,
-- 
1.6.2.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [tip:perf/urgent] hw-breakpoints: Handle bad modify_user_hw_breakpoint off-case return value
  2009-12-11 10:58 ` [PATCH] hw-breakpoints: Handle bad modify_user_hw_breakpoint off-case return value Frederic Weisbecker
@ 2009-12-11 11:06   ` tip-bot for Frederic Weisbecker
  0 siblings, 0 replies; 3+ messages in thread
From: tip-bot for Frederic Weisbecker @ 2009-12-11 11:06 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, fweisbec, tglx, sfr, prasad, mingo

Commit-ID:  99ac64c826e62a07e5818cfde620be4d524f1edf
Gitweb:     http://git.kernel.org/tip/99ac64c826e62a07e5818cfde620be4d524f1edf
Author:     Frederic Weisbecker <fweisbec@gmail.com>
AuthorDate: Fri, 11 Dec 2009 11:58:42 +0100
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Fri, 11 Dec 2009 12:03:53 +0100

hw-breakpoints: Handle bad modify_user_hw_breakpoint off-case return value

While converting modify_user_hw_breakpoint() return value, we
forgot to handle the off-case. It's not returning a pointer
anymore.

This solves the build warning reported by Stephen Rothwell against
linux-next.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Prasad <prasad@linux.vnet.ibm.com>
LKML-Reference: <1260529122-6260-1-git-send-regression-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Prasad <prasad@linux.vnet.ibm.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..41235c9 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 -ENOSYS; }
 static inline struct perf_event *
 register_wide_hw_breakpoint_cpu(struct perf_event_attr *attr,
 				perf_overflow_handler_t	 triggered,

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-12-11 11:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-11  4:38 linux-next: tip tree build warning Stephen Rothwell
2009-12-11 10:58 ` [PATCH] hw-breakpoints: Handle bad modify_user_hw_breakpoint off-case return value Frederic Weisbecker
2009-12-11 11:06   ` [tip:perf/urgent] " tip-bot for Frederic Weisbecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox