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

@ -72,7 +72,7 @@ struct blk_shadow {
static DEFINE_MUTEX(blkfront_mutex);
static const struct block_device_operations xlvbd_block_fops;
#define BLK_RING_SIZE __RING_SIZE((struct blkif_sring *)0, PAGE_SIZE)
#define BLK_RING_SIZE __CONST_RING_SIZE(blkif, PAGE_SIZE)
/*
* We have one of these per vbd, whether ide, scsi or 'other'. They