public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PCI: fix sparse warning about pci_bus_flags
@ 2006-03-30 20:55 Roland Dreier
  0 siblings, 0 replies; only message in thread
From: Roland Dreier @ 2006-03-30 20:55 UTC (permalink / raw)
  To: greg; +Cc: mst, linux-kernel

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.

Signed-off-by: Roland Dreier <rolandd@cisco.com>

diff --git a/include/linux/pci.h b/include/linux/pci.h
index 0aad5a3..09ff282 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -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,
 };
 
 /*

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2006-03-30 20:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-30 20:55 [PATCH] PCI: fix sparse warning about pci_bus_flags Roland Dreier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox