netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Sabrina Dubroca <sd@queasysnail.net>
Cc: David Miller <davem@davemloft.net>,
	netdev@vger.kernel.org, Willem de Bruijn <willemb@google.com>
Subject: Re: [PATCH v2 5/5] net/core: Allow the compiler to verify declaration and definition consistency
Date: Tue, 26 Mar 2019 10:11:34 -0700	[thread overview]
Message-ID: <1553620294.118779.64.camel@acm.org> (raw)
In-Reply-To: <20190325182642.GA14636@bistromath.localdomain>

On Mon, 2019-03-25 at 19:26 +0100, Sabrina Dubroca wrote:
> 2019-03-25, 09:17:23 -0700, Bart Van Assche wrote:
> > diff --git a/net/core/datagram.h b/net/core/datagram.h
> > new file mode 100644
> > index 000000000000..bcfb75bfa3b2
> > --- /dev/null
> > +++ b/net/core/datagram.h
> > @@ -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_ */
> 
> That's rather ugly. Could it just be moved to an appropriate file in
> include/?

Hi Sabrina,

I think the convention in the Linux kernel is to keep header files with local
declarations in the source code directory and only to declare functions that
are used by other kernel components under include/. Do you think that the
function __zerocopy_sg_from_iter() will be needed by other kernel components?

Thanks,

Bart.

  reply	other threads:[~2019-03-26 17:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-25 16:17 [PATCH v2 0/5] Fix net/core W=1 warnings Bart Van Assche
2019-03-25 16:17 ` [PATCH v2 1/5] net/core: Document reuseport_add_sock() bind_inany argument Bart Van Assche
2019-03-25 16:17 ` [PATCH v2 2/5] net/core: Document all dev_ioctl() arguments Bart Van Assche
2019-03-25 16:17 ` [PATCH v2 3/5] net/core: Document __skb_flow_dissect() flags argument Bart Van Assche
2019-03-25 16:17 ` [PATCH v2 4/5] net/core: Fix rtnetlink kernel-doc headers Bart Van Assche
2019-03-25 16:17 ` [PATCH v2 5/5] net/core: Allow the compiler to verify declaration and definition consistency Bart Van Assche
2019-03-25 18:26   ` Sabrina Dubroca
2019-03-26 17:11     ` Bart Van Assche [this message]
2019-03-26 23:50       ` Sabrina Dubroca
2019-03-26 18:17     ` Al Viro
2019-03-27  0:03       ` Sabrina Dubroca

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1553620294.118779.64.camel@acm.org \
    --to=bvanassche@acm.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=sd@queasysnail.net \
    --cc=willemb@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).