netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] skbuff: make skb_put_zero() return void
@ 2017-06-14 20:17 Johannes Berg
  2017-06-14 20:36 ` Joe Perches
  2017-06-15 16:18 ` David Miller
  0 siblings, 2 replies; 15+ messages in thread
From: Johannes Berg @ 2017-06-14 20:17 UTC (permalink / raw)
  To: netdev; +Cc: Johannes Berg

From: Johannes Berg <johannes.berg@intel.com>

It's nicer to return void, since then there's no need to
cast to any structures. Currently none of the users have
a cast, but a number of future conversions do.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 include/linux/skbuff.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 1151b50892d1..01ea64d0783a 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1904,9 +1904,9 @@ static inline unsigned char *__skb_put(struct sk_buff *skb, unsigned int len)
 	return tmp;
 }
 
-static inline unsigned char *skb_put_zero(struct sk_buff *skb, unsigned int len)
+static inline void *skb_put_zero(struct sk_buff *skb, unsigned int len)
 {
-	unsigned char *tmp = skb_put(skb, len);
+	void *tmp = skb_put(skb, len);
 
 	memset(tmp, 0, len);
 
-- 
2.11.0

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

end of thread, other threads:[~2017-06-15 22:55 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-14 20:17 [PATCH] skbuff: make skb_put_zero() return void Johannes Berg
2017-06-14 20:36 ` Joe Perches
2017-06-14 20:40   ` Johannes Berg
2017-06-14 21:18     ` Joe Perches
2017-06-15 22:17       ` Johannes Berg
2017-06-15 22:55         ` Joe Perches
2017-06-15 16:18 ` David Miller
2017-06-15 19:28   ` Johannes Berg
2017-06-15 21:26     ` David Miller
2017-06-15 21:28       ` Johannes Berg
2017-06-15 22:17         ` Joe Perches
2017-06-15 22:21           ` Johannes Berg
2017-06-15 22:30             ` Joe Perches
2017-06-15 22:23           ` Johannes Berg
2017-06-15 22:38             ` Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).