Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1334494 > unrolled thread
| Started by | Andrzej Hajda <a.hajda@samsung.com> |
|---|---|
| First post | 2016-02-15 15:40 +0100 |
| Last post | 2016-02-21 19:00 +0100 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 4/7] atmel-isi: fix IS_ERR_VALUE usage Andrzej Hajda <a.hajda@samsung.com> - 2016-02-15 15:40 +0100
Re: [PATCH 4/7] atmel-isi: fix IS_ERR_VALUE usage Al Viro <viro@ZenIV.linux.org.uk> - 2016-02-17 03:40 +0100
Re: [PATCH 4/7] atmel-isi: fix IS_ERR_VALUE usage Guennadi Liakhovetski <g.liakhovetski@gmx.de> - 2016-02-21 19:00 +0100
| From | Andrzej Hajda <a.hajda@samsung.com> |
|---|---|
| Date | 2016-02-15 15:40 +0100 |
| Subject | [PATCH 4/7] atmel-isi: fix IS_ERR_VALUE usage |
| Message-ID | <r2stJ-2fA-51@gated-at.bofh.it> |
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(-)
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
[toc] | [next] | [standalone]
| From | Al Viro <viro@ZenIV.linux.org.uk> |
|---|---|
| Date | 2016-02-17 03:40 +0100 |
| Message-ID | <r30c1-8ce-9@gated-at.bofh.it> |
| In reply to | #1334494 |
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
[toc] | [prev] | [next] | [standalone]
| From | Guennadi Liakhovetski <g.liakhovetski@gmx.de> |
|---|---|
| Date | 2016-02-21 19:00 +0100 |
| Message-ID | <r4Gsz-16v-13@gated-at.bofh.it> |
| In reply to | #1334494 |
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
>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web