lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20110920154023.c90396d8.akpm@google.com>
Date:	Tue, 20 Sep 2011 15:40:23 -0700
From:	Andrew Morton <akpm@...gle.com>
To:	Rafał Miłecki <zajec5@...il.com>
Cc:	Randy Dunlap <rdunlap@...otime.net>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	linux-next@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
	"linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>
Subject: Re: [PATCH -next] bcma: needs export.h

On Tue, 20 Sep 2011 20:45:57 +0200
Rafa__ Mi__ecki <zajec5@...il.com> wrote:

> 2011/9/20 Randy Dunlap <rdunlap@...otime.net>:
> > From: Randy Dunlap <rdunlap@...otime.net>
> >
> > bcma/driver_chipcommon_pmu.c needs to include <linux/export.h>,
> > so add it to the headers that are included by bcma_private.h.
> 
> Please take a look at discussion in:
> [PATCH -next] bcma: main.c needs to include <linux/slab.h>
> thread (by Andrew).
> 
> I believe that according to the discussion, such a includes should be
> done in .c files.
> 
> Andrew: can you comment? Am I right?

Ordinarily, yes, it is preferable to include the needed .h files from
within the .c files.  However quite a mumber of kernel subsystems do
take the #include "everything.h" approach.

However, drivers/bcma is a bit odd in that it has bcma_private.h which
includes delay.h (the everything.h approach) but most .c files
explicitly include other things, including export.h.

There's no real pattern here and yes, I agree that the minimal and more
typical approach is better.

--- a/drivers/bcma/driver_chipcommon_pmu.c~bcma-needs-exporth
+++ a/drivers/bcma/driver_chipcommon_pmu.c
@@ -10,6 +10,7 @@
 
 #include "bcma_private.h"
 #include <linux/bcma/bcma.h>
+#include <linux/export.h>
 
 static u32 bcma_chipco_pll_read(struct bcma_drv_cc *cc, u32 offset)
 {
_

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ