Re: [PATCH v2] staging/comedi/dt282x: avoid integer overflow warning

2016-03-19 Thread Arnd Bergmann
On Thursday 17 March 2016 15:47:57 Hartley Sweeten wrote: > On Wednesday, March 16, 2016 1:51 PM, Arnd Bergmann wrote: > > Is this a gcc-6 specific issue? Seems line this warning should be showing > up in a lot of drivers. Yes, I did not see this before moving to gcc-6.0, but this is the only dri

RE: [PATCH v2] staging/comedi/dt282x: avoid integer overflow warning

2016-03-19 Thread Hartley Sweeten
On Thursday, March 17, 2016 9:09 AM, Arnd Bergmann wrote: > On Thursday 17 March 2016 15:47:57 Hartley Sweeten wrote: >> On Wednesday, March 16, 2016 1:51 PM, Arnd Bergmann wrote: >> >> Is this a gcc-6 specific issue? Seems line this warning should be showing >> up in a lot of drivers. > > Yes, I

RE: [PATCH v2] staging/comedi/dt282x: avoid integer overflow warning

2016-03-19 Thread Hartley Sweeten
On Wednesday, March 16, 2016 1:51 PM, Arnd Bergmann wrote: > > gcc-6 warns about passing negative signed integer into swab16() > in the dt282x driver: > > drivers/staging/comedi/drivers/dt282x.c: In function 'dt282x_load_changain': > include/uapi/linux/swab.h:14:33: warning: integer overflow in exp

Re: [PATCH v2] staging/comedi/dt282x: avoid integer overflow warning

2016-03-19 Thread Ian Abbott
On 16/03/16 20:51, Arnd Bergmann wrote: gcc-6 warns about passing negative signed integer into swab16() in the dt282x driver: drivers/staging/comedi/drivers/dt282x.c: In function 'dt282x_load_changain': include/uapi/linux/swab.h:14:33: warning: integer overflow in expression [-Woverflow] (((