All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PCI: shrink pci_dev_info's is_extfn/is_virtfn members
@ 2012-01-02 14:23 Jan Beulich
  0 siblings, 0 replies; only message in thread
From: Jan Beulich @ 2012-01-02 14:23 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 1128 bytes --]

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>

--- a/xen/arch/ia64/xen/hypercall.c
+++ b/xen/arch/ia64/xen/hypercall.c
@@ -695,8 +695,8 @@ long do_physdev_op(int cmd, XEN_GUEST_HA
         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,
--- a/xen/include/xen/pci.h
+++ b/xen/include/xen/pci.h
@@ -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;




[-- Attachment #2: squeeze-pci_dev_info.patch --]
[-- Type: text/plain, Size: 1179 bytes --]

PCI: shrink pci_dev_info's is_extfn/is_virtfn members

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>

--- a/xen/arch/ia64/xen/hypercall.c
+++ b/xen/arch/ia64/xen/hypercall.c
@@ -695,8 +695,8 @@ long do_physdev_op(int cmd, XEN_GUEST_HA
         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,
--- a/xen/include/xen/pci.h
+++ b/xen/include/xen/pci.h
@@ -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;

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-01-02 14:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-02 14:23 [PATCH] PCI: shrink pci_dev_info's is_extfn/is_virtfn members Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.