Re: [PATCH 8/9] pci/msi: remove useless attribute check

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

 



On Wed, 2008-06-04 at 13:52 +0900, Hidetoshi Seto wrote:
> We never have MSI-X's msi_desc in msi_list while MSI is enabled
> (and vise versa).

You're probably right, but that's not all you're removing. There's also
the !entry->dev check - which is probably also safe to remove, but if it
breaks you get both pieces :)  Still, your changelog should mention
that.

cheers

> Signed-off-by: Hidetoshi Seto <seto.hidetoshi@xxxxxxxxxxxxxx>
> ---
>  drivers/pci/msi.c |    8 --------
>  1 files changed, 0 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
> index b74668d..f62f941 100644
> --- a/drivers/pci/msi.c
> +++ b/drivers/pci/msi.c
> @@ -627,25 +627,17 @@ void pci_msi_shutdown(struct pci_dev* dev)
>  		u32 mask = entry->msi_attrib.maskbits_mask;
>  		msi_set_mask_bits(dev->irq, mask, ~mask);
>  	}
> -	if (!entry->dev || entry->msi_attrib.type != PCI_CAP_ID_MSI)
> -		return;
>  
>  	/* Restore dev->irq to its default pin-assertion irq */
>  	dev->irq = entry->msi_attrib.default_irq;
>  }
>  void pci_disable_msi(struct pci_dev* dev)
>  {
> -	struct msi_desc *entry;
> -
>  	if (!pci_msi_enable || !dev || !dev->msi_enabled)
>  		return;
>  
>  	pci_msi_shutdown(dev);
>  
> -	entry = list_entry(dev->msi_list.next, struct msi_desc, list);
> -	if (!entry->dev || entry->msi_attrib.type != PCI_CAP_ID_MSI)
> -		return;
> -
>  	free_msi_entries(dev);
>  }
>  EXPORT_SYMBOL(pci_disable_msi);
-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux