netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "rae l" <crquan@gmail.com>
To: "David Newall" <david@davidnewall.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	cr_quan@163.com
Subject: Re: [PATCH 1/3] netlink: use the macro min(x,y) provided by <linux/kernel.h> instead
Date: Sun, 2 Sep 2007 08:56:54 +0800	[thread overview]
Message-ID: <91b13c310709011756n40ca15fao55d88d3754f0c292@mail.gmail.com> (raw)
In-Reply-To: <46DA07B8.4050204@davidnewall.com>

On 9/2/07, David Newall <david@davidnewall.com> wrote:
> Denis Cheng wrote
> > +     order = get_bitmask_order(min(max, (unsigned long)UINT_MAX)) - 1;
> >
>
> Why doesn't this clash with the max define, also in linux/kernel.h?
They indeed don't clash,
the cpp included by gcc is intelligent enough, it know the
function-style definition of max in kernel.h, that's different from
the auto variable max here, so they don't clash with each other,

But I think the variable name "max" here is ambiguous, I changed it to
"limit", see my following patch [PATCH 2/3].

-- 
Denis Cheng

  parent reply	other threads:[~2007-09-02  0:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-01 19:45 [PATCH 1/3] netlink: use the macro min(x,y) provided by <linux/kernel.h> instead Denis Cheng
2007-09-01 19:45 ` [PATCH 2/3] netlink: the temp variable name max is ambiguous Denis Cheng
2007-09-01 19:45   ` [PATCH 3/3] netlink: use a statically allocated nl_table instead Denis Cheng
2007-09-16 23:38     ` David Miller
2007-09-16 23:36   ` [PATCH 2/3] netlink: the temp variable name max is ambiguous David Miller
2007-09-20 16:56     ` rae l
     [not found] ` <46DA07B8.4050204@davidnewall.com>
2007-09-02  0:56   ` rae l [this message]
2007-09-16 23:35 ` [PATCH 1/3] netlink: use the macro min(x,y) provided by <linux/kernel.h> instead 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=91b13c310709011756n40ca15fao55d88d3754f0c292@mail.gmail.com \
    --to=crquan@gmail.com \
    --cc=cr_quan@163.com \
    --cc=davem@davemloft.net \
    --cc=david@davidnewall.com \
    --cc=linux-kernel@vger.kernel.org \
    --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).