lkml.org 
[lkml]   [2006]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] PCI: fix sparse warning about pci_bus_flags
From
Date
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,
};

/*
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2006-03-30 22:57    [W:1.425 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site