Skip to content

Commit

Permalink
[PATCH] PCI: fix sparse warning about pci_bus_flags
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Roland Dreier authored and Greg Kroah-Hartman committed Apr 14, 2006
1 parent 5da594b commit e778272
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

struct pci_cap_saved_state {
Expand Down

0 comments on commit e778272

Please sign in to comment.