Re: -Wswitch Clang warnings in drivers/scsi

2018-10-19 Thread Bart Van Assche
On 10/18/18 11:51 PM, Nathan Chancellor wrote: On Mon, Oct 08, 2018 at 11:47:09AM -0700, Bart Van Assche wrote: From the user space header : extern int ioctl (int __fd, unsigned long int __request, ...) __THROW; From the kernel header : long (*unlocked_ioctl) (struct file *, unsigne

Re: -Wswitch Clang warnings in drivers/scsi

2018-10-18 Thread Nathan Chancellor
On Mon, Oct 08, 2018 at 11:47:09AM -0700, Bart Van Assche wrote: > On Thu, 2018-10-04 at 23:57 -0700, Nathan Chancellor wrote: > > Regardless of how the overflow is handled within the switch statement, > > the overflow is also happening when passing in these values to the ioctl, > > right? I mean t

Re: -Wswitch Clang warnings in drivers/scsi

2018-10-08 Thread Bart Van Assche
On Thu, 2018-10-04 at 23:57 -0700, Nathan Chancellor wrote: > Regardless of how the overflow is handled within the switch statement, > the overflow is also happening when passing in these values to the ioctl, > right? I mean these case values are defined in the uapi files so that > userspace can ea

Re: -Wswitch Clang warnings in drivers/scsi

2018-10-08 Thread Nick Desaulniers
On Thu, Oct 4, 2018 at 11:57 PM Nathan Chancellor wrote: > > On Thu, Oct 04, 2018 at 02:16:49PM -0700, Nick Desaulniers wrote: > > On Thu, Oct 4, 2018 at 11:45 AM Nathan Chancellor > > wrote: > > > > > > On Thu, Oct 04, 2018 at 11:34:29AM -0700, Bart Van Assche wrote: > > > > On Thu, 2018-10-04 a

Re: -Wswitch Clang warnings in drivers/scsi

2018-10-04 Thread Nathan Chancellor
On Thu, Oct 04, 2018 at 02:16:49PM -0700, Nick Desaulniers wrote: > On Thu, Oct 4, 2018 at 11:45 AM Nathan Chancellor > wrote: > > > > On Thu, Oct 04, 2018 at 11:34:29AM -0700, Bart Van Assche wrote: > > > On Thu, 2018-10-04 at 11:30 -0700, Nathan Chancellor wrote: > > > > Hi SCSI folks, > > > > >

Re: -Wswitch Clang warnings in drivers/scsi

2018-10-04 Thread Nick Desaulniers
On Thu, Oct 4, 2018 at 11:45 AM Nathan Chancellor wrote: > > On Thu, Oct 04, 2018 at 11:34:29AM -0700, Bart Van Assche wrote: > > On Thu, 2018-10-04 at 11:30 -0700, Nathan Chancellor wrote: > > > Hi SCSI folks, > > > > > > In an effort to get the kernel building warning free with Clang, we've > >

Re: -Wswitch Clang warnings in drivers/scsi

2018-10-04 Thread Nathan Chancellor
On Thu, Oct 04, 2018 at 11:34:29AM -0700, Bart Van Assche wrote: > On Thu, 2018-10-04 at 11:30 -0700, Nathan Chancellor wrote: > > Hi SCSI folks, > > > > In an effort to get the kernel building warning free with Clang, we've > > come across an interesting occurrence in a few scsi drivers: > > > >

Re: -Wswitch Clang warnings in drivers/scsi

2018-10-04 Thread Bart Van Assche
On Thu, 2018-10-04 at 11:30 -0700, Nathan Chancellor wrote: > Hi SCSI folks, > > In an effort to get the kernel building warning free with Clang, we've > come across an interesting occurrence in a few scsi drivers: > > drivers/scsi/hpsa.c:6533:7: warning: overflow converting case value to switch

-Wswitch Clang warnings in drivers/scsi

2018-10-04 Thread Nathan Chancellor
Hi SCSI folks, In an effort to get the kernel building warning free with Clang, we've come across an interesting occurrence in a few scsi drivers: drivers/scsi/hpsa.c:6533:7: warning: overflow converting case value to switch condition type (2148024833 to 18446744071562609153) [-Wswitch]