From: Johannes Berg <johannes@sipsolutions.net>
To: Arend van Spriel <arend@broadcom.com>
Cc: "Rafał Miłecki" <zajec5@gmail.com>,
"Alexey Dobriyan" <adobriyan@gmail.com>,
"Geert Uytterhoeven" <geert@linux-m68k.org>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"linux-next@vger.kernel.org" <linux-next@vger.kernel.org>,
"Linux Kernel Development" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -next] bcma: main.c needs to include <linux/slab.h>
Date: Mon, 27 Jun 2011 18:57:24 +0200 [thread overview]
Message-ID: <1309193844.3911.27.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <4E08B4AA.409@broadcom.com> (sfid-20110627_185027_507290_BCE834F5)
On Mon, 2011-06-27 at 18:49 +0200, Arend van Spriel wrote:
> > That's why I think it's safe to include linux/slab.h in bcma_private.h.
> > But if that's just my opinion, everybody think it's wrong idea, I'm OK with it.
>
> My rule of thumb is: Header file a.h may only include header b.h when
> a.h needs some definition from b.h. Convenience is never a good reason
> for nested includes.
Yeah, good rule. Consider if you have a.h, b.h and z.c, z.c needs b.h
but not a.h, and now b.h includes a.h ("for convenience") -- changing
a.h would needlessly recompile z.c. Now, changing slab.h will probably
recompile everything anyway, but still...
johannes
next prev parent reply other threads:[~2011-06-27 16:57 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-26 8:19 [PATCH -next] bcma: main.c needs to include <linux/slab.h> Geert Uytterhoeven
2011-06-27 13:59 ` Rafał Miłecki
2011-06-27 14:09 ` Geert Uytterhoeven
2011-06-27 14:11 ` Rafał Miłecki
[not found] ` <BANLkTikSLx6FKvF518s99Q8eRU_WF+cn9A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-06-27 14:24 ` Alexey Dobriyan
[not found] ` <BANLkTinGvM79fza-=bFwcbtfFzGHAVKJag-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-06-27 14:43 ` Rafał Miłecki
2011-06-27 16:49 ` Arend van Spriel
2011-06-27 16:57 ` Johannes Berg [this message]
2011-06-27 17:22 ` Pavel Roskin
2011-06-27 14:44 ` Pavel Roskin
[not found] ` <4E089730.1080306-mXXj517/zsQ@public.gmane.org>
2011-06-27 14:49 ` Rafał Miłecki
2011-06-27 14:53 ` Geert Uytterhoeven
2011-06-27 15:00 ` Rafał Miłecki
2011-06-28 7:58 ` Rafał Miłecki
2011-06-28 9:49 ` Geert Uytterhoeven
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=1309193844.3911.27.camel@jlt3.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=adobriyan@gmail.com \
--cc=arend@broadcom.com \
--cc=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=zajec5@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