linux/arch/powerpc
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
..
boot powerpc: dts: turris1x.dts: Fix PCIe MEM size for pci2 node 2023-07-03 16:26:51 +10:00
configs powerpc/pmac32: enable serial options by default in defconfig 2023-08-14 21:54:04 +10:00
crypto powerpc/crypto: don't build aes-gcm-p10 by default 2023-08-02 22:22:18 +10:00
include powerpc: remove <asm/export.h> 2023-08-16 23:54:48 +10:00
kernel powerpc: replace #include <asm/export.h> with #include <linux/export.h> 2023-08-16 23:54:48 +10:00
kexec powerpc: mark more local variables as volatile 2023-08-14 21:54:04 +10:00
kvm powerpc: replace #include <asm/export.h> with #include <linux/export.h> 2023-08-16 23:54:48 +10:00
lib powerpc: replace #include <asm/export.h> with #include <linux/export.h> 2023-08-16 23:54:48 +10:00
math-emu powerpc/math-emu: Inhibit W=1 warnings 2022-09-08 11:11:18 +10:00
mm powerpc: replace #include <asm/export.h> with #include <linux/export.h> 2023-08-16 23:54:48 +10:00
net powerpc/bpf: populate extable entries only during the last pass 2023-05-15 15:40:31 +10:00
perf powerpc/perf: Properly detect mpc7450 family 2023-03-30 23:35:43 +11:00
platforms powerpc/pseries: fix possible memory leak in ibmebus_bus_init() 2023-08-16 23:54:48 +10:00
purgatory powerpc/purgatory: remove PGO flags 2023-06-12 11:31:50 -07:00
sysdev powerpc/xics: Remove unnecessary endian conversion 2023-08-16 23:54:48 +10:00
tools powerpc/64: Use -mprofile-kernel for big endian ELFv2 kernels 2023-06-14 12:46:42 +10:00
xmon powerpc: xmon: remove unused variables 2023-08-14 21:54:04 +10:00
Kbuild
Kconfig powerpc: Remove CONFIG_PCI_8260 2023-08-16 23:54:47 +10:00
Kconfig.debug powerpc: allow PPC_EARLY_DEBUG_CPM only when SERIAL_CPM=y 2023-07-03 16:07:55 +10:00
Makefile powerpc: remove checks for binutils older than 2.25 2023-06-27 16:59:29 +10:00
Makefile.postlink kbuild: remove --include-dir MAKEFLAG from top Makefile 2023-02-05 18:51:22 +09:00