linux-xiaomi-chiron/arch/powerpc/lib
Ravi Bangoria 344717a14c powerpc/sstep: Fix array out of bound warning
Compiling kernel with -Warray-bounds throws below warning:

  In function 'emulate_vsx_store':
  warning: array subscript is above array bounds [-Warray-bounds]
  buf.d[2] = byterev_8(reg->d[1]);
  ~~~~~^~~
  buf.d[3] = byterev_8(reg->d[0]);
  ~~~~~^~~

Fix it by using temporary array variable 'union vsx_reg buf32[]' in
that code block. Also, with element_size = 32, 'union vsx_reg *reg'
is an array of size 2. So, use 'reg' as an array instead of pointer
in the same code block.

Fixes: af99da7433 ("powerpc/sstep: Support VSX vector paired storage access instructions")
Suggested-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Tested-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210129071745.111466-1-ravi.bangoria@linux.ibm.com
2021-01-30 22:23:26 +11:00
..
alloc.c
checksum_32.S
checksum_64.S
checksum_wrappers.c
code-patching.c
copy_32.S
copy_mc_64.S
copypage_64.S
copypage_power7.S
copyuser_64.S
copyuser_power7.S
crtsavres.S
div64.S
error-inject.c
feature-fixups-test.S
feature-fixups.c
hweight_64.S
inst.c
ldstfp.S
locks.c
Makefile
mem_64.S
memcmp_32.S
memcmp_64.S
memcpy_64.S
memcpy_power7.S
pmem.c
quad.S
rheap.c
sstep.c
string.S
string_32.S
string_64.S
strlen_32.S
test_code-patching.S
test_emulate_step.c
test_emulate_step_exec_instr.S
vmx-helper.c
xor_vmx.c
xor_vmx.h
xor_vmx_glue.c