mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: David Daney <ddaney@caviumnetworks.com>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	linux-arch@vger.kernel.org
Subject: Re: [PATCH] Protect prefetch macro arguments.
Date: Fri, 26 Mar 2010 14:04:08 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.2.00.1003261402170.3721@i5.linux-foundation.org> (raw)
In-Reply-To: <1269636240-8895-1-git-send-email-ddaney@caviumnetworks.com>



On Fri, 26 Mar 2010, David Daney wrote:
>
> The GCC built-in __builtin_prefetch() is a vargs function.  If we
> don't wrap the macro parameter in parentheses, a comma operator in the
> actual argument list might cause unintended parameters to be passed to
> __builtin_prefetch().

This seems totally pointless and actively wrong.

You cannot have a comma operator in the actual argument list to the 
#define, because if you did, then you'd get a

	macro "prefetch()" passed 2 arguments, but takes just 1

so the only way I see to pass a comma operator is to _already_ have the 
macro parameter in parenthesis.

		Linus

  reply	other threads:[~2010-03-26 21:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-26 20:44 David Daney
2010-03-26 21:04 ` Linus Torvalds [this message]
2010-03-26 21:18   ` David Daney
2010-03-26 21:23     ` Linus Torvalds

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=alpine.LFD.2.00.1003261402170.3721@i5.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=ddaney@caviumnetworks.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®