All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Simon Horman <horms@verge.net.au>
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: Mon, 19 Nov 2007 23:18:44 -0800	[thread overview]
Message-ID: <1195543124.4675.114.camel@localhost> (raw)
In-Reply-To: <20071120070601.GE10490@verge.net.au>

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.

> 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?


  reply	other threads:[~2007-11-20  7:18 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 [this message]
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=1195543124.4675.114.camel@localhost \
    --to=joe@perches.com \
    --cc=davem@davemloft.net \
    --cc=horms@verge.net.au \
    --cc=jmorris@namei.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.