netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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:42:33 +0900	[thread overview]
Message-ID: <20071120074231.GB3402@verge.net.au> (raw)
In-Reply-To: <1195543124.4675.114.camel@localhost>

On Mon, Nov 19, 2007 at 11:18:44PM -0800, Joe Perches wrote:
> On Tue, 2007-11-20 at 16:06 +0900, Simon Horman wrote:
> > 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?
> 
> It's just a sequence that allows the kernel to compile.
> 
> I expect to remove the macros when the other callsites,
> drivers/infiniband and drivers/parisc, are converted.
> 
> > Surely if you want to do that you should just ditch the marcos all
> > together. Perhaps I am missing a patch?
> 
> That's what I'd like to do but in sequence.
> 
> David Miller can reasonably accept the net changes, but
> I'm not too sure he can accept the drivers changes.
> 
> If/when this change is accepted and patches for drivers are
> accepted, I'll submit a patch to remove the macros.

Thanks for the clarification. I realised after I sent my
mail that you were probably having to cope with other callers.

> > 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).
> 
> David? You want a patch for that too?

-- 
Horms


  reply	other threads:[~2007-11-20  7:42 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
2007-11-20  7:18   ` Joe Perches
2007-11-20  7:42     ` Simon Horman [this message]
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=20071120074231.GB3402@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).