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

Re: [Xen-devel] [PATCH] pci/msi: constify the pci_dev parameter of pci_msi_conf_write_intercept



>>> On 11.09.17 at 11:16, <roger.pau@xxxxxxxxxx> wrote:

This being an x86 only change, the subject prefix would presumably
better be "x86/msi".

> --- a/xen/arch/x86/msi.c
> +++ b/xen/arch/x86/msi.c
> @@ -657,7 +657,7 @@ int msi_free_irq(struct msi_desc *entry)
>      return 0;
>  }
>  
> -static struct msi_desc *find_msi_entry(struct pci_dev *dev,
> +static struct msi_desc *find_msi_entry(const struct pci_dev *dev,
>                                         int irq, int cap_id)
>  {

I certainly agree with this part, but ...

> @@ -1274,7 +1274,7 @@ void pci_cleanup_msi(struct pci_dev *pdev)
>      msi_free_irqs(pdev);
>  }
>  
> -int pci_msi_conf_write_intercept(struct pci_dev *pdev, unsigned int reg,
> +int pci_msi_conf_write_intercept(const struct pci_dev *pdev, unsigned int 
> reg,
>                                   unsigned int size, uint32_t *data)
>  {

... I'm not so sure about this one. The function changes data
associated with the device, and it just so happens that right
now all such changes are confined to the separately allocated
msix structure. Do other changes of yours depend on the
parameter becoming const here? I'm trying to understand
what scope an undo of this change would be, should it turn
out necessary down the road.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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