PCI: shrink pci_dev_info's is_extfn/is_virtfn members
authorJan Beulich <jbeulich@suse.com>
Mon, 9 Jan 2012 14:55:00 +0000 (15:55 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 9 Jan 2012 14:55:00 +0000 (15:55 +0100)
They are used as boolean flags only, so convert them accordingly
(shrinking the structure size by 8 bytes).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
xen/arch/ia64/xen/hypercall.c
xen/include/xen/pci.h

index bc4d8d7f24cc4b0055cfc837e57bbc5f38c22e25..130675e52fc32564ea2d3a643229a22ee2b147e3 100644 (file)
@@ -695,8 +695,8 @@ long do_physdev_op(int cmd, XEN_GUEST_HANDLE(void) arg)
         if ( copy_from_guest(&manage_pci_ext, arg, 1) != 0 )
             break;
 
-        pdev_info.is_extfn = manage_pci_ext.is_extfn;
-        pdev_info.is_virtfn = manage_pci_ext.is_virtfn;
+        pdev_info.is_extfn = !!manage_pci_ext.is_extfn;
+        pdev_info.is_virtfn = !!manage_pci_ext.is_virtfn;
         pdev_info.physfn.bus = manage_pci_ext.physfn.bus;
         pdev_info.physfn.devfn = manage_pci_ext.physfn.devfn;
         ret = pci_add_device(0, manage_pci_ext.bus,
index 8066cafbc46322d8425f23ee217a75d75ffa9110..b57bb90f966efb6ec2b64bd815b920df49a636eb 100644 (file)
@@ -33,8 +33,8 @@
 #define MAX_MSIX_TABLE_ENTRIES  2048
 #define MAX_MSIX_TABLE_PAGES    8
 struct pci_dev_info {
-    unsigned is_extfn;
-    unsigned is_virtfn;
+    bool_t is_extfn;
+    bool_t is_virtfn;
     struct {
         u8 bus;
         u8 devfn;