Skip to content

Commit

Permalink
powerpc/pseries/pmem: Fix a set but not used value
Browse files Browse the repository at this point in the history
The commit 4c5d87d ("powerpc/pseries: PAPR persistent memory
support") set a local variable "count" in dlpar_hp_pmem() but never
use it.

  arch/powerpc/platforms/pseries/pmem.c: In function 'dlpar_hp_pmem':
  arch/powerpc/platforms/pseries/pmem.c:109:6: warning: variable 'count' set but not used

Signed-off-by: Qian Cai <cai@lca.pw>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
  • Loading branch information
Qian Cai authored and Michael Ellerman committed Apr 20, 2019
1 parent c05f57f commit e663e1e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arch/powerpc/platforms/pseries/pmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ static ssize_t pmem_drc_remove_node(u32 drc_index)

int dlpar_hp_pmem(struct pseries_hp_errorlog *hp_elog)
{
u32 count, drc_index;
u32 drc_index;
int rc;

/* slim chance, but we might get a hotplug event while booting */
Expand All @@ -123,7 +123,6 @@ int dlpar_hp_pmem(struct pseries_hp_errorlog *hp_elog)
return -EINVAL;
}

count = hp_elog->_drc_u.drc_count;
drc_index = hp_elog->_drc_u.drc_index;

lock_device_hotplug();
Expand Down

0 comments on commit e663e1e

Please sign in to comment.