ath10k: make wmi_service_name() warn about missing service ids
authorKalle Valo <kvalo@codeaurora.org>
Mon, 11 Feb 2019 16:48:04 +0000 (18:48 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 12 Feb 2019 18:49:16 +0000 (20:49 +0200)
commit95cccf4d79fec4186b6a0d0723b4bc2c07282c0a
tree7b14620a71cf44a6a7fd1d16199c2a95c13d1b12
parent2321dd5d78fb150432083bdd17ecf19707bef1f9
ath10k: make wmi_service_name() warn about missing service ids

When adding a new value to enum wmi_service it's very easy to miss that the new
value should be also added to wmi_service_name() mapping function. Modify the
function so that GCC can now warn about this:

drivers/net/wireless/ath/ath10k/wmi.h:385:2: warning: enumeration value 'WMI_SERVICE_FOO' not handled in switch [-Wswitch]

And also add a reminder to the enum.

Thanks to Jouni Malinen for the idea.

Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/ath10k/wmi.h