Thread (8 messages) 8 messages, 4 authors, 2023-07-31

Re: [PATCH] arch/powerpc: Remove unnecessary endian conversion code in XICS

From: Gautam Menghani <hidden>
Date: 2023-07-26 08:19:23
Also in: lkml

On Thu, Jul 06, 2023 at 05:50:57PM +1000, Jordan Niethe wrote:

On 30/6/23 3:56 pm, Gautam Menghani wrote:
quoted
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 <redacted>
'server' was used as a parameter to opal_get_xive() in commit 5c7c1e9444d8
("powerpc/powernv: Add OPAL ICS backend") when it was introduced. 'server'
was also used in an error message for the call to opal_get_xive().

'server' was always later set by a call to ics_opal_mangle_server() before
being used.

Commit bf8e0f891a32 ("powerpc/powernv: Fix endian issues in OPAL ICS
backend") used a new variable 'oserver' as the parameter to opal_get_xive()
instead of 'server' for endian correctness. It also removed 'server' from
the error message for the call to opal_get_xive().

It was commit bf8e0f891a32 that added the unnecessary conversion and never
used the result.

Reviewed-by: Jordan Niethe <redacted>
Hello Michael,

Do you have any more questions on this patch or is it good to go?

Thanks,
Gautam
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help