Hi, On Tue, 23 Feb 2010, Jan Beulich wrote:
Richard Guenther
23.02.10 12:05 >>> The above contains an obfustcated offsetof. Using offsetof (or __builtin_offsetof if the kernel doesn't have a suitable definition of offsetof somewhere) should work fine. The header where this gets defined represents an interface between Xen host and guests. It is intentionally written in a way that does not make any assumptions on the environment within which it would be compiled - hence no offsetof() and no gcc extensions.
Relying on "(long)s->ring - (long)s" being a constant expression _is_ a GCC extension. You have to use offsetof: #define __RING_SIZE(_s, _sz) \ (__RD32(((_sz) - offsetof(struct netif_rx_sring, ring)) / sizeof((_s)->ring[0]))) Ciao, Michael. -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org