Re: [PATCH -next] bcma: main.c needs to include <linux/slab.h>

From: RafaÅ MiÅecki
Date: Mon Jun 27 2011 - 11:01:13 EST


W dniu 27 czerwca 2011 16:53 uÅytkownik Geert Uytterhoeven
<geert@xxxxxxxxxxxxxx> napisaÅ:
> 2011/6/27 RafaÅ MiÅecki <zajec5@xxxxxxxxx>:
>> 2011/6/27 Pavel Roskin <proski@xxxxxxx>:
>>> On 06/27/2011 10:24 AM, Alexey Dobriyan wrote:
>>>> 2011/6/27 RafaÅ MiÅecki<zajec5@xxxxxxxxx>:
>>>>> 2011/6/26 Geert Uytterhoeven<geert@xxxxxxxxxxxxxx>:
>>>>>>
>>>>>> 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.
>>>
>>> I agree. Âkfree() is used in main.c, not in bcma.h. ÂThere is no need for
>>> all files that include bcma.h to include linux/slab.h, especially (but not
>>> only) because bcma.h is not a private header.
>>
>> You ignore the fact I clarified my idea to use bcma_private.h instead of bcma.h.
>
> One day A Cleaner will remove it again, seeing bcma_private.h doesn't
> use any slab
> interface, and it still seems to compile on his platform of choice
> (which implicitly
> pulls in slab.h).
>
> If it's put in main.c, The Cleaner will notice main.c uses kfree(),
> and won't touch it.

A Cleaner should review all files that use bcma_private.h and notice kfree() ;)

But as I said, I don't really argue.

John, if that's OK for you, please take it.

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