linux-stable/arch/powerpc/sysdev/xics
Gautam Menghani 984b07b428 powerpc/xics: Remove unnecessary endian conversion
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);

'server' was used as a parameter to opal_get_xive() in commit
5c7c1e9444 ("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 bf8e0f891a ("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().

Fix the warning by removing the server variable assignment.

Fixes: bf8e0f891a ("powerpc/powernv: Fix endian issues in OPAL ICS backend")
Reviewed-by: Jordan Niethe <jniethe5@gmail.com>
Signed-off-by: Gautam Menghani <gautam@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230731115543.36991-1-gautam@linux.ibm.com
2023-08-16 23:54:48 +10:00
..
Kconfig powerpc/xics: Add a native ICS backend for microwatt 2021-06-21 21:15:58 +10:00
Makefile powerpc/xics: Add a native ICS backend for microwatt 2021-06-21 21:15:58 +10:00
icp-hv.c powerpc/sysdev: Add __init attribute to eligible functions 2021-12-23 22:33:12 +11:00
icp-native.c powerpc/xics: Use of_address_count() 2023-04-04 22:11:03 +10:00
icp-opal.c powerpc/xics: fix refcount leak in icp_opal_init() 2022-05-22 15:58:30 +10:00
ics-native.c powerpc/xics: Include missing header 2022-05-24 20:44:30 +10:00
ics-opal.c powerpc/xics: Remove unnecessary endian conversion 2023-08-16 23:54:48 +10:00
ics-rtas.c powerpc/rtas: arch-wide function token lookup conversions 2023-02-13 22:35:03 +11:00
xics-common.c powerpc/kasan: Disable address sanitization in kexec paths 2022-05-22 15:58:29 +10:00