Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1207473 > unrolled thread

[PATCHv7 4/5] Staging: most: hdm-dim2/dim2_hal.c. Fix "Using plain integer as NULL pointer" warnings

Started byAdrian Remonda <adrianremonda@gmail.com>
First post2015-08-14 12:20 +0200
Last post2015-08-19 17:20 +0200
Articles 2 — 2 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.


Contents

  [PATCHv7 4/5] Staging: most: hdm-dim2/dim2_hal.c. Fix "Using plain integer as NULL pointer" warnings Adrian Remonda <adrianremonda@gmail.com> - 2015-08-14 12:20 +0200
    Re: [PATCHv7 4/5] Staging: most: hdm-dim2/dim2_hal.c. Fix "Using  plain integer as NULL pointer" warnings Christian Gromm <christian.gromm@microchip.com> - 2015-08-19 17:20 +0200

#1207473 — [PATCHv7 4/5] Staging: most: hdm-dim2/dim2_hal.c. Fix "Using plain integer as NULL pointer" warnings

FromAdrian Remonda <adrianremonda@gmail.com>
Date2015-08-14 12:20 +0200
Subject[PATCHv7 4/5] Staging: most: hdm-dim2/dim2_hal.c. Fix "Using plain integer as NULL pointer" warnings
Message-ID<pXkfD-7xK-21@gated-at.bofh.it>
This patch fixes the warning generated by sparse: "Using plain integer
as NULL pointer" by replacing the offending 0 with NULL.

Signed-off-by: Adrian Remonda <adrianremonda@gmail.com>
---
 drivers/staging/most/hdm-dim2/dim2_hal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/most/hdm-dim2/dim2_hal.c b/drivers/staging/most/hdm-dim2/dim2_hal.c
index 01b748944ee4..a54cf2cedac3 100644
--- a/drivers/staging/most/hdm-dim2/dim2_hal.c
+++ b/drivers/staging/most/hdm-dim2/dim2_hal.c
@@ -889,7 +889,7 @@ struct dim_ch_state_t *DIM_GetChannelState(struct dim_channel *ch,
 		struct dim_ch_state_t *state_ptr)
 {
 	if (!ch || !state_ptr)
-		return 0;
+		return NULL;
 
 	state_ptr->ready = ch->state.level < 2;
 	state_ptr->done_buffers = ch->done_sw_buffers_number;
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1209895 — Re: [PATCHv7 4/5] Staging: most: hdm-dim2/dim2_hal.c. Fix "Using plain integer as NULL pointer" warnings

FromChristian Gromm <christian.gromm@microchip.com>
Date2015-08-19 17:20 +0200
SubjectRe: [PATCHv7 4/5] Staging: most: hdm-dim2/dim2_hal.c. Fix "Using plain integer as NULL pointer" warnings
Message-ID<pZdjI-1h6-23@gated-at.bofh.it>
In reply to#1207473
On Fri, 14 Aug 2015 12:18:03 +0200
Adrian Remonda <adrianremonda@gmail.com> wrote:

> This patch fixes the warning generated by sparse: "Using plain integer
> as NULL pointer" by replacing the offending 0 with NULL.
> 
> Signed-off-by: Adrian Remonda <adrianremonda@gmail.com>
> ---
>  drivers/staging/most/hdm-dim2/dim2_hal.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/most/hdm-dim2/dim2_hal.c b/drivers/staging/most/hdm-dim2/dim2_hal.c
> index 01b748944ee4..a54cf2cedac3 100644
> --- a/drivers/staging/most/hdm-dim2/dim2_hal.c
> +++ b/drivers/staging/most/hdm-dim2/dim2_hal.c
> @@ -889,7 +889,7 @@ struct dim_ch_state_t *DIM_GetChannelState(struct dim_channel *ch,
>  		struct dim_ch_state_t *state_ptr)
>  {
>  	if (!ch || !state_ptr)
> -		return 0;
> +		return NULL;
>  
>  	state_ptr->ready = ch->state.level < 2;
>  	state_ptr->done_buffers = ch->done_sw_buffers_number;

This has already been addressed.

Regards,
Chris

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web