linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christopher Li <sparse@chrisli.org>
To: "Robert P. J. Day" <rpjday@crashcourse.ca>
Cc: Sam Ravnborg <sam@ravnborg.org>, sparse <linux-sparse@vger.kernel.org>
Subject: Re: Detect unused header files?
Date: Tue, 28 Jul 2009 13:49:57 -0700	[thread overview]
Message-ID: <70318cbf0907281349k72a71b8fyc10d80992e4b1db9@mail.gmail.com> (raw)
In-Reply-To: <alpine.LFD.2.00.0907281634400.3974@localhost>

On Tue, Jul 28, 2009 at 1:36 PM, Robert P. J. Day<rpjday@crashcourse.ca> wrote:
> sure you can.  no one should be counting on the inclusion of header
> files by other header files (except possibly in unusual situations,
> which i can't even think of at the moment).  if your program needs the
> contents of a header file, it's your responsibility to include it.

The case I have in mind is that, some API level header file include some
internal header file for constant defines. For example:

drivers/ieee1394/host.h include drivers/ieee1394/csr.h.

The "csr.h" is just the register define. It is not used in this header file
itself. I did not check very closely, for augments sake pretend those
inline function are not there. It just have register defines.

Should the C program changed to include "csr.h" directly? I don't think so.

Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2009-07-28 20:49 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-28 18:18 Detect unused header files? Sam Ravnborg
2009-07-28 20:36 ` Christopher Li
2009-07-28 20:36   ` Robert P. J. Day
2009-07-28 20:49     ` Christopher Li [this message]
2009-07-28 21:04       ` Sam Ravnborg
2009-07-28 21:38         ` Christopher Li
2009-07-30 10:55           ` Christopher Li
2009-07-30 11:12             ` Derek M Jones
2009-07-30 20:36             ` Sam Ravnborg
2009-08-04 21:49               ` Christopher Li
2009-08-05  6:12                 ` Sam Ravnborg
2009-08-06 11:14                 ` Marko Kreen
2009-08-06 11:17                   ` Robert P. J. Day
2009-08-06 12:16                     ` Kamil Dudka
2009-08-06 12:15                       ` Robert P. J. Day
2009-08-06 13:01                       ` Kamil Dudka
2009-08-06 13:26                         ` Michael Stefaniuc
2009-08-06 14:09                           ` Robert P. J. Day
2009-08-06 17:39                   ` Christopher Li
2009-07-28 20:58   ` Sam Ravnborg
2009-07-28 21:21     ` Christopher Li

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=70318cbf0907281349k72a71b8fyc10d80992e4b1db9@mail.gmail.com \
    --to=sparse@chrisli.org \
    --cc=linux-sparse@vger.kernel.org \
    --cc=rpjday@crashcourse.ca \
    --cc=sam@ravnborg.org \
    /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).