Skip to content

Commit

Permalink
powerpc/mce: Remove unused but set variable
Browse files Browse the repository at this point in the history
Remove the unused but set variable srr1 in save_mce_event() to
fix the following GCC warning when building with 'W=1':

  arch/powerpc/kernel/mce.c:75:11: warning: variable 'srr1' set but not used

It has never been used.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
  • Loading branch information
Tobias Klauser authored and Michael Ellerman committed Nov 18, 2016
1 parent 60d862e commit d6d56ec
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions arch/powerpc/kernel/mce.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ void save_mce_event(struct pt_regs *regs, long handled,
struct mce_error_info *mce_err,
uint64_t nip, uint64_t addr)
{
uint64_t srr1;
int index = __this_cpu_inc_return(mce_nest_count) - 1;
struct machine_check_event *mce = this_cpu_ptr(&mce_event[index]);

Expand All @@ -99,8 +98,6 @@ void save_mce_event(struct pt_regs *regs, long handled,
mce->disposition = MCE_DISPOSITION_NOT_RECOVERED;
mce->severity = MCE_SEV_ERROR_SYNC;

srr1 = regs->msr;

/*
* Populate the mce error_type and type-specific error_type.
*/
Expand Down

0 comments on commit d6d56ec

Please sign in to comment.