-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net/core: Allow the compiler to verify declaration and definition con…
…sistency Instead of declaring a function in a .c file, declare it in a header file and include that header file from the source files that define and that use the function. That allows the compiler to verify consistency of declaration and definition. See also commit 5226779 ("sock: add MSG_ZEROCOPY") # v4.14. Cc: Willem de Bruijn <willemb@google.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: David S. Miller <davem@davemloft.net>
- Loading branch information
Bart Van Assche
authored and
David S. Miller
committed
Mar 27, 2019
1 parent
a986967
commit 7b7ed88
Showing
3 changed files
with
19 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* SPDX-License-Identifier: GPL-2.0 */ | ||
|
||
#ifndef _NET_CORE_DATAGRAM_H_ | ||
#define _NET_CORE_DATAGRAM_H_ | ||
|
||
#include <linux/types.h> | ||
|
||
struct sock; | ||
struct sk_buff; | ||
struct iov_iter; | ||
|
||
int __zerocopy_sg_from_iter(struct sock *sk, struct sk_buff *skb, | ||
struct iov_iter *from, size_t length); | ||
|
||
#endif /* _NET_CORE_DATAGRAM_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters