From: "Jan Beulich" Subject: Ping: [PATCH] PCI: shrink pci_dev_info's is_extfn/is_virtfn members Date: Mon, 09 Jan 2012 13:10:48 +0000 Message-ID: <4F0AF568020000780006B30C@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__Part82ACCA48.0__=" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__Part82ACCA48.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline They are used as boolean flags only, so convert them accordingly (shrinking the structure size by 8 bytes). Signed-off-by: Jan Beulich --- 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) !=3D 0 ) break; =20 - pdev_info.is_extfn =3D manage_pci_ext.is_extfn; - pdev_info.is_virtfn =3D manage_pci_ext.is_virtfn; + pdev_info.is_extfn =3D !!manage_pci_ext.is_extfn; + pdev_info.is_virtfn =3D !!manage_pci_ext.is_virtfn; pdev_info.physfn.bus =3D manage_pci_ext.physfn.bus; pdev_info.physfn.devfn =3D manage_pci_ext.physfn.devfn; ret =3D 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; --=__Part82ACCA48.0__= Content-Type: text/plain; name="squeeze-pci_dev_info.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="squeeze-pci_dev_info.patch" PCI: shrink pci_dev_info's is_extfn/is_virtfn members=0A=0AThey are used = as boolean flags only, so convert them accordingly=0A(shrinking the = structure size by 8 bytes).=0A=0ASigned-off-by: Jan Beulich =0A=0A--- a/xen/arch/ia64/xen/hypercall.c=0A+++ b/xen/arch/ia64/xen/hyp= ercall.c=0A@@ -695,8 +695,8 @@ long do_physdev_op(int cmd, XEN_GUEST_HA=0A = if ( copy_from_guest(&manage_pci_ext, arg, 1) !=3D 0 )=0A = break;=0A =0A- pdev_info.is_extfn =3D manage_pci_ext.is_extfn;=0A= - pdev_info.is_virtfn =3D manage_pci_ext.is_virtfn;=0A+ = pdev_info.is_extfn =3D !!manage_pci_ext.is_extfn;=0A+ pdev_info.is_v= irtfn =3D !!manage_pci_ext.is_virtfn;=0A pdev_info.physfn.bus =3D = manage_pci_ext.physfn.bus;=0A pdev_info.physfn.devfn =3D manage_pci= _ext.physfn.devfn;=0A ret =3D pci_add_device(0, manage_pci_ext.bus,= =0A--- a/xen/include/xen/pci.h=0A+++ b/xen/include/xen/pci.h=0A@@ -33,8 = +33,8 @@=0A #define MAX_MSIX_TABLE_ENTRIES 2048=0A #define MAX_MSIX_TABLE_= PAGES 8=0A struct pci_dev_info {=0A- unsigned is_extfn;=0A- = unsigned is_virtfn;=0A+ bool_t is_extfn;=0A+ bool_t is_virtfn;=0A = struct {=0A u8 bus;=0A u8 devfn;=0A --=__Part82ACCA48.0__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=__Part82ACCA48.0__=--