mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Theodore Tso <tytso@MIT.EDU>
To: viresh kumar <viresh.linux@gmail.com>
Cc: Borislav Petkov <petkovbb@googlemail.com>, linux-kernel@vger.kernel.org
Subject: Re: QUERY: Inclusion of header files in kernel header files
Date: Tue, 23 Feb 2010 10:15:11 -0500	[thread overview]
Message-ID: <07BBC9AE-C1A1-449F-AE5E-EB5B1C6323C2@mit.edu> (raw)
In-Reply-To: <22dbbef21002230337i104c63dcm5d59064ca48a07f0@mail.gmail.com>


On Feb 23, 2010, at 6:37 AM, viresh kumar wrote:
> 
> Actually this issue is not present only in bus.h, but some other
> kernel header files.
> Like: arch/arm/include/asm/clkdev.h don't include list.h file but
> using struct list_head
> 
> May be we need to check this in other header files also.


Before someone goes crazy and starts sending hundreds of patches to the trivial patch folks, please make sure that you only do this for places where header file foo uses "struct bar" in bar.h --- and NOT if it is using "struct bar *".    Blind structure pointers don't cause compile failures, and is a perfectly good thing from the standpoint of data hiding.

Also, it's highly desirable that as much as possible multiple inclusion is fixed up at the same time you add extra #includes into header files.   Protecting against multiple inclusion is critical, yes, but even with the protection against multiple inclusion, the header file has to get parsed a second time, and that slows down kernel compiles.

Regards,

-- Ted


  parent reply	other threads:[~2010-02-23 15:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <22dbbef21002222241h711402f1me6b60ac7502cccd4@mail.gmail.com>
2010-02-23  6:43 ` viresh kumar
2010-02-23  6:59   ` Borislav Petkov
2010-02-23  7:31     ` viresh kumar
2010-02-23  9:50       ` Borislav Petkov
2010-02-23 11:37         ` viresh kumar
2010-02-23 13:01           ` Borislav Petkov
2010-02-23 13:59             ` Stefan Richter
2010-02-24  4:23             ` viresh kumar
2010-02-23 15:15           ` Theodore Tso [this message]
2010-02-24  4:28             ` viresh kumar
2010-02-24  7:02               ` Theodore Tso
2010-02-24 10:38             ` Clemens Ladisch

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=07BBC9AE-C1A1-449F-AE5E-EB5B1C6323C2@mit.edu \
    --to=tytso@mit.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=petkovbb@googlemail.com \
    --cc=viresh.linux@gmail.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

all inboxes | Powered by JetHome®