From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753040Ab1F0Q5g (ORCPT ); Mon, 27 Jun 2011 12:57:36 -0400 Received: from he.sipsolutions.net ([78.46.109.217]:48060 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752956Ab1F0Q5b (ORCPT ); Mon, 27 Jun 2011 12:57:31 -0400 Subject: Re: [PATCH -next] bcma: main.c needs to include From: Johannes Berg To: Arend van Spriel Cc: =?UTF-8?Q?Rafa=C5=82_Mi=C5=82ecki?= , Alexey Dobriyan , Geert Uytterhoeven , "linux-wireless@vger.kernel.org" , "linux-next@vger.kernel.org" , Linux Kernel Development In-Reply-To: <4E08B4AA.409@broadcom.com> (sfid-20110627_185027_507290_BCE834F5) References: <4E08B4AA.409@broadcom.com> (sfid-20110627_185027_507290_BCE834F5) Content-Type: text/plain; charset="UTF-8" Date: Mon, 27 Jun 2011 18:57:24 +0200 Message-ID: <1309193844.3911.27.camel@jlt3.sipsolutions.net> Mime-Version: 1.0 X-Mailer: Evolution 2.32.3 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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