From: Richard Miller <9xen@hamnavoe.com> Subject: [PATCH] redundant ampersand before array name in __RING_SIZE macro Date: Wed, 4 Oct 2006 14:46:46 +0100 Message-ID: <71078d7aa076450f2aefb33f5165f8f6@hamnavoe.com> References: <8916e865c8681e15968771fe3b555aa5@hamnavoe.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-jtxlrwskveufbjartptxwcsqny" Return-path: In-Reply-To: <8916e865c8681e15968771fe3b555aa5@hamnavoe.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --upas-jtxlrwskveufbjartptxwcsqny Content-Disposition: ainline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit The __RING_SIZE macro in xen/include/public/io/ring.h has an ampersand before (_s)->ring which is unnecessary (an array name without subscript already means "address of"), and causes fussy C compilers like the Plan 9 one to generate very many warning messages like this when the FRONT_RING_INIT macro is used: warning: etherxen.c:215 address of array/func ignored warning: etherxen.c:215 address of array/func ignored warning: etherxen.c:215 address of array/func ignored warning: etherxen.c:215 address of array/func ignored warning: etherxen.c:215 address of array/func ignored warning: etherxen.c:215 address of array/func ignored warning: etherxen.c:215 address of array/func ignored warning: etherxen.c:215 address of array/func ignored warning: etherxen.c:215 address of array/func ignored warning: etherxen.c:215 address of array/func ignored warning: etherxen.c:215 address of array/func ignored ... etc Would you like to tidy it up with the attached patch? -- Richard Miller --upas-jtxlrwskveufbjartptxwcsqny Content-Disposition: ainline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit # HG changeset patch # User miller@vt310 # Node ID 16863ad2efc0f6b4abe7b8239f55946aa3f336fc # Parent 473689acffdbc8b615fbc38ce8a877a904b702ed Remove redundant '&' before array name in __RING_SIZE macro. Signed-off-by: Richard Miller <9xen@hamnavoe.com> diff -r 473689acffdb -r 16863ad2efc0 xen/include/public/io/ring.h --- a/xen/include/public/io/ring.h Tue Oct 03 17:53:42 2006 +0100 +++ b/xen/include/public/io/ring.h Wed Oct 04 12:27:45 2006 +0100 @@ -25,7 +25,7 @@ typedef unsigned int RING_IDX; * power of two (so we can mask with (size-1) to loop around). */ #define __RING_SIZE(_s, _sz) \ - (__RD32(((_sz) - (long)&(_s)->ring + (long)(_s)) / sizeof((_s)->ring[0]))) + (__RD32(((_sz) - (long)(_s)->ring + (long)(_s)) / sizeof((_s)->ring[0]))) /* * Macros to make the correct C datatypes for a new kind of ring. --upas-jtxlrwskveufbjartptxwcsqny Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --upas-jtxlrwskveufbjartptxwcsqny--