Gianni Tedesco
2011-Jan-07 16:49 UTC
[Xen-devel] [PATCH]: minios: use constant expression to size arrays
Fixes a compile error in gcc-4.5 which is the reason __CONST_RING_SIZE() was introduced. Let''s just use it in minios netfront. Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com> diff -r c55b93f3f8cf extras/mini-os/netfront.c --- a/extras/mini-os/netfront.c Fri Jan 07 15:27:30 2011 +0000 +++ b/extras/mini-os/netfront.c Fri Jan 07 16:46:18 2011 +0000 @@ -25,8 +25,8 @@ DECLARE_WAIT_QUEUE_HEAD(netfront_queue); -#define NET_TX_RING_SIZE __RING_SIZE((struct netif_tx_sring *)0, PAGE_SIZE) -#define NET_RX_RING_SIZE __RING_SIZE((struct netif_rx_sring *)0, PAGE_SIZE) +#define NET_TX_RING_SIZE __CONST_RING_SIZE(netif_tx, PAGE_SIZE) +#define NET_RX_RING_SIZE __CONST_RING_SIZE(netif_rx, PAGE_SIZE) #define GRANT_INVALID_REF 0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Samuel Thibault
2011-Jan-07 16:56 UTC
Re: [Xen-devel] [PATCH]: minios: use constant expression to size arrays
Gianni Tedesco, le Fri 07 Jan 2011 16:49:47 +0000, a écrit :> Fixes a compile error in gcc-4.5 which is the reason __CONST_RING_SIZE() > was introduced. Let''s just use it in minios netfront. > > Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Jackson
2011-Jan-07 18:01 UTC
Re: [Xen-devel] [PATCH]: minios: use constant expression to size arrays
Samuel Thibault writes ("Re: [Xen-devel] [PATCH]: minios: use constant expression to size arrays"):> Gianni Tedesco, le Fri 07 Jan 2011 16:49:47 +0000, a écrit : > > Fixes a compile error in gcc-4.5 which is the reason __CONST_RING_SIZE() > > was introduced. Let''s just use it in minios netfront. > > > > Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com> > > Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>Applied, thanks. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel