|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH] redundant ampersand before array name in __RING_SIZE
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
# 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@xxxxxxxxxxxx>
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. _______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|