powerpc/pseries/pmem: Fix a set but not used value
authorQian Cai <cai@lca.pw>
Sun, 7 Apr 2019 01:54:47 +0000 (21:54 -0400)
committerMichael Ellerman <mpe@ellerman.id.au>
Sat, 20 Apr 2019 12:02:26 +0000 (22:02 +1000)
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>
arch/powerpc/platforms/pseries/pmem.c

index 27f0a915c8a97fc53195c84f14df6ad264f350af..f860a897a9e0521c37ac7d5b9b3f31475db69527 100644 (file)
@@ -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 */
@@ -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();