Re: [PATCH 13/15] scsi: sas: avoid gcc-10 zero-length-bounds warning

2020-05-01 Thread Arnd Bergmann
On Fri, May 1, 2020 at 4:53 PM James Bottomley wrote: > On Fri, 2020-05-01 at 09:54 +0200, Arnd Bergmann wrote: > > On Fri, May 1, 2020 at 9:48 AM John Garry > > wrote: > > I found one hack that would work, but I think it's too ugly and > > likely not well-defined either: > > > > struct ssp_respo

Re: [PATCH 13/15] scsi: sas: avoid gcc-10 zero-length-bounds warning

2020-05-01 Thread James Bottomley
On Fri, 2020-05-01 at 09:54 +0200, Arnd Bergmann wrote: > On Fri, May 1, 2020 at 9:48 AM John Garry > wrote: > > On 30/04/2020 22:30, Arnd Bergmann wrote: > > > This should really be a flexible-array member, but the structure > > > already has such a member, swapping it out with sense_data[] > > >

Re: [PATCH 13/15] scsi: sas: avoid gcc-10 zero-length-bounds warning

2020-05-01 Thread Arnd Bergmann
On Fri, May 1, 2020 at 9:48 AM John Garry wrote: > On 30/04/2020 22:30, Arnd Bergmann wrote: > > This should really be a flexible-array member, but the structure > > already has such a member, swapping it out with sense_data[] would > > cause many more warnings elsewhere. > > > > > Hi Arnd, > > I

Re: [PATCH 13/15] scsi: sas: avoid gcc-10 zero-length-bounds warning

2020-05-01 Thread John Garry
On 30/04/2020 22:30, Arnd Bergmann wrote: Two files access the zero-length resp_data[] array, which now causes a compiler warning: drivers/scsi/aic94xx/aic94xx_tmf.c: In function 'asd_get_tmf_resp_tasklet': drivers/scsi/aic94xx/aic94xx_tmf.c:291:22: warning: array subscript 3 is outside the bou

[PATCH 13/15] scsi: sas: avoid gcc-10 zero-length-bounds warning

2020-04-30 Thread Arnd Bergmann
Two files access the zero-length resp_data[] array, which now causes a compiler warning: drivers/scsi/aic94xx/aic94xx_tmf.c: In function 'asd_get_tmf_resp_tasklet': drivers/scsi/aic94xx/aic94xx_tmf.c:291:22: warning: array subscript 3 is outside the bounds of an interior zero-length array 'u8[0]'