[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen master] x86/MSI: drop redundant checking



commit 79a7206451966843f48f5d4c3011a3e08fa1e9d2
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Wed Nov 18 09:57:30 2026 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Nov 18 09:57:30 2026 +0100

    x86/MSI: drop redundant checking
    
    __pci_enable_msi{,x}() are local helpers of pci_enable_msi(). That one
    already checks for pdev to be non-NULL, and it also asserts the necessary
    locking state. msi_capability_init() in turn is a local helper of
    __pci_enable_msi().
    
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Acked-by: Roger Pau Monne <roger@xxxxxxxxxxxxxx>
---
 xen/arch/x86/msi.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/xen/arch/x86/msi.c b/xen/arch/x86/msi.c
index 8831ce068c..0bbd5d2c9d 100644
--- a/xen/arch/x86/msi.c
+++ b/xen/arch/x86/msi.c
@@ -600,7 +600,6 @@ static int msi_capability_init(struct pci_dev *dev,
     unsigned int i, mpos;
     uint16_t control;
 
-    ASSERT_PDEV_LIST_IS_READ_LOCKED(dev->domain);
     pos = dev->msi_pos;
     if ( !pos )
         return -ENODEV;
@@ -1004,11 +1003,6 @@ static int __pci_enable_msi(struct pci_dev *pdev, struct 
msi_info *msi,
 {
     struct msi_desc *old_desc;
 
-    if ( !pdev )
-        return -ENODEV;
-
-    ASSERT_PDEV_LIST_IS_READ_LOCKED(pdev->domain);
-
     old_desc = find_msi_entry(pdev, msi->irq, PCI_CAP_ID_MSI);
     if ( old_desc )
     {
@@ -1059,11 +1053,6 @@ static int __pci_enable_msix(struct pci_dev *pdev, 
struct msi_info *msi,
 {
     struct msi_desc *old_desc;
 
-    if ( !pdev )
-        return -ENODEV;
-
-    ASSERT_PDEV_LIST_IS_READ_LOCKED(pdev->domain);
-
     if ( !pdev->msix )
         return -ENODEV;
 
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.