Skip to content

Commit 091f9f7

Browse files
tititiou36bjorn-helgaas
authored andcommitted
PCI: Change pdev->rom_attr_enabled to single bit
Make 'rom_attr_enabled' a single bit in a bitfield and move it close to an existing bitfield so that they can be merged. This field is only used in 'drivers/pci/pci-sysfs.c' to store 0 or 1. On x86_64, this shrinks the size of 'struct pci_dev' by 8 bytes from 3560 to 3552. Link: https://lore.kernel.org/r/d7a34ad369336db73145c3efbade895e792a0ad3.1687105455.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
1 parent 849846c commit 091f9f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/pci.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,12 +464,12 @@ struct pci_dev {
464464
unsigned int no_vf_scan:1; /* Don't scan for VFs after IOV enablement */
465465
unsigned int no_command_memory:1; /* No PCI_COMMAND_MEMORY */
466466
unsigned int rom_bar_overlap:1; /* ROM BAR disable broken */
467+
unsigned int rom_attr_enabled:1; /* Display of ROM attribute enabled? */
467468
pci_dev_flags_t dev_flags;
468469
atomic_t enable_cnt; /* pci_enable_device has been called */
469470

470471
u32 saved_config_space[16]; /* Config space saved at suspend time */
471472
struct hlist_head saved_cap_space;
472-
int rom_attr_enabled; /* Display of ROM attribute enabled? */
473473
struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */
474474
struct bin_attribute *res_attr_wc[DEVICE_COUNT_RESOURCE]; /* sysfs file for WC mapping of resources */
475475

0 commit comments

Comments
 (0)