Skip to content

Commit 6b12159

Browse files
Alex Williamsonbjorn-helgaas
authored andcommitted
PCI: Convert pci_dev_flags definitions to bit shifts
Convert the pci_dev_flags definitions from decimal constants to bit shifts. We're only a few entries away from where using the decimal value becomes cumbersome. No functional change. Tested-by: George Spelvin <linux@horizon.com> Tested-by: Pat Erley <pat-lkml@erley.org> Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
1 parent c25dc82 commit 6b12159

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/linux/pci.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,13 @@ enum pci_dev_flags {
164164
/* INTX_DISABLE in PCI_COMMAND register disables MSI
165165
* generation too.
166166
*/
167-
PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG = (__force pci_dev_flags_t) 1,
167+
PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG = (__force pci_dev_flags_t) (1 << 0),
168168
/* Device configuration is irrevocably lost if disabled into D3 */
169-
PCI_DEV_FLAGS_NO_D3 = (__force pci_dev_flags_t) 2,
169+
PCI_DEV_FLAGS_NO_D3 = (__force pci_dev_flags_t) (1 << 1),
170170
/* Provide indication device is assigned by a Virtual Machine Manager */
171-
PCI_DEV_FLAGS_ASSIGNED = (__force pci_dev_flags_t) 4,
171+
PCI_DEV_FLAGS_ASSIGNED = (__force pci_dev_flags_t) (1 << 2),
172172
/* Flag for quirk use to store if quirk-specific ACS is enabled */
173-
PCI_DEV_FLAGS_ACS_ENABLED_QUIRK = (__force pci_dev_flags_t) 8,
173+
PCI_DEV_FLAGS_ACS_ENABLED_QUIRK = (__force pci_dev_flags_t) (1 << 3),
174174
};
175175

176176
enum pci_irq_reroute_variant {

0 commit comments

Comments
 (0)