summaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/vdso64_wrapper.S
diff options
context:
space:
mode:
authorRavi Bangoria <ravi.bangoria@linux.ibm.com>2021-01-29 10:17:45 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2021-01-30 14:23:26 +0300
commit344717a14cd7272f88346022a77742323346299e (patch)
treefffc93e2ce9a766d8b6e7d4a708adf9434a2e161 /arch/powerpc/kernel/vdso64_wrapper.S
parent4025c784c573cab7e3f84746cc82b8033923ec62 (diff)
downloadlinux-344717a14cd7272f88346022a77742323346299e.tar.xz
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: af99da74333b ("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
Diffstat (limited to 'arch/powerpc/kernel/vdso64_wrapper.S')
0 files changed, 0 insertions, 0 deletions