Skip to content

Commit 1a34655

Browse files
committed
Merge branch 'pci/aer'
- Use PCI_DEVID() macro in aer_inject() instead of open-coding it (Jinjie Ruan) * pci/aer: PCI/AER: Use PCI_DEVID() macro in aer_inject()
2 parents 8400291 + 3ee1a6b commit 1a34655

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/pci/pcie/aer_inject.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ static int aer_inject(struct aer_error_inj *einj)
430430
else
431431
rperr->root_status |= PCI_ERR_ROOT_COR_RCV;
432432
rperr->source_id &= 0xffff0000;
433-
rperr->source_id |= (einj->bus << 8) | devfn;
433+
rperr->source_id |= PCI_DEVID(einj->bus, devfn);
434434
}
435435
if (einj->uncor_status) {
436436
if (rperr->root_status & PCI_ERR_ROOT_UNCOR_RCV)
@@ -443,7 +443,7 @@ static int aer_inject(struct aer_error_inj *einj)
443443
rperr->root_status |= PCI_ERR_ROOT_NONFATAL_RCV;
444444
rperr->root_status |= PCI_ERR_ROOT_UNCOR_RCV;
445445
rperr->source_id &= 0x0000ffff;
446-
rperr->source_id |= ((einj->bus << 8) | devfn) << 16;
446+
rperr->source_id |= PCI_DEVID(einj->bus, devfn) << 16;
447447
}
448448
spin_unlock_irqrestore(&inject_lock, flags);
449449

0 commit comments

Comments
 (0)