Skip to content

Commit

Permalink
x86: oprofile/op_model_amd.c set return values for op_amd_handle_ibs()
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Robert Richter <robert.richter@amd.com>
  • Loading branch information
Jaswinder Singh Rajput authored and Robert Richter committed Jun 18, 2009
1 parent 802070f commit 21e7087
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions arch/x86/oprofile/op_model_amd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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) { }

Expand Down

0 comments on commit 21e7087

Please sign in to comment.