From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next] ipv4: use IS_ENABLED() macro to cleanup code
Date: Tue, 25 Oct 2011 19:30:37 -0400 (EDT) [thread overview]
Message-ID: <20111025.193037.1312584002692004360.davem@davemloft.net> (raw)
In-Reply-To: <1319526752.3834.12.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 25 Oct 2011 09:12:32 +0200
> Remove some ugly #ifdef, using IS_ENABLED(CONFIG_xxx) macro
>
> IS_ENABLED(CONFIG_xxx) evaluates to 1 if CONFIG_xxx is set to 'y' or 'm'
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
I can understand the desire to do this, but it is going to run
afoul in cases where the definitions of datastructures in header
files are protected by real CPP ifdef guards rather than these
run-time variants.
So you build tested this with IPV6 disabled, right?
Didn't think so...
net/ipv4/ip_sockglue.c: In function ‘do_ip_setsockopt’:
net/ipv4/ip_sockglue.c:523:29: error: ‘LOOPBACK4_IPV6’ undeclared (first use in this function)
net/ipv4/ip_sockglue.c:523:29: note: each undeclared identifier is reported only once for each function it appears in
This fails because ip_sockglue.c guards the net/transp_v6.h header
inclusion with a real CPP guard.
next prev parent reply other threads:[~2011-10-25 23:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-25 7:12 [PATCH net-next] ipv4: use IS_ENABLED() macro to cleanup code Eric Dumazet
2011-10-25 23:30 ` David Miller [this message]
2011-10-26 6:34 ` Eric Dumazet
2011-10-26 8:00 ` Ben Hutchings
2011-10-26 8:05 ` Eric Dumazet
2011-10-26 19:56 ` David Miller
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=20111025.193037.1312584002692004360.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
/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).