Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/pseries/pmem: Fix a set but not used value

The commit 4c5d87db4978 ("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>

authored by

Qian Cai and committed by
Michael Ellerman
e663e1e0 c05f57fd

+1 -2
+1 -2
arch/powerpc/platforms/pseries/pmem.c
··· 106 106 107 107 int dlpar_hp_pmem(struct pseries_hp_errorlog *hp_elog) 108 108 { 109 - u32 count, drc_index; 109 + u32 drc_index; 110 110 int rc; 111 111 112 112 /* slim chance, but we might get a hotplug event while booting */ ··· 123 123 return -EINVAL; 124 124 } 125 125 126 - count = hp_elog->_drc_u.drc_count; 127 126 drc_index = hp_elog->_drc_u.drc_index; 128 127 129 128 lock_device_hotplug();