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

Re: [Xen-devel] [PATCH v3 10/13] pci: switch pci_conf_write8 to use pci_sbdf_t



>>> On 07.06.19 at 11:22, <roger.pau@xxxxxxxxxx> wrote:
> --- a/xen/drivers/acpi/reboot.c
> +++ b/xen/drivers/acpi/reboot.c
> @@ -23,9 +23,9 @@ void acpi_reboot(void)
>       case ACPI_ADR_SPACE_PCI_CONFIG:
>               printk("Resetting with ACPI PCI RESET_REG.\n");
>               /* Write the value that resets us. */
> -             pci_conf_write8(0, 0,
> -                             (rr->address >> 32) & 31,
> -                             (rr->address >> 16) & 7,
> +             pci_conf_write8(PCI_SBDF(0, 0,
> +                                      (rr->address >> 32) & 31,
> +                                      (rr->address >> 16) & 7),

Isn't it the case that the AND-ing by constants is now no longer
needed?

> --- a/xen/drivers/vpci/vpci.c
> +++ b/xen/drivers/vpci/vpci.c
> @@ -263,8 +263,8 @@ static void vpci_write_hw(pci_sbdf_t sbdf, unsigned int 
> reg, unsigned int size,
>           */
>          if ( reg & 1 )
>          {
> -            pci_conf_write8(sbdf.seg, sbdf.bus, sbdf.dev, sbdf.fn, reg,
> -                            data);
> +
> +            pci_conf_write8(sbdf, reg, data);
>              pci_conf_write16(sbdf.seg, sbdf.bus, sbdf.dev, sbdf.fn, reg + 1,
>                               data >> 8);

Please don't insert a blank line like this.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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