All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] video/cx231xx:  Fix sparse warning: Using plain integer as NULL pointer
@ 2011-01-25 20:38 ` Peter Huewe
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Huewe @ 2011-01-25 20:38 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Sri Deevi, Devin Heitmueller, Stephen Rothwell, linux-media,
	linux-kernel, kernel-janitors, Peter Huewe

This patch fixes the warning "Using plain integer as NULL pointer",
generated by sparse, by replacing the offending 0s with NULL.

KernelVersion: linus' tree-c723fdab

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
---
 drivers/media/video/cx231xx/cx231xx-417.c   |    4 ++--
 drivers/media/video/cx231xx/cx231xx-cards.c |   16 ++++++++--------
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/media/video/cx231xx/cx231xx-417.c b/drivers/media/video/cx231xx/cx231xx-417.c
index fc9526a..f8f0e59 100644
--- a/drivers/media/video/cx231xx/cx231xx-417.c
+++ b/drivers/media/video/cx231xx/cx231xx-417.c
@@ -942,13 +942,13 @@ static int cx231xx_load_firmware(struct cx231xx *dev)
 
 	p_current_fw = vmalloc(1884180 * 4);
 	p_fw = p_current_fw;
-	if (p_current_fw == 0) {
+	if (p_current_fw == NULL) {
 		dprintk(2, "FAIL!!!\n");
 		return -1;
 	}
 
 	p_buffer = vmalloc(4096);
-	if (p_buffer == 0) {
+	if (p_buffer == NULL) {
 		dprintk(2, "FAIL!!!\n");
 		return -1;
 	}
diff --git a/drivers/media/video/cx231xx/cx231xx-cards.c b/drivers/media/video/cx231xx/cx231xx-cards.c
index 588f3e8..5b9b5f4 100644
--- a/drivers/media/video/cx231xx/cx231xx-cards.c
+++ b/drivers/media/video/cx231xx/cx231xx-cards.c
@@ -357,19 +357,19 @@ struct cx231xx_board cx231xx_boards[] = {
 			.type = CX231XX_VMUX_TELEVISION,
 			.vmux = CX231XX_VIN_3_1,
 			.amux = CX231XX_AMUX_VIDEO,
-			.gpio = 0,
+			.gpio = NULL,
 		}, {
 			.type = CX231XX_VMUX_COMPOSITE1,
 			.vmux = CX231XX_VIN_2_1,
 			.amux = CX231XX_AMUX_LINE_IN,
-			.gpio = 0,
+			.gpio = NULL,
 		}, {
 			.type = CX231XX_VMUX_SVIDEO,
 			.vmux = CX231XX_VIN_1_1 |
 				(CX231XX_VIN_1_2 << 8) |
 				CX25840_SVIDEO_ON,
 			.amux = CX231XX_AMUX_LINE_IN,
-			.gpio = 0,
+			.gpio = NULL,
 		} },
 	},
 	[CX231XX_BOARD_HAUPPAUGE_USBLIVE2] = {
@@ -386,14 +386,14 @@ struct cx231xx_board cx231xx_boards[] = {
 			.type = CX231XX_VMUX_COMPOSITE1,
 			.vmux = CX231XX_VIN_2_1,
 			.amux = CX231XX_AMUX_LINE_IN,
-			.gpio = 0,
+			.gpio = NULL,
 		}, {
 			.type = CX231XX_VMUX_SVIDEO,
 			.vmux = CX231XX_VIN_1_1 |
 				(CX231XX_VIN_1_2 << 8) |
 				CX25840_SVIDEO_ON,
 			.amux = CX231XX_AMUX_LINE_IN,
-			.gpio = 0,
+			.gpio = NULL,
 		} },
 	},
 	[CX231XX_BOARD_PV_PLAYTV_USB_HYBRID] = {
@@ -420,19 +420,19 @@ struct cx231xx_board cx231xx_boards[] = {
 			.type = CX231XX_VMUX_TELEVISION,
 			.vmux = CX231XX_VIN_3_1,
 			.amux = CX231XX_AMUX_VIDEO,
-			.gpio = 0,
+			.gpio = NULL,
 		}, {
 			.type = CX231XX_VMUX_COMPOSITE1,
 			.vmux = CX231XX_VIN_2_1,
 			.amux = CX231XX_AMUX_LINE_IN,
-			.gpio = 0,
+			.gpio = NULL,
 		}, {
 			.type = CX231XX_VMUX_SVIDEO,
 			.vmux = CX231XX_VIN_1_1 |
 				(CX231XX_VIN_1_2 << 8) |
 				CX25840_SVIDEO_ON,
 			.amux = CX231XX_AMUX_LINE_IN,
-			.gpio = 0,
+			.gpio = NULL,
 		} },
 	},
 };
-- 
1.7.2.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] video/cx231xx:  Fix sparse warning: Using plain integer as NULL pointer
@ 2011-01-25 20:38 ` Peter Huewe
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Huewe @ 2011-01-25 20:38 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Sri Deevi, Devin Heitmueller, Stephen Rothwell, linux-media,
	linux-kernel, kernel-janitors, Peter Huewe

This patch fixes the warning "Using plain integer as NULL pointer",
generated by sparse, by replacing the offending 0s with NULL.

KernelVersion: linus' tree-c723fdab

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
---
 drivers/media/video/cx231xx/cx231xx-417.c   |    4 ++--
 drivers/media/video/cx231xx/cx231xx-cards.c |   16 ++++++++--------
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/media/video/cx231xx/cx231xx-417.c b/drivers/media/video/cx231xx/cx231xx-417.c
index fc9526a..f8f0e59 100644
--- a/drivers/media/video/cx231xx/cx231xx-417.c
+++ b/drivers/media/video/cx231xx/cx231xx-417.c
@@ -942,13 +942,13 @@ static int cx231xx_load_firmware(struct cx231xx *dev)
 
 	p_current_fw = vmalloc(1884180 * 4);
 	p_fw = p_current_fw;
-	if (p_current_fw = 0) {
+	if (p_current_fw = NULL) {
 		dprintk(2, "FAIL!!!\n");
 		return -1;
 	}
 
 	p_buffer = vmalloc(4096);
-	if (p_buffer = 0) {
+	if (p_buffer = NULL) {
 		dprintk(2, "FAIL!!!\n");
 		return -1;
 	}
diff --git a/drivers/media/video/cx231xx/cx231xx-cards.c b/drivers/media/video/cx231xx/cx231xx-cards.c
index 588f3e8..5b9b5f4 100644
--- a/drivers/media/video/cx231xx/cx231xx-cards.c
+++ b/drivers/media/video/cx231xx/cx231xx-cards.c
@@ -357,19 +357,19 @@ struct cx231xx_board cx231xx_boards[] = {
 			.type = CX231XX_VMUX_TELEVISION,
 			.vmux = CX231XX_VIN_3_1,
 			.amux = CX231XX_AMUX_VIDEO,
-			.gpio = 0,
+			.gpio = NULL,
 		}, {
 			.type = CX231XX_VMUX_COMPOSITE1,
 			.vmux = CX231XX_VIN_2_1,
 			.amux = CX231XX_AMUX_LINE_IN,
-			.gpio = 0,
+			.gpio = NULL,
 		}, {
 			.type = CX231XX_VMUX_SVIDEO,
 			.vmux = CX231XX_VIN_1_1 |
 				(CX231XX_VIN_1_2 << 8) |
 				CX25840_SVIDEO_ON,
 			.amux = CX231XX_AMUX_LINE_IN,
-			.gpio = 0,
+			.gpio = NULL,
 		} },
 	},
 	[CX231XX_BOARD_HAUPPAUGE_USBLIVE2] = {
@@ -386,14 +386,14 @@ struct cx231xx_board cx231xx_boards[] = {
 			.type = CX231XX_VMUX_COMPOSITE1,
 			.vmux = CX231XX_VIN_2_1,
 			.amux = CX231XX_AMUX_LINE_IN,
-			.gpio = 0,
+			.gpio = NULL,
 		}, {
 			.type = CX231XX_VMUX_SVIDEO,
 			.vmux = CX231XX_VIN_1_1 |
 				(CX231XX_VIN_1_2 << 8) |
 				CX25840_SVIDEO_ON,
 			.amux = CX231XX_AMUX_LINE_IN,
-			.gpio = 0,
+			.gpio = NULL,
 		} },
 	},
 	[CX231XX_BOARD_PV_PLAYTV_USB_HYBRID] = {
@@ -420,19 +420,19 @@ struct cx231xx_board cx231xx_boards[] = {
 			.type = CX231XX_VMUX_TELEVISION,
 			.vmux = CX231XX_VIN_3_1,
 			.amux = CX231XX_AMUX_VIDEO,
-			.gpio = 0,
+			.gpio = NULL,
 		}, {
 			.type = CX231XX_VMUX_COMPOSITE1,
 			.vmux = CX231XX_VIN_2_1,
 			.amux = CX231XX_AMUX_LINE_IN,
-			.gpio = 0,
+			.gpio = NULL,
 		}, {
 			.type = CX231XX_VMUX_SVIDEO,
 			.vmux = CX231XX_VIN_1_1 |
 				(CX231XX_VIN_1_2 << 8) |
 				CX25840_SVIDEO_ON,
 			.amux = CX231XX_AMUX_LINE_IN,
-			.gpio = 0,
+			.gpio = NULL,
 		} },
 	},
 };
-- 
1.7.2.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] video/cx231xx:  Fix sparse warning: Using plain integer as NULL pointer
  2011-01-25 20:38 ` Peter Huewe
@ 2011-01-25 21:23   ` Devin Heitmueller
  -1 siblings, 0 replies; 6+ messages in thread
From: Devin Heitmueller @ 2011-01-25 21:23 UTC (permalink / raw)
  To: Peter Huewe
  Cc: Mauro Carvalho Chehab, Sri Deevi, Stephen Rothwell, linux-media,
	linux-kernel, kernel-janitors

On 01/25/2011 03:38 PM, Peter Huewe wrote:
>
> This patch fixes the warning "Using plain integer as NULL pointer",
> generated by sparse, by replacing the offending 0s with NULL.
>
> KernelVersion: linus' tree-c723fdab
>
> Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
> ---
>  drivers/media/video/cx231xx/cx231xx-417.c   |    4 ++--
>  drivers/media/video/cx231xx/cx231xx-cards.c |   16 ++++++++--------
>  2 files changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/media/video/cx231xx/cx231xx-417.c 
> b/drivers/media/video/cx231xx/cx231xx-417.c
> index fc9526a..f8f0e59 100644
> --- a/drivers/media/video/cx231xx/cx231xx-417.c
> +++ b/drivers/media/video/cx231xx/cx231xx-417.c
> @@ -942,13 +942,13 @@ static int cx231xx_load_firmware(struct cx231xx 
> *dev)
>
>         p_current_fw = vmalloc(1884180 * 4);
>         p_fw = p_current_fw;
> -       if (p_current_fw == 0) {
> +       if (p_current_fw == NULL) {
>                 dprintk(2, "FAIL!!!\n");
>                 return -1;
>         }
>
>         p_buffer = vmalloc(4096);
> -       if (p_buffer == 0) {
> +       if (p_buffer == NULL) {
>                 dprintk(2, "FAIL!!!\n");
>                 return -1;
>         }
> diff --git a/drivers/media/video/cx231xx/cx231xx-cards.c 
> b/drivers/media/video/cx231xx/cx231xx-cards.c
> index 588f3e8..5b9b5f4 100644
> --- a/drivers/media/video/cx231xx/cx231xx-cards.c
> +++ b/drivers/media/video/cx231xx/cx231xx-cards.c
> @@ -357,19 +357,19 @@ struct cx231xx_board cx231xx_boards[] = {
>                         .type = CX231XX_VMUX_TELEVISION,
>                         .vmux = CX231XX_VIN_3_1,
>                         .amux = CX231XX_AMUX_VIDEO,
> -                       .gpio = 0,
> +                       .gpio = NULL,
>                 }, {
>                         .type = CX231XX_VMUX_COMPOSITE1,
>                         .vmux = CX231XX_VIN_2_1,
>                         .amux = CX231XX_AMUX_LINE_IN,
> -                       .gpio = 0,
> +                       .gpio = NULL,
>                 }, {
>                         .type = CX231XX_VMUX_SVIDEO,
>                         .vmux = CX231XX_VIN_1_1 |
>                                 (CX231XX_VIN_1_2 << 8) |
>                                 CX25840_SVIDEO_ON,
>                         .amux = CX231XX_AMUX_LINE_IN,
> -                       .gpio = 0,
> +                       .gpio = NULL,
>                 } },
>         },
>         [CX231XX_BOARD_HAUPPAUGE_USBLIVE2] = {
> @@ -386,14 +386,14 @@ struct cx231xx_board cx231xx_boards[] = {
>                         .type = CX231XX_VMUX_COMPOSITE1,
>                         .vmux = CX231XX_VIN_2_1,
>                         .amux = CX231XX_AMUX_LINE_IN,
> -                       .gpio = 0,
> +                       .gpio = NULL,
>                 }, {
>                         .type = CX231XX_VMUX_SVIDEO,
>                         .vmux = CX231XX_VIN_1_1 |
>                                 (CX231XX_VIN_1_2 << 8) |
>                                 CX25840_SVIDEO_ON,
>                         .amux = CX231XX_AMUX_LINE_IN,
> -                       .gpio = 0,
> +                       .gpio = NULL,
>                 } },
>         },
>         [CX231XX_BOARD_PV_PLAYTV_USB_HYBRID] = {
> @@ -420,19 +420,19 @@ struct cx231xx_board cx231xx_boards[] = {
>                         .type = CX231XX_VMUX_TELEVISION,
>                         .vmux = CX231XX_VIN_3_1,
>                         .amux = CX231XX_AMUX_VIDEO,
> -                       .gpio = 0,
> +                       .gpio = NULL,
>                 }, {
>                         .type = CX231XX_VMUX_COMPOSITE1,
>                         .vmux = CX231XX_VIN_2_1,
>                         .amux = CX231XX_AMUX_LINE_IN,
> -                       .gpio = 0,
> +                       .gpio = NULL,
>                 }, {
>                         .type = CX231XX_VMUX_SVIDEO,
>                         .vmux = CX231XX_VIN_1_1 |
>                                 (CX231XX_VIN_1_2 << 8) |
>                                 CX25840_SVIDEO_ON,
>                         .amux = CX231XX_AMUX_LINE_IN,
> -                       .gpio = 0,
> +                       .gpio = NULL,
>                 } },
>         },
>  };
> -- 
> 1.7.2.2
>
Reviewed-by: Devin Heitmueller <dheitmueller@hauppauge.com>

-- 
Devin Heitmueller
Senior Software Engineer
Hauppauge Computer Works


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] video/cx231xx:  Fix sparse warning: Using plain integer as NULL pointer
@ 2011-01-25 21:23   ` Devin Heitmueller
  0 siblings, 0 replies; 6+ messages in thread
From: Devin Heitmueller @ 2011-01-25 21:23 UTC (permalink / raw)
  To: Peter Huewe
  Cc: Mauro Carvalho Chehab, Sri Deevi, Stephen Rothwell, linux-media,
	linux-kernel, kernel-janitors

On 01/25/2011 03:38 PM, Peter Huewe wrote:
>
> This patch fixes the warning "Using plain integer as NULL pointer",
> generated by sparse, by replacing the offending 0s with NULL.
>
> KernelVersion: linus' tree-c723fdab
>
> Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
> ---
>  drivers/media/video/cx231xx/cx231xx-417.c   |    4 ++--
>  drivers/media/video/cx231xx/cx231xx-cards.c |   16 ++++++++--------
>  2 files changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/media/video/cx231xx/cx231xx-417.c 
> b/drivers/media/video/cx231xx/cx231xx-417.c
> index fc9526a..f8f0e59 100644
> --- a/drivers/media/video/cx231xx/cx231xx-417.c
> +++ b/drivers/media/video/cx231xx/cx231xx-417.c
> @@ -942,13 +942,13 @@ static int cx231xx_load_firmware(struct cx231xx 
> *dev)
>
>         p_current_fw = vmalloc(1884180 * 4);
>         p_fw = p_current_fw;
> -       if (p_current_fw = 0) {
> +       if (p_current_fw = NULL) {
>                 dprintk(2, "FAIL!!!\n");
>                 return -1;
>         }
>
>         p_buffer = vmalloc(4096);
> -       if (p_buffer = 0) {
> +       if (p_buffer = NULL) {
>                 dprintk(2, "FAIL!!!\n");
>                 return -1;
>         }
> diff --git a/drivers/media/video/cx231xx/cx231xx-cards.c 
> b/drivers/media/video/cx231xx/cx231xx-cards.c
> index 588f3e8..5b9b5f4 100644
> --- a/drivers/media/video/cx231xx/cx231xx-cards.c
> +++ b/drivers/media/video/cx231xx/cx231xx-cards.c
> @@ -357,19 +357,19 @@ struct cx231xx_board cx231xx_boards[] = {
>                         .type = CX231XX_VMUX_TELEVISION,
>                         .vmux = CX231XX_VIN_3_1,
>                         .amux = CX231XX_AMUX_VIDEO,
> -                       .gpio = 0,
> +                       .gpio = NULL,
>                 }, {
>                         .type = CX231XX_VMUX_COMPOSITE1,
>                         .vmux = CX231XX_VIN_2_1,
>                         .amux = CX231XX_AMUX_LINE_IN,
> -                       .gpio = 0,
> +                       .gpio = NULL,
>                 }, {
>                         .type = CX231XX_VMUX_SVIDEO,
>                         .vmux = CX231XX_VIN_1_1 |
>                                 (CX231XX_VIN_1_2 << 8) |
>                                 CX25840_SVIDEO_ON,
>                         .amux = CX231XX_AMUX_LINE_IN,
> -                       .gpio = 0,
> +                       .gpio = NULL,
>                 } },
>         },
>         [CX231XX_BOARD_HAUPPAUGE_USBLIVE2] = {
> @@ -386,14 +386,14 @@ struct cx231xx_board cx231xx_boards[] = {
>                         .type = CX231XX_VMUX_COMPOSITE1,
>                         .vmux = CX231XX_VIN_2_1,
>                         .amux = CX231XX_AMUX_LINE_IN,
> -                       .gpio = 0,
> +                       .gpio = NULL,
>                 }, {
>                         .type = CX231XX_VMUX_SVIDEO,
>                         .vmux = CX231XX_VIN_1_1 |
>                                 (CX231XX_VIN_1_2 << 8) |
>                                 CX25840_SVIDEO_ON,
>                         .amux = CX231XX_AMUX_LINE_IN,
> -                       .gpio = 0,
> +                       .gpio = NULL,
>                 } },
>         },
>         [CX231XX_BOARD_PV_PLAYTV_USB_HYBRID] = {
> @@ -420,19 +420,19 @@ struct cx231xx_board cx231xx_boards[] = {
>                         .type = CX231XX_VMUX_TELEVISION,
>                         .vmux = CX231XX_VIN_3_1,
>                         .amux = CX231XX_AMUX_VIDEO,
> -                       .gpio = 0,
> +                       .gpio = NULL,
>                 }, {
>                         .type = CX231XX_VMUX_COMPOSITE1,
>                         .vmux = CX231XX_VIN_2_1,
>                         .amux = CX231XX_AMUX_LINE_IN,
> -                       .gpio = 0,
> +                       .gpio = NULL,
>                 }, {
>                         .type = CX231XX_VMUX_SVIDEO,
>                         .vmux = CX231XX_VIN_1_1 |
>                                 (CX231XX_VIN_1_2 << 8) |
>                                 CX25840_SVIDEO_ON,
>                         .amux = CX231XX_AMUX_LINE_IN,
> -                       .gpio = 0,
> +                       .gpio = NULL,
>                 } },
>         },
>  };
> -- 
> 1.7.2.2
>
Reviewed-by: Devin Heitmueller <dheitmueller@hauppauge.com>

-- 
Devin Heitmueller
Senior Software Engineer
Hauppauge Computer Works


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH] video/cx231xx:  Fix sparse warning: Using plain integer as NULL pointer
  2011-01-25 20:38 ` Peter Huewe
@ 2011-01-25 21:38   ` Sri Deevi
  -1 siblings, 0 replies; 6+ messages in thread
From: Sri Deevi @ 2011-01-25 21:38 UTC (permalink / raw)
  To: 'Peter Huewe', Mauro Carvalho Chehab
  Cc: Devin Heitmueller, Stephen Rothwell, linux-media, linux-kernel,
	kernel-janitors

Reviewed by Srinivasa Deevi <Srinivasa.deevi@conexant.com>

-----Original Message-----
From: Peter Huewe [mailto:peterhuewe@gmx.de] 
Sent: Tuesday, January 25, 2011 12:39 PM
To: Mauro Carvalho Chehab
Cc: Sri Deevi; Devin Heitmueller; Stephen Rothwell; linux-media@vger.kernel.org; linux-kernel@vger.kernel.org; kernel-janitors@vger.kernel.org; Peter Huewe
Subject: [PATCH] video/cx231xx: Fix sparse warning: Using plain integer as NULL pointer

This patch fixes the warning "Using plain integer as NULL pointer",
generated by sparse, by replacing the offending 0s with NULL.

KernelVersion: linus' tree-c723fdab

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
---
 drivers/media/video/cx231xx/cx231xx-417.c   |    4 ++--
 drivers/media/video/cx231xx/cx231xx-cards.c |   16 ++++++++--------
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/media/video/cx231xx/cx231xx-417.c b/drivers/media/video/cx231xx/cx231xx-417.c
index fc9526a..f8f0e59 100644
--- a/drivers/media/video/cx231xx/cx231xx-417.c
+++ b/drivers/media/video/cx231xx/cx231xx-417.c
@@ -942,13 +942,13 @@ static int cx231xx_load_firmware(struct cx231xx *dev)
 
 	p_current_fw = vmalloc(1884180 * 4);
 	p_fw = p_current_fw;
-	if (p_current_fw == 0) {
+	if (p_current_fw == NULL) {
 		dprintk(2, "FAIL!!!\n");
 		return -1;
 	}
 
 	p_buffer = vmalloc(4096);
-	if (p_buffer == 0) {
+	if (p_buffer == NULL) {
 		dprintk(2, "FAIL!!!\n");
 		return -1;
 	}
diff --git a/drivers/media/video/cx231xx/cx231xx-cards.c b/drivers/media/video/cx231xx/cx231xx-cards.c
index 588f3e8..5b9b5f4 100644
--- a/drivers/media/video/cx231xx/cx231xx-cards.c
+++ b/drivers/media/video/cx231xx/cx231xx-cards.c
@@ -357,19 +357,19 @@ struct cx231xx_board cx231xx_boards[] = {
 			.type = CX231XX_VMUX_TELEVISION,
 			.vmux = CX231XX_VIN_3_1,
 			.amux = CX231XX_AMUX_VIDEO,
-			.gpio = 0,
+			.gpio = NULL,
 		}, {
 			.type = CX231XX_VMUX_COMPOSITE1,
 			.vmux = CX231XX_VIN_2_1,
 			.amux = CX231XX_AMUX_LINE_IN,
-			.gpio = 0,
+			.gpio = NULL,
 		}, {
 			.type = CX231XX_VMUX_SVIDEO,
 			.vmux = CX231XX_VIN_1_1 |
 				(CX231XX_VIN_1_2 << 8) |
 				CX25840_SVIDEO_ON,
 			.amux = CX231XX_AMUX_LINE_IN,
-			.gpio = 0,
+			.gpio = NULL,
 		} },
 	},
 	[CX231XX_BOARD_HAUPPAUGE_USBLIVE2] = {
@@ -386,14 +386,14 @@ struct cx231xx_board cx231xx_boards[] = {
 			.type = CX231XX_VMUX_COMPOSITE1,
 			.vmux = CX231XX_VIN_2_1,
 			.amux = CX231XX_AMUX_LINE_IN,
-			.gpio = 0,
+			.gpio = NULL,
 		}, {
 			.type = CX231XX_VMUX_SVIDEO,
 			.vmux = CX231XX_VIN_1_1 |
 				(CX231XX_VIN_1_2 << 8) |
 				CX25840_SVIDEO_ON,
 			.amux = CX231XX_AMUX_LINE_IN,
-			.gpio = 0,
+			.gpio = NULL,
 		} },
 	},
 	[CX231XX_BOARD_PV_PLAYTV_USB_HYBRID] = {
@@ -420,19 +420,19 @@ struct cx231xx_board cx231xx_boards[] = {
 			.type = CX231XX_VMUX_TELEVISION,
 			.vmux = CX231XX_VIN_3_1,
 			.amux = CX231XX_AMUX_VIDEO,
-			.gpio = 0,
+			.gpio = NULL,
 		}, {
 			.type = CX231XX_VMUX_COMPOSITE1,
 			.vmux = CX231XX_VIN_2_1,
 			.amux = CX231XX_AMUX_LINE_IN,
-			.gpio = 0,
+			.gpio = NULL,
 		}, {
 			.type = CX231XX_VMUX_SVIDEO,
 			.vmux = CX231XX_VIN_1_1 |
 				(CX231XX_VIN_1_2 << 8) |
 				CX25840_SVIDEO_ON,
 			.amux = CX231XX_AMUX_LINE_IN,
-			.gpio = 0,
+			.gpio = NULL,
 		} },
 	},
 };
-- 
1.7.2.2


Conexant E-mail Firewall (Conexant.Com) made the following annotations
---------------------------------------------------------------------
********************** Legal Disclaimer **************************** 

"This email may contain confidential and privileged material for the sole use of the intended recipient. Any unauthorized review, use or distribution by others is strictly prohibited. If you have received the message in error, please advise the sender by reply email and delete the message. Thank you." 

********************************************************************** 

---------------------------------------------------------------------


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* RE: [PATCH] video/cx231xx:  Fix sparse warning: Using plain integer as NULL pointer
@ 2011-01-25 21:38   ` Sri Deevi
  0 siblings, 0 replies; 6+ messages in thread
From: Sri Deevi @ 2011-01-25 21:38 UTC (permalink / raw)
  To: 'Peter Huewe', Mauro Carvalho Chehab
  Cc: Devin Heitmueller, Stephen Rothwell, linux-media, linux-kernel,
	kernel-janitors

Reviewed by Srinivasa Deevi <Srinivasa.deevi@conexant.com>

-----Original Message-----
From: Peter Huewe [mailto:peterhuewe@gmx.de] 
Sent: Tuesday, January 25, 2011 12:39 PM
To: Mauro Carvalho Chehab
Cc: Sri Deevi; Devin Heitmueller; Stephen Rothwell; linux-media@vger.kernel.org; linux-kernel@vger.kernel.org; kernel-janitors@vger.kernel.org; Peter Huewe
Subject: [PATCH] video/cx231xx: Fix sparse warning: Using plain integer as NULL pointer

This patch fixes the warning "Using plain integer as NULL pointer",
generated by sparse, by replacing the offending 0s with NULL.

KernelVersion: linus' tree-c723fdab

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
---
 drivers/media/video/cx231xx/cx231xx-417.c   |    4 ++--
 drivers/media/video/cx231xx/cx231xx-cards.c |   16 ++++++++--------
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/media/video/cx231xx/cx231xx-417.c b/drivers/media/video/cx231xx/cx231xx-417.c
index fc9526a..f8f0e59 100644
--- a/drivers/media/video/cx231xx/cx231xx-417.c
+++ b/drivers/media/video/cx231xx/cx231xx-417.c
@@ -942,13 +942,13 @@ static int cx231xx_load_firmware(struct cx231xx *dev)
 
 	p_current_fw = vmalloc(1884180 * 4);
 	p_fw = p_current_fw;
-	if (p_current_fw = 0) {
+	if (p_current_fw = NULL) {
 		dprintk(2, "FAIL!!!\n");
 		return -1;
 	}
 
 	p_buffer = vmalloc(4096);
-	if (p_buffer = 0) {
+	if (p_buffer = NULL) {
 		dprintk(2, "FAIL!!!\n");
 		return -1;
 	}
diff --git a/drivers/media/video/cx231xx/cx231xx-cards.c b/drivers/media/video/cx231xx/cx231xx-cards.c
index 588f3e8..5b9b5f4 100644
--- a/drivers/media/video/cx231xx/cx231xx-cards.c
+++ b/drivers/media/video/cx231xx/cx231xx-cards.c
@@ -357,19 +357,19 @@ struct cx231xx_board cx231xx_boards[] = {
 			.type = CX231XX_VMUX_TELEVISION,
 			.vmux = CX231XX_VIN_3_1,
 			.amux = CX231XX_AMUX_VIDEO,
-			.gpio = 0,
+			.gpio = NULL,
 		}, {
 			.type = CX231XX_VMUX_COMPOSITE1,
 			.vmux = CX231XX_VIN_2_1,
 			.amux = CX231XX_AMUX_LINE_IN,
-			.gpio = 0,
+			.gpio = NULL,
 		}, {
 			.type = CX231XX_VMUX_SVIDEO,
 			.vmux = CX231XX_VIN_1_1 |
 				(CX231XX_VIN_1_2 << 8) |
 				CX25840_SVIDEO_ON,
 			.amux = CX231XX_AMUX_LINE_IN,
-			.gpio = 0,
+			.gpio = NULL,
 		} },
 	},
 	[CX231XX_BOARD_HAUPPAUGE_USBLIVE2] = {
@@ -386,14 +386,14 @@ struct cx231xx_board cx231xx_boards[] = {
 			.type = CX231XX_VMUX_COMPOSITE1,
 			.vmux = CX231XX_VIN_2_1,
 			.amux = CX231XX_AMUX_LINE_IN,
-			.gpio = 0,
+			.gpio = NULL,
 		}, {
 			.type = CX231XX_VMUX_SVIDEO,
 			.vmux = CX231XX_VIN_1_1 |
 				(CX231XX_VIN_1_2 << 8) |
 				CX25840_SVIDEO_ON,
 			.amux = CX231XX_AMUX_LINE_IN,
-			.gpio = 0,
+			.gpio = NULL,
 		} },
 	},
 	[CX231XX_BOARD_PV_PLAYTV_USB_HYBRID] = {
@@ -420,19 +420,19 @@ struct cx231xx_board cx231xx_boards[] = {
 			.type = CX231XX_VMUX_TELEVISION,
 			.vmux = CX231XX_VIN_3_1,
 			.amux = CX231XX_AMUX_VIDEO,
-			.gpio = 0,
+			.gpio = NULL,
 		}, {
 			.type = CX231XX_VMUX_COMPOSITE1,
 			.vmux = CX231XX_VIN_2_1,
 			.amux = CX231XX_AMUX_LINE_IN,
-			.gpio = 0,
+			.gpio = NULL,
 		}, {
 			.type = CX231XX_VMUX_SVIDEO,
 			.vmux = CX231XX_VIN_1_1 |
 				(CX231XX_VIN_1_2 << 8) |
 				CX25840_SVIDEO_ON,
 			.amux = CX231XX_AMUX_LINE_IN,
-			.gpio = 0,
+			.gpio = NULL,
 		} },
 	},
 };
-- 
1.7.2.2


Conexant E-mail Firewall (Conexant.Com) made the following annotations
---------------------------------------------------------------------
********************** Legal Disclaimer **************************** 

"This email may contain confidential and privileged material for the sole use of the intended recipient. Any unauthorized review, use or distribution by others is strictly prohibited. If you have received the message in error, please advise the sender by reply email and delete the message. Thank you." 

********************************************************************** 

---------------------------------------------------------------------


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-01-25 22:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-25 20:38 [PATCH] video/cx231xx: Fix sparse warning: Using plain integer as NULL pointer Peter Huewe
2011-01-25 20:38 ` Peter Huewe
2011-01-25 21:23 ` Devin Heitmueller
2011-01-25 21:23   ` Devin Heitmueller
2011-01-25 21:38 ` Sri Deevi
2011-01-25 21:38   ` Sri Deevi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.