ath11k: fix fallthrough warnings
PATCH 1/1 ath11k: fix fallthrough warnings
Marked expected switch case fall-through.
Fall through warnings were generated when running ath11k-check script with --extra flag:
drivers/net/wireless/ath/ath11k/core.c:741:14:
warning: this statement may fall through Wimplicit-fallthrough=]
drivers/net/wireless/ath/ath11k/dp.c:133:6:
warning: this statement may fall through [-Wplicit-fallthrough=]
--- drivers/net/wireless/ath/ath11k/core.c | 1 + drivers/net/wireless/ath/ath11k/dp.c | 1 + 2 files changed, 2 insertions(+)
drivers/net/wireless/ath/ath11k/core.c +1 -0
@@ -739,6 +739,7 @@ static void ath11k_core_restart(struct work_struct *work)break ;case ATH11K_STATE_RESTARTED : ar->state =ATH11K_STATE_WEDGED ; +/* fall through */ case ATH11K_STATE_WEDGED :ath11k_warn (sc,"device is wedged, will not restart radio %d\n" , i);
drivers/net/wireless/ath/ath11k/dp.c +1 -0
@@ -138,6 +138,7 @@ int ath11k_dp_srng_setup(struct ath11k_base *ab, struct dp_srng *ring,break ; }/* follow through when ring_num >= 3 */ +/* fall through */ case HAL_REO_EXCEPTION :case HAL_REO_REINJECT :case HAL_REO_CMD :
Signature · 7 lines
2.7.4 _______________________________________________ ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
Quoted 11 lines · Muna Sinada
Marked expected switch case fall-through.
Fall through warnings were generated when running ath11k-check script with --extra flag:
drivers/net/wireless/ath/ath11k/core.c:741:14:
warning: this statement may fall through Wimplicit-fallthrough=]
drivers/net/wireless/ath/ath11k/dp.c:133:6:
warning: this statement may fall through [-Wplicit-fallthrough=]Signed-off-by Muna Sinada <[email protected]>
[...]
drivers/net/wireless/ath/ath11k/dp.c int ath11k_dp_srng_setup(struct ath11k_base *ab, struct dp_srng *ring, · line 141
Quoted 7 lines
drivers/net/wireless/ath/ath11k/dp.c +1
-0@@ -138,6 +138,7 @@ int ath11k_dp_srng_setup(struct ath11k_base *ab, struct dp_srng *ring,break ; }/* follow through when ring_num >= 3 */ +/* fall through */
Duplicate comments saying the same thing, can't you merge those?
Signature · 6 lines
Kalle Valo _______________________________________________ ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
Quoted 16 lines · Kalle Valo
Quoted 11 lines · Muna Sinada
Marked expected switch case fall-through.
Fall through warnings were generated when running ath11k-check script with --extra flag:
drivers/net/wireless/ath/ath11k/core.c:741:14:
warning: this statement may fall through Wimplicit-fallthrough=]
drivers/net/wireless/ath/ath11k/dp.c:133:6:
warning: this statement may fall through [-Wplicit-fallthrough=]Signed-off-by Muna Sinada <[email protected]>[...]
Quoted 10 lines
drivers/net/wireless/ath/ath11k/dp.c int ath11k_dp_srng_setup(struct ath11k_base *ab, · line 142
Quoted 8 lines
drivers/net/wireless/ath/ath11k/dp.c +1
-0@@ -138,6 +138,7 @@ int ath11k_dp_srng_setup(struct ath11k_base *ab,struct dp_srng *ring, break; }/* follow through when ring_num >= 3 */ +/* fall through */ Duplicate comments saying the same thing, can't you merge those?
ath11k_check did not recognize "fall through" in the first comment causing the initial fall through warning. It seems that fall through comment needs to be on a separate comment to avoid getting warning from ath11k_check. Should I get rid of first comment or leave things how they are now?
Muna
_______________________________________________
ath11k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath11k
Quoted 28 lines · [email protected] writes:
Quoted 16 lines · Kalle Valo
Quoted 11 lines · Muna Sinada
Marked expected switch case fall-through.
Fall through warnings were generated when running ath11k-check script with --extra flag:
drivers/net/wireless/ath/ath11k/core.c:741:14:
warning: this statement may fall through Wimplicit-fallthrough=]
drivers/net/wireless/ath/ath11k/dp.c:133:6:
warning: this statement may fall through [-Wplicit-fallthrough=]Signed-off-by Muna Sinada <[email protected]>[...]
Quoted 10 lines
drivers/net/wireless/ath/ath11k/dp.c int ath11k_dp_srng_setup(struct ath11k_base · line 142
Quoted 8 lines
drivers/net/wireless/ath/ath11k/dp.c +1
-0@@ -138,6 +138,7 @@ int ath11k_dp_srng_setup(struct ath11k_base *ab, struct dp_srng *ring, break; }/* follow through when ring_num >= 3 */ +/* fall through */ Duplicate comments saying the same thing, can't you merge those?
Quoted 5 lines
ath11k_checkdid not recognize "fall through" in the first comment causing the initial fall through warning. It seems that fall through comment needs to be on a separate comment to avoid getting warning fromath11k_check. Should I get rid of first comment or leave things how they are now?
Ah, I tested this myself now and indeed GCC does not regocnise '/* fall through when ring_num >= 3 */' as a valid fallthrough comment even the recommendation implied otherwise:
https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
Oh well, so I guess we just need to have two comments even it's IMHO ugly. Unless someone has other ideas?
Signature · 6 lines
Kalle Valo _______________________________________________ ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k