diff mbox series

[v2,2/3] pci: use anonymous 'enum' instead of 'enum pci_channel_state'

Message ID 20200702162651.49526-3-luc.vanoostenryck@gmail.com
State New
Headers show
Series pci: enforce usage of 'pci_channel_state_t' | expand

Commit Message

Luc Van Oostenryck July 2, 2020, 4:26 p.m. UTC
For typechecking reasons, the typedef 'pci_channel_state_t'
should be used instead of the 'enum pci_channel_state'.

One simple way to enforce this is to remove the definition of
'enum pci_channel_state' and replace it by an anonymous 'enum'.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
 include/linux/pci.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series


diff --git a/include/linux/pci.h b/include/linux/pci.h
index 7ee85e89e8ed..adcee9e30bfa 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -179,7 +179,7 @@  static inline const char *pci_power_name(pci_power_t state)
 typedef unsigned int __bitwise pci_channel_state_t;
-enum pci_channel_state {
+enum {
 	/* I/O channel is in normal state */
 	pci_channel_io_normal = (__force pci_channel_state_t) 1,