[PATCH net-next 05/11] wimax/i2400m/control: fix enum warning

Arnd Bergmann
2020-10-26T21:32:38Z

From: Arnd Bergmann <arnd@arndb.de>

gcc -Wextra warns about mixing two enum types:

drivers/net/wimax/i2400m/control.c: In function 'i2400m_get_device_info':
drivers/net/wimax/i2400m/control.c:960:10: warning: implicit conversion from 'enum <anonymous>' to 'enum i2400m_tlv' [-Wenum-conversion]

Merge the anonymous enum into the global one that has all the other
values. It's not clear why they were originally kept separate, but this
appears to be the logical place for it.

Fixes: 3a35a1d0bdf7 ("i2400m: various functions for device management")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/net/wimax/i2400m/control.c | 7 -------
include/uapi/linux/wimax/i2400m.h | 1 +
2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/net/wimax/i2400m/control.c b/drivers/net/wimax/i2400m/control.c
index 8df98757d901..180d5f417bdc 100644
--- a/drivers/net/wimax/i2400m/control.c
+++ b/drivers/net/wimax/i2400m/control.c
@@ -903,13 +903,6 @@ int i2400m_cmd_enter_powersave(struct i2400m *i2400m)
EXPORT_SYMBOL_GPL(i2400m_cmd_enter_powersave);

-/*
- * Definitions for getting device information
- */
-enum {
- I2400M_TLV_DETAILED_DEVICE_INFO = 140
-};
-
/**
* i2400m_get_device_info - Query the device for detailed device information
*
diff --git a/include/uapi/linux/wimax/i2400m.h b/include/uapi/linux/wimax/i2400m.h
index fd198bc24a3c..595ab3511d45 100644
--- a/include/uapi/linux/wimax/i2400m.h
+++ b/include/uapi/linux/wimax/i2400m.h
@@ -409,6 +409,7 @@ enum i2400m_ms {
*/
enum i2400m_tlv {
I2400M_TLV_L4_MESSAGE_VERSIONS = 129,
+ I2400M_TLV_DETAILED_DEVICE_INFO = 140,
I2400M_TLV_SYSTEM_STATE = 141,
I2400M_TLV_MEDIA_STATUS = 161,
I2400M_TLV_RF_OPERATION = 162,
--
2.27.0