xen: Provide a variant of __RING_SIZE() that is an integer constant expression

Without this, gcc 4.5 won't compile xen-netfront and xen-blkfront, where
this is being used to specify array sizes.

Signed-off-by: Jan Beulich <[email protected]>
Signed-off-by: Jeremy Fitzhardinge <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: David Miller <[email protected]>
Cc: Stable Kernel <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Jeremy Fitzhardinge 2010-12-08 12:39:12 -08:00 • committed by Linus Torvalds
commit 667c78afae
3 changed files with 12 additions and 5 deletions

View file

@ -66,8 +66,8 @@ struct netfront_cb {
#define GRANT_INVALID_REF 0
#define NET_TX_RING_SIZE __RING_SIZE((struct xen_netif_tx_sring *)0, PAGE_SIZE)
#define NET_RX_RING_SIZE __RING_SIZE((struct xen_netif_rx_sring *)0, PAGE_SIZE)
#define NET_TX_RING_SIZE __CONST_RING_SIZE(xen_netif_tx, PAGE_SIZE)
#define NET_RX_RING_SIZE __CONST_RING_SIZE(xen_netif_rx, PAGE_SIZE)
#define TX_MAX_TARGET min_t(int, NET_RX_RING_SIZE, 256)
struct netfront_info {