Skip to contentSkip to conversation

PCI: fix sparse warning about pci_bus_flags

PATCH New Roland Dreier 1 participant 1 message Mar 30, 2006 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: fix sparse warning about pci_bus_flags

Sparse warns about casting to a __bitwise type. However, it's correct to do when defining the enum for pci_bus_flags_t, so add a __force to quiet the warnings. This will fix getting

include/linux/pci.h:100:26: warning: cast to restricted type

from sparse all over the build.

include/linux/pci.h +1 -1
index 0aad5a3..09ff282 100644
@@ -97,7 +97,7 @@ enum pci_channel_state {
 
 typedef unsigned short __bitwise pci_bus_flags_t;
 enum pci_bus_flags {
-	PCI_BUS_FLAGS_NO_MSI = (pci_bus_flags_t) 1,
+	PCI_BUS_FLAGS_NO_MSI = (__force pci_bus_flags_t) 1,
 };
 
 /*