Message ID | 1455546925-22119-5-git-send-email-a.hajda@samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Mon, Feb 15, 2016 at 03:35:22PM +0100, Andrzej Hajda wrote: > IS_ERR_VALUE macro should be used only with unsigned long type. > For signed types comparison 'ret < 0' should be used. > > The patch follows conclusion from discussion on LKML [1][2]. ACK -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Andrzej, On Mon, 15 Feb 2016, Andrzej Hajda wrote: > IS_ERR_VALUE macro should be used only with unsigned long type. > For signed types comparison 'ret < 0' should be used. > > The patch follows conclusion from discussion on LKML [1][2]. > > [1]: http://permalink.gmane.org/gmane.linux.kernel/2120927 > [2]: http://permalink.gmane.org/gmane.linux.kernel/2150581 > > Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Thanks for the patch, but this one https://lkml.org/lkml/2016/2/9/392 came a couple of days earlier. Unless there is an important reason to use yours, I'll use that one. Thanks Guennadi > --- > drivers/media/platform/soc_camera/atmel-isi.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/media/platform/soc_camera/atmel-isi.c b/drivers/media/platform/soc_camera/atmel-isi.c > index 1af779e..ab2d9b9 100644 > --- a/drivers/media/platform/soc_camera/atmel-isi.c > +++ b/drivers/media/platform/soc_camera/atmel-isi.c > @@ -1026,7 +1026,7 @@ static int atmel_isi_parse_dt(struct atmel_isi *isi, > > static int atmel_isi_probe(struct platform_device *pdev) > { > - unsigned int irq; > + int irq; > struct atmel_isi *isi; > struct resource *regs; > int ret, i; > @@ -1086,7 +1086,7 @@ static int atmel_isi_probe(struct platform_device *pdev) > isi->width_flags |= 1 << 9; > > irq = platform_get_irq(pdev, 0); > - if (IS_ERR_VALUE(irq)) { > + if (irq < 0) { > ret = irq; > goto err_req_irq; > } > -- > 1.9.1 > -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/media/platform/soc_camera/atmel-isi.c b/drivers/media/platform/soc_camera/atmel-isi.c index 1af779e..ab2d9b9 100644 --- a/drivers/media/platform/soc_camera/atmel-isi.c +++ b/drivers/media/platform/soc_camera/atmel-isi.c @@ -1026,7 +1026,7 @@ static int atmel_isi_parse_dt(struct atmel_isi *isi, static int atmel_isi_probe(struct platform_device *pdev) { - unsigned int irq; + int irq; struct atmel_isi *isi; struct resource *regs; int ret, i; @@ -1086,7 +1086,7 @@ static int atmel_isi_probe(struct platform_device *pdev) isi->width_flags |= 1 << 9; irq = platform_get_irq(pdev, 0); - if (IS_ERR_VALUE(irq)) { + if (irq < 0) { ret = irq; goto err_req_irq; }
IS_ERR_VALUE macro should be used only with unsigned long type. For signed types comparison 'ret < 0' should be used. The patch follows conclusion from discussion on LKML [1][2]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2120927 [2]: http://permalink.gmane.org/gmane.linux.kernel/2150581 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> --- drivers/media/platform/soc_camera/atmel-isi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)