mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
PCI/MSI: Simplify msi_verify_entries()
No point in looping over all entries when 64bit addressing mode is enabled for nothing. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Marc Zyngier <maz@kernel.org> Reviewed-by: Marc Zyngier <maz@kernel.org> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://lore.kernel.org/r/20210729222542.992849326@linutronix.de
This commit is contained in:
parent
3998527d2e
commit
a6e8b94650
1 changed files with 4 additions and 1 deletions
|
@ -613,8 +613,11 @@ static int msi_verify_entries(struct pci_dev *dev)
|
|||
{
|
||||
struct msi_desc *entry;
|
||||
|
||||
if (!dev->no_64bit_msi)
|
||||
return 0;
|
||||
|
||||
for_each_pci_msi_entry(entry, dev) {
|
||||
if (entry->msg.address_hi && dev->no_64bit_msi) {
|
||||
if (entry->msg.address_hi) {
|
||||
pci_err(dev, "arch assigned 64-bit MSI address %#x%08x but device only supports 32 bits\n",
|
||||
entry->msg.address_hi, entry->msg.address_lo);
|
||||
return -EIO;
|
||||
|
|
Loading…
Add table
Reference in a new issue