Search Linux Wireless

Re: [PATCH] compat-wireless: avoid pr_fmt build SPAM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/19/2011 12:03 AM, Luis R. Rodriguez wrote:
> On Fri, Nov 18, 2011 at 2:34 PM, John W. Linville
> <linville@xxxxxxxxxxxxx> wrote:
>> On Fri, Nov 18, 2011 at 02:26:21PM -0800, Joe Perches wrote:
>>> On Fri, 2011-11-18 at 15:54 -0500, John W. Linville wrote:
>>>> The way the compat-* header files are included causes the default
>>>> pr_fmt definition from <linux/kernel.h> to be evaluated for every file.
>>>> Files that define pr_fmt then generate a lot of build SPAM about
>>>> pr_fmt being redefined.
>>>>
>>>> Eliminate the build noise by preemptively undefining pr_fmt in those
>>>> files that define it.  This is accomplished by adding a patch to the
>>>> patches directory.
>>>
>>> Why not undef pr_fmt after the compat-* headers?
>>
>> That caused a build break.  IIRC, not everyone that uses pr_*
>> defines pr_fmt.  If pr_fmt is undef'd then they don't compile.
> 
> Hm, would it work if we undef but then define it?
> 
>   Luis
We could restructure compat so that it will not include everything every
time. Some time ago I tried to the extend every header with the things
needed to backport and remove the compat-*.h files completely.

The headers looked like this ( e.g. for include/linux/kernel.h):

#include <linux/version.h>
#include_next <linux/kernel.h>
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36))
.. backport code for this kernel
#endif
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35))
.. backport code for this kernel
#endif
....

Then just the headers needed at that position are included and we would
not have this problem with pr_fmt, but it takes some time to do this.

Hauke
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux