linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arch/powerpc: Remove unnecessary endian conversion code in XICS
@ 2023-06-30  5:56 Gautam Menghani
  2023-07-03  6:41 ` Michael Ellerman
  2023-07-06  7:50 ` Jordan Niethe
  0 siblings, 2 replies; 10+ messages in thread
From: Gautam Menghani @ 2023-06-30  5:56 UTC (permalink / raw)
  To: mpe, npiggin, christophe.leroy
  Cc: Gautam Menghani, linuxppc-dev, linux-kernel

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.

Signed-off-by: Gautam Menghani <gautam@linux.ibm.com>
---
 arch/powerpc/sysdev/xics/ics-opal.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/powerpc/sysdev/xics/ics-opal.c b/arch/powerpc/sysdev/xics/ics-opal.c
index 6cfbb4fac7fb..5fe73dabab79 100644
--- a/arch/powerpc/sysdev/xics/ics-opal.c
+++ b/arch/powerpc/sysdev/xics/ics-opal.c
@@ -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) {
-- 
2.39.3


^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [PATCH] arch/powerpc: Remove unnecessary endian conversion code in XICS
@ 2023-06-30  6:13 Gautam Menghani
  2023-06-30  6:16 ` Gautam Menghani
  0 siblings, 1 reply; 10+ messages in thread
From: Gautam Menghani @ 2023-06-30  6:13 UTC (permalink / raw)
  To: mpe, npiggin, christophe.leroy
  Cc: Gautam Menghani, linuxppc-dev, linux-kernel

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.

Signed-off-by: Gautam Menghani <gautam@linux.ibm.com>
---
 arch/powerpc/sysdev/xics/ics-opal.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/powerpc/sysdev/xics/ics-opal.c b/arch/powerpc/sysdev/xics/ics-opal.c
index 6cfbb4fac7fb..5fe73dabab79 100644
--- a/arch/powerpc/sysdev/xics/ics-opal.c
+++ b/arch/powerpc/sysdev/xics/ics-opal.c
@@ -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) {
-- 
2.39.3


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-07-31 12:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-30  5:56 [PATCH] arch/powerpc: Remove unnecessary endian conversion code in XICS Gautam Menghani
2023-07-03  6:41 ` Michael Ellerman
2023-07-06  7:50 ` Jordan Niethe
2023-07-11  9:33   ` Gautam Menghani
2023-07-26  8:07   ` Gautam Menghani
2023-07-26  9:12   ` Gautam Menghani
2023-07-29 10:54     ` Michael Ellerman
2023-07-31 12:00       ` Gautam Menghani
  -- strict thread matches above, loose matches on Subject: below --
2023-06-30  6:13 Gautam Menghani
2023-06-30  6:16 ` Gautam Menghani

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).