[patch] rt2x00: type bug in _rt2500usb_register_read()

2015-11-26 Thread Dan Carpenter
This code causes a static checker bug. drivers/net/wireless/ralink/rt2x00/rt2500usb.c:232 _rt2500usb_register_read() warn: passing casted pointer 'value' to 'rt2500usb_register_read()' 32 vs 16. If the low 16 bits were initialized to zero then this code would only be a problem on big endian

Re: [patch] rt2x00: type bug in _rt2500usb_register_read()

2015-11-26 Thread walter harms
Am 26.11.2015 12:55, schrieb Dan Carpenter: > This code causes a static checker bug. > > drivers/net/wireless/ralink/rt2x00/rt2500usb.c:232 _rt2500usb_register_read() > warn: passing casted pointer 'value' to 'rt2500usb_register_read()' 32 vs 16. > > If the low 16 bits were initialized to zero

Re: [patch] rt2x00: type bug in _rt2500usb_register_read()

2015-11-26 Thread Dan Carpenter
On Thu, Nov 26, 2015 at 01:21:48PM +0100, walter harms wrote: > > If the low 16 bits were initialized to zero then this code would only be > > a problem on big endian systems. > perhaps, cleaning *value would be sufficient ? Avoiding the need for a tmp > var. > > *value = 0 >

Re: [patch] rt2x00: type bug in _rt2500usb_register_read()

2015-11-26 Thread Stanislaw Gruszka
On Thu, Nov 26, 2015 at 02:55:23PM +0300, Dan Carpenter wrote: > This code causes a static checker bug. > > drivers/net/wireless/ralink/rt2x00/rt2500usb.c:232 _rt2500usb_register_read() > warn: passing casted pointer 'value' to 'rt2500usb_register_read()' 32 vs 16. > > If the low 16 bits were