Re: [patch] spi/xilinx: signedness issue checking platform_get_irq()

2013-07-17 Thread Dan Carpenter
On Wed, Jul 17, 2013 at 09:03:53AM -0600, Stephen Warren wrote:
 On 07/17/2013 06:26 AM, Dan Carpenter wrote:
  xspi-irq is unsigned int so it's never less than zero.  I have added
  a cast.
 
 Um. Doesn't this just hide a warning, not solve the problem? If the
 value can't be negative, so the if condition never fires, then the cast
 won't change that...

No.  It fixes the problem but Mark is right that it's ugly.  Sorry
for that.  I will resend.

regards,
dan carpenter

___
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss


Re: [patch] spi/xilinx: signedness issue checking platform_get_irq()

2013-07-17 Thread Stephen Warren
On 07/17/2013 06:26 AM, Dan Carpenter wrote:
 xspi-irq is unsigned int so it's never less than zero.  I have added
 a cast.

Um. Doesn't this just hide a warning, not solve the problem? If the
value can't be negative, so the if condition never fires, then the cast
won't change that...
___
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss


Re: [patch] spi/xilinx: signedness issue checking platform_get_irq()

2013-07-17 Thread Mark Brown
On Wed, Jul 17, 2013 at 03:26:38PM +0300, Dan Carpenter wrote:
 xspi-irq is unsigned int so it's never less than zero.  I have added
 a cast.

Why is this better than changing irq to a signed type?


signature.asc
Description: Digital signature
___
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss