WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] x86: drop unused parameter from msi_compose_msg() an

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] x86: drop unused parameter from msi_compose_msg() and setup_msi_irq()
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Thu, 25 Aug 2011 15:37:00 +0100
Delivery-date: Thu, 25 Aug 2011 07:38:41 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
This particularly eliminates the bogus passing of NULL by hpet.c.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

--- a/xen/arch/x86/hpet.c
+++ b/xen/arch/x86/hpet.c
@@ -342,7 +342,7 @@ static void __hpet_setup_msi_irq(unsigne
 {
     struct msi_msg msg;
 
-    msi_compose_msg(NULL, irq, &msg);
+    msi_compose_msg(irq, &msg);
     hpet_msi_write(irq, &msg);
 }
 
--- a/xen/arch/x86/irq.c
+++ b/xen/arch/x86/irq.c
@@ -1670,7 +1670,7 @@ int map_domain_pirq(
              && !desc->chip_data->used_vectors )
             desc->chip_data->used_vectors = &pdev->info.used_vectors;
         set_domain_irq_pirq(d, irq, info);
-        setup_msi_irq(pdev, msi_desc, irq);
+        setup_msi_irq(msi_desc, irq);
         spin_unlock_irqrestore(&desc->lock, flags);
     }
     else
--- a/xen/arch/x86/msi.c
+++ b/xen/arch/x86/msi.c
@@ -120,8 +120,7 @@ static void msix_put_fixmap(struct pci_d
 /*
  * MSI message composition
  */
-void msi_compose_msg(struct pci_dev *pdev, int irq,
-                            struct msi_msg *msg)
+void msi_compose_msg(int irq, struct msi_msg *msg)
 {
     unsigned dest;
     cpumask_t domain;
@@ -414,11 +413,11 @@ static struct msi_desc* alloc_msi_entry(
     return entry;
 }
 
-int setup_msi_irq(struct pci_dev *dev, struct msi_desc *msidesc, int irq)
+int setup_msi_irq(struct msi_desc *msidesc, int irq)
 {
     struct msi_msg msg;
 
-    msi_compose_msg(dev, irq, &msg);
+    msi_compose_msg(irq, &msg);
     set_irq_msi(msidesc);
     write_msi_msg(irq_desc[irq].msi_desc, &msg);
 
--- a/xen/include/asm-x86/msi.h
+++ b/xen/include/asm-x86/msi.h
@@ -81,7 +81,7 @@ extern void set_msi_affinity(unsigned in
 extern int pci_enable_msi(struct msi_info *msi, struct msi_desc **desc);
 extern void pci_disable_msi(struct msi_desc *desc);
 extern void pci_cleanup_msi(struct pci_dev *pdev);
-extern int setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc, int irq);
+extern int setup_msi_irq(struct msi_desc *desc, int irq);
 extern void teardown_msi_irq(int irq);
 extern int msi_free_vector(struct msi_desc *entry);
 extern int pci_restore_msi_state(struct pci_dev *pdev);
@@ -221,6 +221,5 @@ struct msg_address {
        __u32   hi_address;
 } __attribute__ ((packed));
 
-void msi_compose_msg(struct pci_dev *pdev, int irq,
-                            struct msi_msg *msg);
+void msi_compose_msg(int irq, struct msi_msg *);
 #endif /* __ASM_MSI_H */



Attachment: x86-setup_msi_irq-no-pdev.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] x86: drop unused parameter from msi_compose_msg() and setup_msi_irq(), Jan Beulich <=