public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -tip] x86: oprofile/op_model_amd.c set return values for op_amd_handle_ibs()
@ 2009-06-18 11:39 Jaswinder Singh Rajput
  2009-06-18 14:47 ` Robert Richter
  0 siblings, 1 reply; 4+ messages in thread
From: Jaswinder Singh Rajput @ 2009-06-18 11:39 UTC (permalink / raw)
  To: Ingo Molnar, Robert Richter, x86 maintainers, LKML


op_amd_handle_ibs() should return 0 when IBS is not present or not defined.

Fix compilation warning:
 CC [M]  arch/x86/oprofile/op_model_amd.o
 arch/x86/oprofile/op_model_amd.c: In function ‘op_amd_handle_ibs’:
 arch/x86/oprofile/op_model_amd.c:217: warning: no return statement in function returning non-void

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
---
 arch/x86/oprofile/op_model_amd.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/x86/oprofile/op_model_amd.c b/arch/x86/oprofile/op_model_amd.c
index cc93046..e95268e 100644
--- a/arch/x86/oprofile/op_model_amd.c
+++ b/arch/x86/oprofile/op_model_amd.c
@@ -132,7 +132,7 @@ op_amd_handle_ibs(struct pt_regs * const regs,
 	struct op_entry entry;
 
 	if (!has_ibs)
-		return 1;
+		return 0;
 
 	if (ibs_config.fetch_enabled) {
 		rdmsrl(MSR_AMD64_IBSFETCHCTL, ctl);
@@ -214,7 +214,10 @@ static void op_amd_stop_ibs(void)
 #else
 
 static inline int op_amd_handle_ibs(struct pt_regs * const regs,
-				    struct op_msrs const * const msrs) { }
+				    struct op_msrs const * const msrs)
+{
+	return 0;
+}
 static inline void op_amd_start_ibs(void) { }
 static inline void op_amd_stop_ibs(void) { }
 
-- 
1.6.0.6




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

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

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-18 11:39 [PATCH -tip] x86: oprofile/op_model_amd.c set return values for op_amd_handle_ibs() Jaswinder Singh Rajput
2009-06-18 14:47 ` Robert Richter
2009-07-31 20:29   ` Andrew Morton
2009-07-31 21:10     ` Robert Richter

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