Skip to contentSkip to conversation

staging: most: Use NULL instead of 0 in assignment of pointer

PATCH In review Anders Fridlund 3 participants 5 messages Aug 29, 2015 – Sep 22, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: most: Use NULL instead of 0 in assignment of pointer

Fix sparse warning 'Using plain integer as NULL pointer' by replacing 0 with NULL in the assignment.

---
 drivers/staging/most/aim-network/networking.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/most/aim-network/networking.c +1 -1
index c8ab239..a1e1bce 100644
@@ -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(
Signature · 1 line
1.9.1
maintainer
#1 lore raw
Quoted 23 lines · Anders Fridlund

Fix sparse warning 'Using plain integer as NULL pointer' by replacing 0 with NULL in the assignment.

---
 drivers/staging/most/aim-network/networking.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/most/aim-network/networking.c +1 -1
index c8ab239..a1e1bce 100644
@@ -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(
Signature · 1 line
1.9.1

Why did you resend this patch again?

#2 lore raw

I resent it since no one responded to it for 10 days. From what I came to understand that is the common practice. If that is not the case I'm sorry (and please let me know so I don't do it again).

Cheers,
Anders Fridlund

Quoted 26 lines · Greg KH
Quoted 22 lines · Anders Fridlund

Fix sparse warning 'Using plain integer as NULL pointer' by replacing 0 with NULL in the assignment.

---
 drivers/staging/most/aim-network/networking.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/most/aim-network/networking.c +1 -2
index c8ab239..a1e1bce 100644
@@ -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(
--
Quoted 1 line

1.9.1

Why did you resend this patch again?

maintainer
#3 lore raw
Quoted 3 lines · Anders Fridlund

I resent it since no one responded to it for 10 days. From what I came to understand that is the common practice. If that is not the case I'm sorry (and please let me know so I don't do it again).

That's fine to do, but at least say why you are resending it in the area under the --- line, otherwise we have no idea what is going on.

thanks,

greg k-h

#4 lore raw
In reply to Anders Fridlund
Quoted 4 lines · Anders Fridlund

I resent it since no one responded to it for 10 days. From what I came to understand that is the common practice. If that is not the case I'm sorry (and please let me know so I don't do it again).

10 days is too short. Especially since the merge window was open.

regards,
dan carpenter