Skip to contentSkip to conversation

hw-breakpoints: let modify_user_hw_breakpoint return an int

PATCH In review Heiko Carstens 4 participants 5 messages Dec 14, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw-breakpoints: let modify_user_hw_breakpoint return an int

From: Heiko Carstens <[email protected]>

Let modify_user_hw_breakpoint return an int to avoid hundreds of compile warnings like this one:

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

---
 include/linux/hw_breakpoint.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/hw_breakpoint.h +1 -1
Index: linux-2.6/include/linux/hw_breakpoint.h
===================================================================
@@ -93,7 +93,7 @@ register_user_hw_breakpoint(struct perf_
 			    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; }
 static inline struct perf_event *
 register_wide_hw_breakpoint_cpu(struct perf_event_attr *attr,
 				perf_overflow_handler_t	 triggered,
#1 lore raw

[tip:perf/urgent] hw-breakpoints: Let modify_user_hw_breakpoint() return an int

Commit-ID:  4983ee49cf0393fd786891dd53af41146cf9f98b
Gitweb:     http://git.kernel.org/tip/4983ee49cf0393fd786891dd53af41146cf9f98b
Author:     Heiko Carstens <[email protected]>
AuthorDate: Mon, 14 Dec 2009 10:24:12 +0100
Committer:  Ingo Molnar <[email protected]>
CommitDate: Mon, 14 Dec 2009 10:42:57 +0100

hw-breakpoints: Let modify_user_hw_breakpoint() return an int

Let modify_user_hw_breakpoint return an int to avoid hundreds of compile warnings like this one:

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

Cc Frederic Weisbecker <[email protected]>

LKML-Reference: <[email protected]>

---
 include/linux/hw_breakpoint.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/linux/hw_breakpoint.h +1 -1
index 41235c9..3f3ac2f 100644
@@ -90,7 +90,7 @@ static inline struct arch_hw_breakpoint *counter_arch_bp(struct perf_event *bp)
 static inline struct perf_event *
 register_user_hw_breakpoint(struct perf_event_attr *attr,
 			    perf_overflow_handler_t triggered,
-			    struct task_struct *tsk)	{ return NULL; }
+			    struct task_struct *tsk)	{ return 0; }
 static inline int
 modify_user_hw_breakpoint(struct perf_event *bp,
 			  struct perf_event_attr *attr)	{ return -ENOSYS; }
#2 lore raw

Re: [tip:perf/urgent] hw-breakpoints: Let modify_user_hw_breakpoint() return an int

Quoted 12 lines · tip-bot for Heiko Carstens
Commit-ID:  4983ee49cf0393fd786891dd53af41146cf9f98b
Gitweb:     http://git.kernel.org/tip/4983ee49cf0393fd786891dd53af41146cf9f98b
Author:     Heiko Carstens <[email protected]>
AuthorDate: Mon, 14 Dec 2009 10:24:12 +0100
Committer:  Ingo Molnar <[email protected]>
CommitDate: Mon, 14 Dec 2009 10:42:57 +0100

hw-breakpoints: Let modify_user_hw_breakpoint() return an int

Let modify_user_hw_breakpoint return an int to avoid hundreds of compile warnings like this one:

Quoted 8 lines

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

Cc Frederic Weisbecker <[email protected]>

LKML-Reference: <[email protected]>

Thanks!

I sent a patch for that but looks like it haven't made its way :)

[PATCH] hw-breakpoints: Handle bad modify_user_hw_breakpoint off-case return value

#3 lore raw

Re: [tip:perf/urgent] hw-breakpoints: Let modify_user_hw_breakpoint() return an int

In reply to tip-bot for Heiko Carstens

Hi Ingo,

Quoted 30 lines · On Mon, 14 Dec 2009 09:49:44 GMT tip-bot for Heiko Carstens…
Commit-ID:  4983ee49cf0393fd786891dd53af41146cf9f98b
Gitweb:     http://git.kernel.org/tip/4983ee49cf0393fd786891dd53af41146cf9f98b
Author:     Heiko Carstens <[email protected]>
AuthorDate: Mon, 14 Dec 2009 10:24:12 +0100
Committer:  Ingo Molnar <[email protected]>
CommitDate: Mon, 14 Dec 2009 10:42:57 +0100

hw-breakpoints: Let modify_user_hw_breakpoint() return an int

Let modify_user_hw_breakpoint return an int to avoid hundreds of compile warnings like this one:

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

Cc Frederic Weisbecker <[email protected]>

LKML-Reference: <[email protected]>

---
 include/linux/hw_breakpoint.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/linux/hw_breakpoint.h +0 -0
index 41235c9..3f3ac2f 100644

include/linux/hw_breakpoint.h static inline struct arch_hw_breakpoint *counter_arch_bp(struct perf_event *bp) · line 96

Quoted 8 lines
include/linux/hw_breakpoint.h +1 -1
@@ -90,7 +90,7 @@ static inline struct arch_hw_breakpoint *counter_arch_bp(struct perf_event *bp)
 static inline struct perf_event *
 register_user_hw_breakpoint(struct perf_event_attr *attr,
 			    perf_overflow_handler_t triggered,
-			    struct task_struct *tsk)	{ return NULL; }
+			    struct task_struct *tsk)	{ return 0; }
 static inline int
 modify_user_hw_breakpoint(struct perf_event *bp,
 			  struct perf_event_attr *attr)	{ return -ENOSYS; }

This applied incorrectly ... it was a fix for modify_user_hw_breakpoint(), but that fix has already bee applied to perf/urgent ...

Signature · 3 lines
Cheers,
Stephen Rothwell                    [email protected]
http://www.canb.auug.org.au/~sfr/
#4 lore raw

Re: [tip:perf/urgent] hw-breakpoints: Let modify_user_hw_breakpoint() return an int

Quoted 28 lines · Stephen Rothwell

Hi Ingo,

Quoted 25 lines · On Mon, 14 Dec 2009 09:49:44 GMT tip-bot for Heiko Carstens…
Commit-ID:  4983ee49cf0393fd786891dd53af41146cf9f98b
Gitweb:     http://git.kernel.org/tip/4983ee49cf0393fd786891dd53af41146cf9f98b
Author:     Heiko Carstens <[email protected]>
AuthorDate: Mon, 14 Dec 2009 10:24:12 +0100
Committer:  Ingo Molnar <[email protected]>
CommitDate: Mon, 14 Dec 2009 10:42:57 +0100

hw-breakpoints: Let modify_user_hw_breakpoint() return an int

Let modify_user_hw_breakpoint return an int to avoid hundreds of compile warnings like this one:

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

Cc Frederic Weisbecker <[email protected]>

LKML-Reference: <[email protected]>

---
 include/linux/hw_breakpoint.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Quoted 16 lines

include/linux/hw_breakpoint.h static inline struct arch_hw_breakpoint *counter_arch_bp(struct perf_event *bp) · line 96

Quoted 13 lines
include/linux/hw_breakpoint.h +1 -1
index 41235c9..3f3ac2f 100644
@@ -90,7 +90,7 @@ static inline struct arch_hw_breakpoint *counter_arch_bp(struct perf_event *bp)
 static inline struct perf_event *
 register_user_hw_breakpoint(struct perf_event_attr *attr,
 			    perf_overflow_handler_t triggered,
-			    struct task_struct *tsk)	{ return NULL; }
+			    struct task_struct *tsk)	{ return 0; }
 static inline int
 modify_user_hw_breakpoint(struct perf_event *bp,
 			  struct perf_event_attr *attr)	{ return -ENOSYS; }

This applied incorrectly ... it was a fix for modify_user_hw_breakpoint(), but that fix has already bee applied to perf/urgent ...

yeah ... zapped it.

Ingo