Historical ath9k-devel archives
 help / color / mirror / Atom feed
* [ath9k-devel] [PATCH 6/8] drivers/net/wireless/ath/ath9k: use ARRAY_SIZE macro in ani.c
       [not found] <1283979457-4649-1-git-send-email-nikitasangelinas@gmail.com>
@ 2010-09-08 21:25 ` Nikitas Angelinas
  2010-09-08 21:31   ` Luis R. Rodriguez
  0 siblings, 1 reply; 2+ messages in thread
From: Nikitas Angelinas @ 2010-09-08 21:25 UTC (permalink / raw)
  To: ath9k-devel

Replace (sizeof(ofdm_level_table)/sizeof(ofdm_level_table[0]) with
ARRAY_SIZE(ofdm_level_table), and (sizeof(cck_level_table)/
sizeof(cck_level_table[0]) with ARRAY_SIZE(cck_level_table) in
drivers/net/wireless/ath/ath9k/ani.c

Signed-off-by: Nikitas Angelinas <nikitasangelinas@gmail.com>
---
 drivers/net/wireless/ath/ath9k/ani.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/ani.c b/drivers/net/wireless/ath/ath9k/ani.c
index cc648b6..0496f96 100644
--- a/drivers/net/wireless/ath/ath9k/ani.c
+++ b/drivers/net/wireless/ath/ath9k/ani.c
@@ -14,6 +14,7 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#include <linux/kernel.h>
 #include "hw.h"
 #include "hw-ops.h"
 
@@ -48,7 +49,7 @@ static const struct ani_ofdm_level_entry ofdm_level_table[] = {
 	{  7,  8,  0  }  /* lvl 9 */
 };
 #define ATH9K_ANI_OFDM_NUM_LEVEL \
-	(sizeof(ofdm_level_table)/sizeof(ofdm_level_table[0]))
+	ARRAY_SIZE(ofdm_level_table)
 #define ATH9K_ANI_OFDM_MAX_LEVEL \
 	(ATH9K_ANI_OFDM_NUM_LEVEL-1)
 #define ATH9K_ANI_OFDM_DEF_LEVEL \
@@ -94,7 +95,7 @@ static const struct ani_cck_level_entry cck_level_table[] = {
 };
 
 #define ATH9K_ANI_CCK_NUM_LEVEL \
-	(sizeof(cck_level_table)/sizeof(cck_level_table[0]))
+	ARRAY_SIZE(cck_level_table)
 #define ATH9K_ANI_CCK_MAX_LEVEL \
 	(ATH9K_ANI_CCK_NUM_LEVEL-1)
 #define ATH9K_ANI_CCK_MAX_LEVEL_LOW_RSSI \
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [ath9k-devel] [PATCH 6/8] drivers/net/wireless/ath/ath9k: use ARRAY_SIZE macro in ani.c
  2010-09-08 21:25 ` [ath9k-devel] [PATCH 6/8] drivers/net/wireless/ath/ath9k: use ARRAY_SIZE macro in ani.c Nikitas Angelinas
@ 2010-09-08 21:31   ` Luis R. Rodriguez
  0 siblings, 0 replies; 2+ messages in thread
From: Luis R. Rodriguez @ 2010-09-08 21:31 UTC (permalink / raw)
  To: ath9k-devel

On Wed, Sep 08, 2010 at 02:25:42PM -0700, Nikitas Angelinas wrote:
> Replace (sizeof(ofdm_level_table)/sizeof(ofdm_level_table[0]) with
> ARRAY_SIZE(ofdm_level_table), and (sizeof(cck_level_table)/
> sizeof(cck_level_table[0]) with ARRAY_SIZE(cck_level_table) in
> drivers/net/wireless/ath/ath9k/ani.c
> 
> Signed-off-by: Nikitas Angelinas <nikitasangelinas@gmail.com>

Sure.

  Luis

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-09-08 21:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1283979457-4649-1-git-send-email-nikitasangelinas@gmail.com>
2010-09-08 21:25 ` [ath9k-devel] [PATCH 6/8] drivers/net/wireless/ath/ath9k: use ARRAY_SIZE macro in ani.c Nikitas Angelinas
2010-09-08 21:31   ` Luis R. Rodriguez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox