RE: [PATCH] scsi: resolve COMMAND_SIZE at compile time

2018-03-13 Thread David Laight
From: Stephen Kitt > Sent: 09 March 2018 22:34 > > COMMAND_SIZE currently uses an array of values in block/scsi_ioctl.c. > A number of device_handler functions use this to initialise arrays, > and this is flagged by -Wvla. > > This patch replaces COMMAND_SIZE with a variant using a formula which

Re: [PATCH] scsi: resolve COMMAND_SIZE at compile time

2018-03-10 Thread Douglas Gilbert
On 2018-03-10 03:49 PM, James Bottomley wrote: On Sat, 2018-03-10 at 14:29 +0100, Stephen Kitt wrote: Hi Bart, On Fri, 9 Mar 2018 22:47:12 +, Bart Van Assche wrote: On Fri, 2018-03-09 at 23:33 +0100, Stephen Kitt wrote: +/* + * SCSI command sizes are as

Re: [PATCH] scsi: resolve COMMAND_SIZE at compile time

2018-03-10 Thread James Bottomley
On Sat, 2018-03-10 at 14:29 +0100, Stephen Kitt wrote: > Hi Bart, > > On Fri, 9 Mar 2018 22:47:12 +, Bart Van Assche c.com> > wrote: > > > > On Fri, 2018-03-09 at 23:33 +0100, Stephen Kitt wrote: > > > > > > +/* > > > + * SCSI command sizes are as follows, in bytes, for

Re: [PATCH] scsi: resolve COMMAND_SIZE at compile time

2018-03-10 Thread Stephen Kitt
Hi Bart, On Fri, 9 Mar 2018 22:47:12 +, Bart Van Assche wrote: > On Fri, 2018-03-09 at 23:33 +0100, Stephen Kitt wrote: > > +/* > > + * SCSI command sizes are as follows, in bytes, for fixed size commands, > > per > > + * group: 6, 10, 10, 12, 16, 12, 10, 10. The top

Re: [PATCH] scsi: resolve COMMAND_SIZE at compile time

2018-03-09 Thread Bart Van Assche
On Fri, 2018-03-09 at 23:33 +0100, Stephen Kitt wrote: > +/* > + * SCSI command sizes are as follows, in bytes, for fixed size commands, per > + * group: 6, 10, 10, 12, 16, 12, 10, 10. The top three bits of an opcode > + * determine its group. > + * The size table is encoded into a 32-bit value by