]> git.baikalelectronics.ru Git - kernel.git/commit
ath9k: remove repetitions of mask array size
authorBob Copeland <me@bobcopeland.com>
Sat, 16 Apr 2016 14:54:37 +0000 (10:54 -0400)
committerKalle Valo <kvalo@qca.qualcomm.com>
Fri, 9 Sep 2016 12:12:18 +0000 (15:12 +0300)
commit873f909bb72857627bec340aec634b7d20f65970
treed2ac1709e89784ffc30f05593e3beb8d0a1d0035
parentb76f1d27008194386a363cfca8c5a1829f0fa5bf
ath9k: remove repetitions of mask array size

The constant "123", which is the number of elements in
mask_m / mask_p, is repeated several times in this function.

Replace memsets with array initialization, and replace a loop
conditional with ARRAY_SIZE() so that we don't repeat ourselves.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath9k/ar5008_phy.c