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: <4E08B4AA.409@broadcom.com>
Date:	Mon, 27 Jun 2011 18:49:46 +0200
From:	"Arend van Spriel" <arend@...adcom.com>
To:	Rafał Miłecki <zajec5@...il.com>
cc:	"Alexey Dobriyan" <adobriyan@...il.com>,
	"Geert Uytterhoeven" <geert@...ux-m68k.org>,
	"linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>,
	"linux-next@...r.kernel.org" <linux-next@...r.kernel.org>,
	"Linux Kernel Development" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -next] bcma: main.c needs to include <linux/slab.h>

On 06/27/2011 04:43 PM, Rafał Miłecki wrote:
> W dniu 27 czerwca 2011 16:24 użytkownik Alexey Dobriyan
> <adobriyan@...il.com>  napisał:
>> 2011/6/27 Rafał Miłecki<zajec5@...il.com>:
>>> 2011/6/26 Geert Uytterhoeven<geert@...ux-m68k.org>:
>>>> m68k allmodconfig:
>>>>
>>>> drivers/bcma/main.c: In function ‘bcma_release_core_dev’:
>>>> drivers/bcma/main.c:68: error: implicit declaration of function ‘kfree’
>>> We already include slab.h in:
>>> host_pci.c
>>> scan.c
>>> sprom.c
>>>
>>> Maybe we can just include this in bcma.h as a better solution?
>> It isn't better solution.
>> It results in situation where unnecessary inclusion will be done.
>> Maybe it's not the case now, but it will be in future.
> Scanning code is required for every BCMA board, so we already include
> linux/slab.h on every configuration. No matter if this is PCI host
> board, or SoC, or whatever we will support in the future.
> Now we discovered this is also needed in main.c, which will be always compiled.
>
> 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.

Gr. AvS

-- 
Almost nobody dances sober, unless they happen to be insane.
-- H.P. Lovecraft --


--
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