提交 e778272d 编写于 作者: R Roland Dreier 提交者: Greg Kroah-Hartman

[PATCH] 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.
Signed-off-by: NRoland Dreier <rolandd@cisco.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 5da594b1
......@@ -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 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册