2015-08-19 05:47:37

by Ronit Halder

[permalink] [raw]
Subject: [PATCH] Staging: most: Use NULL instead of zero

This patch fixes the warning generated by sparse
"Using plain integer as NULL pointer" by using NULL
instead of zero.

Signed-off-by: Ronit halder <[email protected]>
---
drivers/staging/most/aim-network/networking.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/most/aim-network/networking.c b/drivers/staging/most/aim-network/networking.c
index c8ab239..a1e1bce 100644
--- a/drivers/staging/most/aim-network/networking.c
+++ b/drivers/staging/most/aim-network/networking.c
@@ -295,7 +295,7 @@ static void most_net_rm_netdev_safe(struct net_dev_context *nd)

unregister_netdev(nd->dev);
free_netdev(nd->dev);
- nd->dev = 0;
+ nd->dev = NULL;
}

static struct net_dev_context *get_net_dev_context(
--
2.4.0.GIT


2015-08-19 15:14:45

by Christian Gromm

[permalink] [raw]
Subject: Re: [PATCH] Staging: most: Use NULL instead of zero

On Wed, 19 Aug 2015 11:17:09 +0530
Ronit Halder <[email protected]> wrote:

> This patch fixes the warning generated by sparse
> "Using plain integer as NULL pointer" by using NULL
> instead of zero.
>
> Signed-off-by: Ronit halder <[email protected]>
Acked-by: Christian Gromm <[email protected]>
> ---
> drivers/staging/most/aim-network/networking.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/most/aim-network/networking.c b/drivers/staging/most/aim-network/networking.c
> index c8ab239..a1e1bce 100644
> --- a/drivers/staging/most/aim-network/networking.c
> +++ b/drivers/staging/most/aim-network/networking.c
> @@ -295,7 +295,7 @@ static void most_net_rm_netdev_safe(struct net_dev_context *nd)
>
> unregister_netdev(nd->dev);
> free_netdev(nd->dev);
> - nd->dev = 0;
> + nd->dev = NULL;
> }
>
> static struct net_dev_context *get_net_dev_context(