X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=net%2Fmac80211%2Fdebugfs.c;fp=net%2Fmac80211%2Fdebugfs.c;h=4ab5c522ceeeee5def93f869fd96618999a2daf5;hb=dec7730df6ef78ab01b6e96e0f4e6a94d96f1a86;hp=e433d0c97e86118394cd39c663f3531fd1145a75;hpb=94106d26c380ce21f947a37a8a0c18a1c29b40af;p=karo-tx-linux.git diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c index e433d0c97e86..4ab5c522ceee 100644 --- a/net/mac80211/debugfs.c +++ b/net/mac80211/debugfs.c @@ -91,7 +91,7 @@ static const struct file_operations reset_ops = { }; #endif -static const char *hw_flag_names[NUM_IEEE80211_HW_FLAGS + 1] = { +static const char *hw_flag_names[] = { #define FLAG(F) [IEEE80211_HW_##F] = #F FLAG(HAS_RATE_CONTROL), FLAG(RX_INCLUDES_FCS), @@ -127,9 +127,6 @@ static const char *hw_flag_names[NUM_IEEE80211_HW_FLAGS + 1] = { FLAG(BEACON_TX_STATUS), FLAG(NEEDS_UNIQUE_STA_ADDR), FLAG(SUPPORTS_REORDERING_BUFFER), - - /* keep last for the build bug below */ - (void *)0x1 #undef FLAG }; @@ -149,7 +146,7 @@ static ssize_t hwflags_read(struct file *file, char __user *user_buf, /* fail compilation if somebody adds or removes * a flag without updating the name array above */ - BUILD_BUG_ON(hw_flag_names[NUM_IEEE80211_HW_FLAGS] != (void *)0x1); + BUILD_BUG_ON(ARRAY_SIZE(hw_flag_names) != NUM_IEEE80211_HW_FLAGS); for (i = 0; i < NUM_IEEE80211_HW_FLAGS; i++) { if (test_bit(i, local->hw.flags))