All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: move ‘__zerocopy_sg_from_iter’ prototype to header file <linux/skbuff.h>
@ 2018-10-31 11:34 Mathieu Malaterre
  2018-11-03  6:33 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Mathieu Malaterre @ 2018-10-31 11:34 UTC (permalink / raw)
  To: davem; +Cc: Mathieu Malaterre, linux-kernel, netdev

This makes it clear the function is part of the API. Also this will
remove a warning triggered at W=1:

  net/core/datagram.c:581:5: warning: no previous prototype for ‘__zerocopy_sg_from_iter’ [-Wmissing-prototypes]

Signed-off-by: Mathieu Malaterre <malat@debian.org>
---
 include/linux/skbuff.h | 2 ++
 net/core/skbuff.c      | 3 ---
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 0ba687454267..cca7c0a3c176 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -3311,6 +3311,8 @@ int skb_copy_and_csum_datagram_msg(struct sk_buff *skb, int hlen,
 				   struct msghdr *msg);
 int skb_copy_datagram_from_iter(struct sk_buff *skb, int offset,
 				 struct iov_iter *from, int len);
+int __zerocopy_sg_from_iter(struct sock *sk, struct sk_buff *skb,
+			    struct iov_iter *from, size_t length);
 int zerocopy_sg_from_iter(struct sk_buff *skb, struct iov_iter *frm);
 void skb_free_datagram(struct sock *sk, struct sk_buff *skb);
 void __skb_free_datagram_locked(struct sock *sk, struct sk_buff *skb, int len);
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 946de0e24c87..7eb7e0e104d4 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -1102,9 +1102,6 @@ void sock_zerocopy_put_abort(struct ubuf_info *uarg)
 }
 EXPORT_SYMBOL_GPL(sock_zerocopy_put_abort);
 
-extern int __zerocopy_sg_from_iter(struct sock *sk, struct sk_buff *skb,
-				   struct iov_iter *from, size_t length);
-
 int skb_zerocopy_iter_stream(struct sock *sk, struct sk_buff *skb,
 			     struct msghdr *msg, int len,
 			     struct ubuf_info *uarg)
-- 
2.11.0


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

* Re: [PATCH] net: move ‘__zerocopy_sg_from_iter’ prototype to header file <linux/skbuff.h>
  2018-10-31 11:34 [PATCH] net: move ‘__zerocopy_sg_from_iter’ prototype to header file <linux/skbuff.h> Mathieu Malaterre
@ 2018-11-03  6:33 ` David Miller
  2018-11-05 20:20   ` Mathieu Malaterre
  0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2018-11-03  6:33 UTC (permalink / raw)
  To: malat; +Cc: linux-kernel, netdev

From: Mathieu Malaterre <malat@debian.org>
Date: Wed, 31 Oct 2018 12:34:59 +0100

> This makes it clear the function is part of the API. Also this will
> remove a warning triggered at W=1:
> 
>   net/core/datagram.c:581:5: warning: no previous prototype for ‘__zerocopy_sg_from_iter’ [-Wmissing-prototypes]
> 
> Signed-off-by: Mathieu Malaterre <malat@debian.org>

It's not part of the "API", and it shouldn't even be exported to
modules.

Only net/core/skbuff.c calls it, and that is never modular.

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

* Re: [PATCH] net: move ‘__zerocopy_sg_from_iter’ prototype to header file <linux/skbuff.h>
  2018-11-03  6:33 ` David Miller
@ 2018-11-05 20:20   ` Mathieu Malaterre
  0 siblings, 0 replies; 3+ messages in thread
From: Mathieu Malaterre @ 2018-11-05 20:20 UTC (permalink / raw)
  To: David S. Miller; +Cc: LKML, netdev

On Sat, Nov 3, 2018 at 7:34 AM David Miller <davem@davemloft.net> wrote:
>
> From: Mathieu Malaterre <malat@debian.org>
> Date: Wed, 31 Oct 2018 12:34:59 +0100
>
> > This makes it clear the function is part of the API. Also this will
> > remove a warning triggered at W=1:
> >
> >   net/core/datagram.c:581:5: warning: no previous prototype for ‘__zerocopy_sg_from_iter’ [-Wmissing-prototypes]
> >
> > Signed-off-by: Mathieu Malaterre <malat@debian.org>
>
> It's not part of the "API", and it shouldn't even be exported to
> modules.
>
> Only net/core/skbuff.c calls it, and that is never modular.

OK. I got confused with the EXPORT_SYMBOL(). I'll re-send moving
__zerocopy_sg_from_iter to skbuff.c.

Thanks

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

end of thread, other threads:[~2018-11-05 20:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-31 11:34 [PATCH] net: move ‘__zerocopy_sg_from_iter’ prototype to header file <linux/skbuff.h> Mathieu Malaterre
2018-11-03  6:33 ` David Miller
2018-11-05 20:20   ` Mathieu Malaterre

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.