lkml.org 
[lkml]   [2020]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 2/3] pci: use anonymous 'enum' instead of 'enum pci_channel_state'
Date
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 --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,

--
2.27.0
\
 
 \ /
  Last update: 2020-07-02 18:28    [W:0.051 / U:1.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site