From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Torvalds Subject: Re: [PATCH] Protect prefetch macro arguments. Date: Fri, 26 Mar 2010 14:04:08 -0700 (PDT) Message-ID: References: <1269636240-8895-1-git-send-email-ddaney@caviumnetworks.com> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Return-path: Received: from smtp1.linux-foundation.org ([140.211.169.13]:51159 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751512Ab0CZVJH (ORCPT ); Fri, 26 Mar 2010 17:09:07 -0400 In-Reply-To: <1269636240-8895-1-git-send-email-ddaney@caviumnetworks.com> Sender: linux-arch-owner@vger.kernel.org List-ID: To: David Daney Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org 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