Skip to content

Commit 75e1fd4

Browse files
hkallweitdavem330
authored andcommitted
PCI: pci-bridge-emul: Use new constant PCI_STATUS_ERROR_BITS
Use new constant PCI_STATUS_ERROR_BITS to simplify the code. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 3ae944b commit 75e1fd4

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

drivers/pci/pci-bridge-emul.c

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,7 @@ static const struct pci_bridge_reg_behavior pci_regs_behavior[] = {
5050
(PCI_STATUS_CAP_LIST | PCI_STATUS_66MHZ |
5151
PCI_STATUS_FAST_BACK | PCI_STATUS_DEVSEL_MASK) << 16),
5252
.rsvd = GENMASK(15, 10) | ((BIT(6) | GENMASK(3, 0)) << 16),
53-
.w1c = (PCI_STATUS_PARITY |
54-
PCI_STATUS_SIG_TARGET_ABORT |
55-
PCI_STATUS_REC_TARGET_ABORT |
56-
PCI_STATUS_REC_MASTER_ABORT |
57-
PCI_STATUS_SIG_SYSTEM_ERROR |
58-
PCI_STATUS_DETECTED_PARITY) << 16,
53+
.w1c = PCI_STATUS_ERROR_BITS << 16,
5954
},
6055
[PCI_CLASS_REVISION / 4] = { .ro = ~0 },
6156

@@ -100,12 +95,7 @@ static const struct pci_bridge_reg_behavior pci_regs_behavior[] = {
10095
PCI_STATUS_DEVSEL_MASK) << 16) |
10196
GENMASK(11, 8) | GENMASK(3, 0)),
10297

103-
.w1c = (PCI_STATUS_PARITY |
104-
PCI_STATUS_SIG_TARGET_ABORT |
105-
PCI_STATUS_REC_TARGET_ABORT |
106-
PCI_STATUS_REC_MASTER_ABORT |
107-
PCI_STATUS_SIG_SYSTEM_ERROR |
108-
PCI_STATUS_DETECTED_PARITY) << 16,
98+
.w1c = PCI_STATUS_ERROR_BITS << 16,
10999

110100
.rsvd = ((BIT(6) | GENMASK(4, 0)) << 16),
111101
},

0 commit comments

Comments
 (0)