Skip to contentSkip to conversation

arch/powerpc: Remove unnecessary endian conversion code in XICS

PATCH Superseded Gautam Menghani 1 participant 2 messages Jun 30, 2023 PowerPC

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arch/powerpc: Remove unnecessary endian conversion code in XICS

Remove an unnecessary piece of code that does an endianness conversion but does not use the result. The following warning was reported by Clang's static analyzer:

arch/powerpc/sysdev/xics/ics-opal.c:114:2: warning: Value stored to 'server' is never read [deadcode.DeadStores]

        server = be16_to_cpu(oserver);

As the result of endianness conversion is never used, delete the line and fix the warning.

---
 arch/powerpc/sysdev/xics/ics-opal.c | 1 -
 1 file changed, 1 deletion(-)
arch/powerpc/sysdev/xics/ics-opal.c +0 -1
index 6cfbb4fac7fb..5fe73dabab79 100644
@@ -111,7 +111,6 @@ static int ics_opal_set_affinity(struct irq_data *d,
 		       __func__, d->irq, hw_irq, rc);
 		return -1;
 	}
-	server = be16_to_cpu(oserver);
 
 	wanted_server = xics_get_irq_server(d->irq, cpumask, 1);
 	if (wanted_server < 0) {
Signature · 1 line
2.39.3
#1 lore raw
Quoted 31 lines · Gautam Menghani

Remove an unnecessary piece of code that does an endianness conversion but does not use the result. The following warning was reported by Clang's static analyzer:

arch/powerpc/sysdev/xics/ics-opal.c:114:2: warning: Value stored to 'server' is never read [deadcode.DeadStores]

        server = be16_to_cpu(oserver);

As the result of endianness conversion is never used, delete the line and fix the warning.

---
 arch/powerpc/sysdev/xics/ics-opal.c | 1 -
 1 file changed, 1 deletion(-)
arch/powerpc/sysdev/xics/ics-opal.c +0 -1
index 6cfbb4fac7fb..5fe73dabab79 100644
@@ -111,7 +111,6 @@ static int ics_opal_set_affinity(struct irq_data *d,
 		       __func__, d->irq, hw_irq, rc);
 		return -1;
 	}
-	server = be16_to_cpu(oserver);
 
 	wanted_server = xics_get_irq_server(d->irq, cpumask, 1);
 	if (wanted_server < 0) {
Signature · 1 line
2.39.3

I resent this patch by mistake, please ignore this. Apologies for the trouble.