Skip to content

Commit

Permalink
xen/platform-pci: use define instead of literal number
Browse files Browse the repository at this point in the history
Instead of "0x01" use the HVM_PARAM_CALLBACK_TYPE_PCI_INTX define from
the interface header in get_callback_via().

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Juergen Gross <jgross@suse.com>
  • Loading branch information
Juergen Gross committed Nov 15, 2022
1 parent c53717e commit 4abb77f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/xen/platform-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ static uint64_t get_callback_via(struct pci_dev *pdev)
pin = pdev->pin;

/* We don't know the GSI. Specify the PCI INTx line instead. */
return ((uint64_t)0x01 << HVM_CALLBACK_VIA_TYPE_SHIFT) | /* PCI INTx identifier */
return ((uint64_t)HVM_PARAM_CALLBACK_TYPE_PCI_INTX <<
HVM_CALLBACK_VIA_TYPE_SHIFT) |
((uint64_t)pci_domain_nr(pdev->bus) << 32) |
((uint64_t)pdev->bus->number << 16) |
((uint64_t)(pdev->devfn & 0xff) << 8) |
Expand Down

0 comments on commit 4abb77f

Please sign in to comment.