* [PATCH 5/8] drivers/net/bnx2x: use ARRAY_SIZE macro in bnx2x_main.c
[not found] <1283979457-4649-1-git-send-email-nikitasangelinas@gmail.com>
@ 2010-09-08 21:20 ` Nikitas Angelinas
2010-09-10 4:56 ` David Miller
2010-09-08 21:25 ` [PATCH 6/8] drivers/net/wireless/ath/ath9k: use ARRAY_SIZE macro in ani.c Nikitas Angelinas
2010-09-08 21:29 ` [PATCH 8/8] net/wireless: use ARRAY_SIZE macro in radiotap.c Nikitas Angelinas
2 siblings, 1 reply; 5+ messages in thread
From: Nikitas Angelinas @ 2010-09-08 21:20 UTC (permalink / raw)
To: eilong, davem, dmitry, yanivr; +Cc: netdev, linux-kernel, Nikitas Angelinas
Replace sizeof(bnx2x_parity_mask)/(sizeof(bnx2x_parity_mask[0]) with
ARRAY_SIZE(bnx2x_parity_mask) in drivers/net/bnx2x/bnx2x_main.c
Signed-off-by: Nikitas Angelinas <nikitasangelinas@gmail.com>
---
drivers/net/bnx2x/bnx2x_main.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/bnx2x/bnx2x_main.c b/drivers/net/bnx2x/bnx2x_main.c
index f8c3f08..e534ae8 100644
--- a/drivers/net/bnx2x/bnx2x_main.c
+++ b/drivers/net/bnx2x/bnx2x_main.c
@@ -3803,10 +3803,9 @@ static const struct {
static void enable_blocks_parity(struct bnx2x *bp)
{
- int i, mask_arr_len =
- sizeof(bnx2x_parity_mask)/(sizeof(bnx2x_parity_mask[0]));
+ int i;
- for (i = 0; i < mask_arr_len; i++)
+ for (i = 0; i < ARRAY_SIZE(bnx2x_parity_mask); i++)
REG_WR(bp, bnx2x_parity_mask[i].addr,
bnx2x_parity_mask[i].mask);
}
--
1.7.2.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [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:20 ` [PATCH 5/8] drivers/net/bnx2x: use ARRAY_SIZE macro in bnx2x_main.c Nikitas Angelinas
@ 2010-09-08 21:25 ` Nikitas Angelinas
[not found] ` <1283981142-5062-1-git-send-email-nikitasangelinas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-09-08 21:29 ` [PATCH 8/8] net/wireless: use ARRAY_SIZE macro in radiotap.c Nikitas Angelinas
2 siblings, 1 reply; 5+ messages in thread
From: Nikitas Angelinas @ 2010-09-08 21:25 UTC (permalink / raw)
To: lrodriguez, jmalinen, vasanth, senthilkumar, linville,
Sujith.Manoharan, nbd
Cc: linux-wireless, ath9k-devel, netdev, linux-kernel,
Nikitas Angelinas
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] 5+ messages in thread
* [PATCH 8/8] net/wireless: use ARRAY_SIZE macro in radiotap.c
[not found] <1283979457-4649-1-git-send-email-nikitasangelinas@gmail.com>
2010-09-08 21:20 ` [PATCH 5/8] drivers/net/bnx2x: use ARRAY_SIZE macro in bnx2x_main.c Nikitas Angelinas
2010-09-08 21:25 ` [PATCH 6/8] drivers/net/wireless/ath/ath9k: use ARRAY_SIZE macro in ani.c Nikitas Angelinas
@ 2010-09-08 21:29 ` Nikitas Angelinas
2 siblings, 0 replies; 5+ messages in thread
From: Nikitas Angelinas @ 2010-09-08 21:29 UTC (permalink / raw)
To: johannes, linville, davem
Cc: linux-wireless, linux-kernel, netdev, Nikitas Angelinas
Replace sizeof(rtap_namespace_sizes) / sizeof(rtap_namespace_sizes[0])
with ARRAY_SIZE(rtap_namespace_sizes) in net/wireless/radiotap.c
Signed-off-by: Nikitas Angelinas <nikitasangelinas@gmail.com>
---
net/wireless/radiotap.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/net/wireless/radiotap.c b/net/wireless/radiotap.c
index 1332c44..c774bc0 100644
--- a/net/wireless/radiotap.c
+++ b/net/wireless/radiotap.c
@@ -14,6 +14,7 @@
* See COPYING for more details.
*/
+#include <linux/kernel.h>
#include <net/cfg80211.h>
#include <net/ieee80211_radiotap.h>
#include <asm/unaligned.h>
@@ -45,7 +46,7 @@ static const struct radiotap_align_size rtap_namespace_sizes[] = {
};
static const struct ieee80211_radiotap_namespace radiotap_ns = {
- .n_bits = sizeof(rtap_namespace_sizes) / sizeof(rtap_namespace_sizes[0]),
+ .n_bits = ARRAY_SIZE(rtap_namespace_sizes),
.align_size = rtap_namespace_sizes,
};
--
1.7.2.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 6/8] drivers/net/wireless/ath/ath9k: use ARRAY_SIZE macro in ani.c
[not found] ` <1283981142-5062-1-git-send-email-nikitasangelinas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2010-09-08 21:31 ` Luis R. Rodriguez
0 siblings, 0 replies; 5+ messages in thread
From: Luis R. Rodriguez @ 2010-09-08 21:31 UTC (permalink / raw)
To: Nikitas Angelinas
Cc: Luis Rodriguez, Jouni Malinen, Vasanth Thiagarajan,
Senthilkumar Balasubramanian,
linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org,
Sujith Manoharan, nbd-p3rKhJxN3npAfugRpC6u6w@public.gmane.org,
linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
ath9k-devel-xDcbHBWguxHbcTqmT+pZeQ@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
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-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Sure.
Luis
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 5/8] drivers/net/bnx2x: use ARRAY_SIZE macro in bnx2x_main.c
2010-09-08 21:20 ` [PATCH 5/8] drivers/net/bnx2x: use ARRAY_SIZE macro in bnx2x_main.c Nikitas Angelinas
@ 2010-09-10 4:56 ` David Miller
0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2010-09-10 4:56 UTC (permalink / raw)
To: nikitasangelinas; +Cc: eilong, dmitry, yanivr, netdev, linux-kernel
From: Nikitas Angelinas <nikitasangelinas@gmail.com>
Date: Wed, 8 Sep 2010 22:20:37 +0100
> Replace sizeof(bnx2x_parity_mask)/(sizeof(bnx2x_parity_mask[0]) with
> ARRAY_SIZE(bnx2x_parity_mask) in drivers/net/bnx2x/bnx2x_main.c
>
> Signed-off-by: Nikitas Angelinas <nikitasangelinas@gmail.com>
Applied, thank you.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-09-10 4:56 UTC | newest]
Thread overview: 5+ 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:20 ` [PATCH 5/8] drivers/net/bnx2x: use ARRAY_SIZE macro in bnx2x_main.c Nikitas Angelinas
2010-09-10 4:56 ` David Miller
2010-09-08 21:25 ` [PATCH 6/8] drivers/net/wireless/ath/ath9k: use ARRAY_SIZE macro in ani.c Nikitas Angelinas
[not found] ` <1283981142-5062-1-git-send-email-nikitasangelinas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-09-08 21:31 ` Luis R. Rodriguez
2010-09-08 21:29 ` [PATCH 8/8] net/wireless: use ARRAY_SIZE macro in radiotap.c Nikitas Angelinas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).