Skip to contentSkip to conversation

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

PATCH Applied Qian Cai 3 participants 3 messages Apr 7, 2019 – Apr 21, 2019 PowerPC

lore
Share & tools
lore

Qian Cai

author
#0 lore raw

PATCH 1/1 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 [-Wunused-but-set-variable]

---
 arch/powerpc/platforms/pseries/pmem.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/powerpc/platforms/pseries/pmem.c +1 -2
index 27f0a915c8a9..f860a897a9e0 100644
@@ -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();
Signature · 1 line
2.17.2 (Apple Git-113)
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Qian Cai

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 [-Wunused-but-set-variable]

Cheers,
-Mukesh

Quoted 25 lines
---
  arch/powerpc/platforms/pseries/pmem.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
arch/powerpc/platforms/pseries/pmem.c +1 -2
index 27f0a915c8a9..f860a897a9e0 100644
@@ -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();
#2 lore raw
In reply to Qian Cai
Quoted 10 lines · Qian Cai

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 [-Wunused-but-set-variable]

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/e663e1e06089773cdab03023563aead6

cheers