From: Simon Horman <horms@verge.net.au>
To: Joe Perches <joe@perches.com>
Cc: David Miller <davem@davemloft.net>,
netdev <netdev@vger.kernel.org>,
"Pekka Savola (ipv6)" <pekkas@netcore.fi>,
Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
James Morris <jmorris@namei.org>,
Patrick McHardy <kaber@coreworks.de>
Subject: Re: [PATCH net-2.6.25 0/4] Convert IP4 address class macros to inline functions
Date: Tue, 20 Nov 2007 16:06:03 +0900 [thread overview]
Message-ID: <20071120070601.GE10490@verge.net.au> (raw)
In-Reply-To: <1195540812.4675.89.camel@localhost>
On Mon, Nov 19, 2007 at 10:40:12PM -0800, Joe Perches wrote:
> Change LOOPBACK MULTICAST LOCAL_MCAST BADCLASS and ZERONET
> macros to inline functions ipv4_is_<type>(__be32 addr)
>
> Adds some type safety and arguably some readability
>
> No change in compiled image size
>
> Signed-off-by: Joe Perches <joe@perches.com>
I can understand the motivation for moving the functionality into
inline functions in order to get some type safety. But what is
the motivation for changing all the macro calls to function calls,
when you have set up the marcos to call the appropriate functions?
Surely if you want to do that you should just ditch the marcos all
together. Perhaps I am missing a patch?
Also, as the function names are longer than the macro name
you are creating lines that are > 80 columns wide that used
not to be in that state. For my eyes that reduced readability
(substantially).
--
Horms
next prev parent reply other threads:[~2007-11-20 7:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-20 6:40 [PATCH net-2.6.25 0/4] Convert IP4 address class macros to inline functions Joe Perches
2007-11-20 7:06 ` Simon Horman [this message]
2007-11-20 7:18 ` Joe Perches
2007-11-20 7:42 ` Simon Horman
2007-11-20 8:03 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2007-11-14 15:53 Joe Perches
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=20071120070601.GE10490@verge.net.au \
--to=horms@verge.net.au \
--cc=davem@davemloft.net \
--cc=jmorris@namei.org \
--cc=joe@perches.com \
--cc=kaber@coreworks.de \
--cc=kuznet@ms2.inr.ac.ru \
--cc=netdev@vger.kernel.org \
--cc=pekkas@netcore.fi \
--cc=yoshfuji@linux-ipv6.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).