Skip to content

Commit c7ae396

Browse files
hkallweitbjorn-helgaas
authored andcommitted
PCI: Annotate pci_cache_line_size variables as __ro_after_init
Annotate both variables as __ro_after_init, enforcing that they can't be changed after the init phase. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Heiner Kallweit <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
1 parent e30556b commit c7ae396

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/pci/pci.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ enum pcie_bus_config_types pcie_bus_config = PCIE_BUS_DEFAULT;
142142
* the dfl or actual value as it sees fit. Don't forget this is
143143
* measured in 32-bit words, not bytes.
144144
*/
145-
u8 pci_dfl_cache_line_size = L1_CACHE_BYTES >> 2;
146-
u8 pci_cache_line_size;
145+
u8 pci_dfl_cache_line_size __ro_after_init = L1_CACHE_BYTES >> 2;
146+
u8 pci_cache_line_size __ro_after_init ;
147147

148148
/*
149149
* If we set up a device for bus mastering, we need to check the latency

0 commit comments

Comments
 (0)