diff options
-rw-r--r-- | drivers/net/wireless/ath/ath10k/wmi.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h index 2a3cc45f3359..370124eb4fd8 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.h +++ b/drivers/net/wireless/ath/ath10k/wmi.h @@ -212,6 +212,8 @@ enum wmi_service { WMI_SERVICE_PER_PACKET_SW_ENCRYPT, WMI_SERVICE_REPORT_AIRTIME, + /* Remember to add the new value to wmi_service_name()! */ + /* keep last */ WMI_SERVICE_MAX, }; @@ -378,7 +380,7 @@ enum wmi_10_4_service { WMI_10_4_SERVICE_REPORT_AIRTIME, }; -static inline char *wmi_service_name(int service_id) +static inline char *wmi_service_name(enum wmi_service service_id) { #define SVCSTR(x) case x: return #x @@ -501,11 +503,13 @@ static inline char *wmi_service_name(int service_id) SVCSTR(WMI_SERVICE_PER_PACKET_SW_ENCRYPT); SVCSTR(WMI_SERVICE_REPORT_AIRTIME); - default: + case WMI_SERVICE_MAX: return NULL; } #undef SVCSTR + + return NULL; } #define WMI_SERVICE_IS_ENABLED(wmi_svc_bmap, svc_id, len) \ |