linux-2.6.18: consolidate GRANT_INVALID_REF definitions
Subsystems (2)
PATCH 1/1 linux-2.6.18: consolidate GRANT_INVALID_REF definitions
No need for each frontend to define this for itself, the more that this really is a property of the gnttab.c code.
Signed-off-by Jan Beulich <[email protected]>
drivers/char/tpm/tpm_xen.c +0 -2
@@ -109,8 +109,6 @@ void __exit tpmif_exit(void); #define WPRINTK(fmt, args...) \ printk(KERN_WARNING "xen_tpm_fr: " fmt, ##args) -#define GRANT_INVALID_REF 0 - static inline int tx_buffer_copy(struct tx_buffer *txb, const u8 *src, int len,
drivers/xen/blkfront/blkfront.c +0 -1
@@ -60,7 +60,6 @@#define MAXIMUM_OUTSTANDING_BLOCK_REQS \ (BLKIF_MAX_SEGMENTS_PER_REQUEST * BLK_RING_SIZE) -#define GRANT_INVALID_REF 0static void connect (struct blkfront_info *);static void blkfront_closing (struct blkfront_info *);
drivers/xen/netfront/netfront.c +0 -2
@@ -147,8 +147,6 @@ static inline int netif_needs_gso(struct#define ethtool_op_set_tso (dev, data) (-ENOSYS)#endif -#define GRANT_INVALID_REF 0 -struct netfront_rx_info {struct netif_rx_response rx;struct netif_extra_info extras[XEN_NETIF_EXTRA_TYPE_MAX -1 ];
drivers/xen/pcifront/xenbus.c +2 -3
@@ -15,7 +15,6 @@#define __init_refok#endif -#define INVALID_GRANT_REF (0)#define INVALID_EVTCHN (-1)static struct pcifront_device *alloc_pdev (struct xenbus_device *xdev)
@@ -47,7 +46,7 @@ static struct pcifront_device *alloc_pdespin_lock_init (&pdev->sh_info_lock); pdev->evtchn =INVALID_EVTCHN ; - pdev->gnt_ref =INVALID_GRANT_REF ; + pdev->gnt_ref =GRANT_INVALID_REF ; pdev->irq =-1 ;INIT_WORK (&pdev->op_work, pcifront_do_aer, pdev);
@@ -73,7 +72,7 @@ static void free_pdev(struct pcifront_deif (pdev->evtchn !=INVALID_EVTCHN )xenbus_free_evtchn (pdev->xdev, pdev->evtchn); -if (pdev->gnt_ref !=INVALID_GRANT_REF ) +if (pdev->gnt_ref !=GRANT_INVALID_REF )gnttab_end_foreign_access (pdev->gnt_ref, (unsigned long )pdev->sh_info);else
drivers/xen/scsifront/common.h +0 -1
@@ -61,7 +61,6 @@#include <xen/platform-compat.h> #endif -#define GRANT_INVALID_REF 0#define VSCSI_IN_ABORT 1#define VSCSI_IN_RESET 2
drivers/xen/usbfront/xenbus.c +0 -2
@@ -45,8 +45,6 @@#include "usbfront.h" -#define GRANT_INVALID_REF 0 -static void destroy_rings (struct usbfront_info *info) {if (info->irq)
include/xen/gnttab.h +2 -0
@@ -44,6 +44,8 @@#include <xen/interface/grant_table.h> #include <xen/features.h> +#define GRANT_INVALID_REF 0 +struct gnttab_free_callback {struct gnttab_free_callback *next;void (*fn)(void *);
consolidate GRANT_INVALID_REF definitions
No need for each frontend to define this for itself, the more that this really is a property of the gnttab.c code.
Signed-off-by Jan Beulich <[email protected]>
drivers/char/tpm/tpm_xen.c +0 -2
@@ -109,8 +109,6 @@ void __exit tpmif_exit(void); #define WPRINTK(fmt, args...) \ printk(KERN_WARNING "xen_tpm_fr: " fmt, ##args) -#define GRANT_INVALID_REF 0 - static inline int tx_buffer_copy(struct tx_buffer *txb, const u8 *src, int len,
drivers/xen/blkfront/blkfront.c +0 -1
@@ -60,7 +60,6 @@#define MAXIMUM_OUTSTANDING_BLOCK_REQS \ (BLKIF_MAX_SEGMENTS_PER_REQUEST * BLK_RING_SIZE) -#define GRANT_INVALID_REF 0static void connect (struct blkfront_info *);static void blkfront_closing (struct blkfront_info *);
drivers/xen/netfront/netfront.c +0 -2
@@ -147,8 +147,6 @@ static inline int netif_needs_gso(struct#define ethtool_op_set_tso (dev, data) (-ENOSYS)#endif -#define GRANT_INVALID_REF 0 -struct netfront_rx_info {struct netif_rx_response rx;struct netif_extra_info extras[XEN_NETIF_EXTRA_TYPE_MAX -1 ];
drivers/xen/pcifront/xenbus.c +2 -3
@@ -15,7 +15,6 @@#define __init_refok#endif -#define INVALID_GRANT_REF (0)#define INVALID_EVTCHN (-1)static struct pcifront_device *alloc_pdev (struct xenbus_device *xdev)
@@ -47,7 +46,7 @@ static struct pcifront_device *alloc_pdespin_lock_init (&pdev->sh_info_lock); pdev->evtchn =INVALID_EVTCHN ; - pdev->gnt_ref =INVALID_GRANT_REF ; + pdev->gnt_ref =GRANT_INVALID_REF ; pdev->irq =-1 ;INIT_WORK (&pdev->op_work, pcifront_do_aer, pdev);
@@ -73,7 +72,7 @@ static void free_pdev(struct pcifront_deif (pdev->evtchn !=INVALID_EVTCHN )xenbus_free_evtchn (pdev->xdev, pdev->evtchn); -if (pdev->gnt_ref !=INVALID_GRANT_REF ) +if (pdev->gnt_ref !=GRANT_INVALID_REF )gnttab_end_foreign_access (pdev->gnt_ref, (unsigned long )pdev->sh_info);else
drivers/xen/scsifront/common.h +0 -1
@@ -61,7 +61,6 @@#include <xen/platform-compat.h> #endif -#define GRANT_INVALID_REF 0#define VSCSI_IN_ABORT 1#define VSCSI_IN_RESET 2
drivers/xen/usbfront/xenbus.c +0 -2
@@ -45,8 +45,6 @@#include "usbfront.h" -#define GRANT_INVALID_REF 0 -static void destroy_rings (struct usbfront_info *info) {if (info->irq)
include/xen/gnttab.h +2 -0
@@ -44,6 +44,8 @@#include <xen/interface/grant_table.h> #include <xen/features.h> +#define GRANT_INVALID_REF 0 +struct gnttab_free_callback {struct gnttab_free_callback *next;void (*fn)(void *);
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel