mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-07-06 05:45:29 +02:00
PCI/AER: Use PCI_DEVID() macro in aer_inject()
The PCI_DEVID() macro can be used instead of open-coding it. No functional changes intended. Link: https://lore.kernel.org/linux-pci/20240829022435.4145181-1-ruanjinjie@huawei.com Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com> [kwilczynski: commit log] Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
This commit is contained in:
parent
8400291e28
commit
3ee1a6b5d7
|
@ -430,7 +430,7 @@ static int aer_inject(struct aer_error_inj *einj)
|
||||||
else
|
else
|
||||||
rperr->root_status |= PCI_ERR_ROOT_COR_RCV;
|
rperr->root_status |= PCI_ERR_ROOT_COR_RCV;
|
||||||
rperr->source_id &= 0xffff0000;
|
rperr->source_id &= 0xffff0000;
|
||||||
rperr->source_id |= (einj->bus << 8) | devfn;
|
rperr->source_id |= PCI_DEVID(einj->bus, devfn);
|
||||||
}
|
}
|
||||||
if (einj->uncor_status) {
|
if (einj->uncor_status) {
|
||||||
if (rperr->root_status & PCI_ERR_ROOT_UNCOR_RCV)
|
if (rperr->root_status & PCI_ERR_ROOT_UNCOR_RCV)
|
||||||
|
@ -443,7 +443,7 @@ static int aer_inject(struct aer_error_inj *einj)
|
||||||
rperr->root_status |= PCI_ERR_ROOT_NONFATAL_RCV;
|
rperr->root_status |= PCI_ERR_ROOT_NONFATAL_RCV;
|
||||||
rperr->root_status |= PCI_ERR_ROOT_UNCOR_RCV;
|
rperr->root_status |= PCI_ERR_ROOT_UNCOR_RCV;
|
||||||
rperr->source_id &= 0x0000ffff;
|
rperr->source_id &= 0x0000ffff;
|
||||||
rperr->source_id |= ((einj->bus << 8) | devfn) << 16;
|
rperr->source_id |= PCI_DEVID(einj->bus, devfn) << 16;
|
||||||
}
|
}
|
||||||
spin_unlock_irqrestore(&inject_lock, flags);
|
spin_unlock_irqrestore(&inject_lock, flags);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user