From: Hauke Mehrtens <hauke@hauke-m.de>
To: "Luis R. Rodriguez" <lrodriguez@qca.qualcomm.com>
Cc: "John W. Linville" <linville@tuxdriver.com>,
Joe Perches <joe@perches.com>,
linux-wireless@vger.kernel.org
Subject: Re: [PATCH] compat-wireless: avoid pr_fmt build SPAM
Date: Sat, 19 Nov 2011 00:21:01 +0100 [thread overview]
Message-ID: <4EC6E85D.9010607@hauke-m.de> (raw)
In-Reply-To: <CAB=NE6Ux=R3odTDkoibHs2E5aiMvaF1GuD-7Nv3-9ZabT74-bQ@mail.gmail.com>
On 11/19/2011 12:03 AM, Luis R. Rodriguez wrote:
> On Fri, Nov 18, 2011 at 2:34 PM, John W. Linville
> <linville@tuxdriver.com> 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
prev parent reply other threads:[~2011-11-18 23:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-18 20:54 [PATCH] compat-wireless: avoid pr_fmt build SPAM John W. Linville
2011-11-18 21:00 ` Johannes Berg
2011-11-18 21:09 ` John W. Linville
2011-11-18 21:12 ` Luis R. Rodriguez
2011-11-18 21:49 ` John W. Linville
2011-11-18 22:26 ` Joe Perches
2011-11-18 22:34 ` John W. Linville
2011-11-18 23:03 ` Luis R. Rodriguez
2011-11-18 23:21 ` Hauke Mehrtens [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EC6E85D.9010607@hauke-m.de \
--to=hauke@hauke-m.de \
--cc=joe@perches.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=lrodriguez@qca.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).