Re: [PATCH v2] powerpc/sstep: Fix array out of bound warning

2021-02-03 Thread Michael Ellerman
On Fri, 29 Jan 2021 12:47:45 +0530, Ravi Bangoria wrote: > 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] =

Re: [PATCH v2] powerpc/sstep: Fix array out of bound warning

2021-01-29 Thread Naveen N. Rao
On 2021/01/29 12:47PM, Ravi Bangoria wrote: > 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] =

[PATCH v2] powerpc/sstep: Fix array out of bound warning

2021-01-28 Thread Ravi Bangoria
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