linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: viresh.linux@gmail.com (viresh kumar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] Including device.h and resource.h header files in linux/amba/bus.h
Date: Sat, 27 Mar 2010 10:37:19 +0530	[thread overview]
Message-ID: <22dbbef21003262207i3fa10157jf3b8577b307ce99d@mail.gmail.com> (raw)
In-Reply-To: <63386a3d1003261031p63224296pd4b1a649108af00b@mail.gmail.com>

On Fri, Mar 26, 2010 at 11:01 PM, Linus Walleij
<linus.ml.walleij@gmail.com> wrote:
> 2010/3/25 Viresh KUMAR <viresh.kumar@st.com>:
>
>> linux/amba/bus.h have dependencies on linux/device.h and linux/resource.h, but
>> it doesn't include them. We get compilation errors in our files which include
>> bus.h but doesn't include device.h and resource.h. This patch includes device.h
>> and resource.h in linux/amba/bus.h file.
>
> The customs of the kernel is to not #include .h files into each other so much,
> the reason being that this easily goes out of hand. Instead #include
> device.h and resource.h into your sourcefile above the amba/bus.h
> inclusion.
>

Some time back i have initiated a thread regarding this type of issues. You can
find them here:

http://lists.infradead.org/pipermail/linux-arm-kernel/2010-February/010258.html

And my understanding after the discussion was:

It is the responsibility of a header files, using types definitions
from outside world,
to include all header files required for proper compilation.
This is not the responsibility of the user using this file to add
dependency header in
his source files.

Ex: As everybody who is going to use bus.h has to have device.h and
resource.h included.
So why not have all of them included once only. So that people don't
see compilation
warnings when they try to use these header files. And don't have to
add them in all source
files using them.

What do you say?

regards,
viresh kumar.

  reply	other threads:[~2010-03-27  5:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-25 10:03 [PATCH] Including device.h and resource.h header files in linux/amba/bus.h Viresh KUMAR
2010-03-25 10:03 ` [PATCH] removing compilation warning comming from clkdev.h Viresh KUMAR
2010-03-27 21:42   ` Russell King - ARM Linux
2010-03-26 17:31 ` [PATCH] Including device.h and resource.h header files in linux/amba/bus.h Linus Walleij
2010-03-27  5:07   ` viresh kumar [this message]
2010-03-27  9:13     ` Linus Walleij
2010-03-27 11:55       ` viresh kumar
2010-03-27 20:57         ` Linus Walleij
2010-03-29 17:16           ` H Hartley Sweeten
2010-03-29 17:19             ` Russell King - ARM Linux
2010-03-29 17:23               ` H Hartley Sweeten
2010-03-27 21:42 ` Russell King - ARM Linux

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=22dbbef21003262207i3fa10157jf3b8577b307ce99d@mail.gmail.com \
    --to=viresh.linux@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.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).