wifi: iwlwifi: fw: reconstruct the API/CAPA enum number
authorJohannes Berg <johannes.berg@intel.com>
Wed, 30 Aug 2023 08:30:59 +0000 (11:30 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 11 Sep 2023 10:36:28 +0000 (12:36 +0200)
commit1647fc9885799e4555fada45766304b2f70b9e7d
treebcec50d5511e61a3dd695f0a9a3a2b5a9a9af961
parente110bf0c826663fd5afa7fb94207c5127044537b
wifi: iwlwifi: fw: reconstruct the API/CAPA enum number

The last member of the enum is meant to count the items,
but sparse cannot increment the previous member due to
its bitwise type. Declaring the last entry with a value
doesn't work either (cannot mix bitwise/non-bitwise) and
declaring it with a bitwise value doesn't work due to
the way it gets used. This led to the current construct.

However, that construct the kernel-doc script doesn't
understand this construct due to the use of #ifdef/#else.

Find another solution that makes both tools happy, we
do now do declare it as the bitwise value but then just
redefine it so that doesn't get used, all still under
__CHECKER__ conditional.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230830112059.44bdf6a5fa9e.I9f1ea129f89e53043d48676aed0a3b8f6c31ac08@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/fw/file.h