All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] e1000: Use ARRAY_SIZE macro when appropriate
@ 2007-03-06 16:58 Auke Kok
  2007-03-06 16:58 ` [PATCH 2/3] e1000: Use kcalloc() Auke Kok
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Auke Kok @ 2007-03-06 16:58 UTC (permalink / raw)
  To: jgarzik; +Cc: netdev, john.ronciak, jesse.brandeburg

From: Ahmed S. Darwish <darwish.07@gmail.com>

A patch to use ARRAY_SIZE macro already defined in kernel.h.

Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
---

 drivers/net/e1000/e1000_ethtool.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c
index 6777887..a094288 100644
--- a/drivers/net/e1000/e1000_ethtool.c
+++ b/drivers/net/e1000/e1000_ethtool.c
@@ -742,7 +742,7 @@ err_setup:
 	uint32_t pat, value;                                                   \
 	uint32_t test[] =                                                      \
 		{0x5A5A5A5A, 0xA5A5A5A5, 0x00000000, 0xFFFFFFFF};              \
-	for (pat = 0; pat < sizeof(test)/sizeof(test[0]); pat++) {              \
+	for (pat = 0; pat < ARRAY_SIZE(test); pat++) {              \
 		E1000_WRITE_REG(&adapter->hw, R, (test[pat] & W));             \
 		value = E1000_READ_REG(&adapter->hw, R);                       \
 		if (value != (test[pat] & W & M)) {                             \

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

end of thread, other threads:[~2007-03-09 17:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-06 16:58 [PATCH 1/3] e1000: Use ARRAY_SIZE macro when appropriate Auke Kok
2007-03-06 16:58 ` [PATCH 2/3] e1000: Use kcalloc() Auke Kok
2007-03-06 16:58 ` [PATCH 3/3] e1000: list e1000-devel mailing list in MAINTAINERS Auke Kok
2007-03-09 17:00 ` [PATCH 1/3] e1000: Use ARRAY_SIZE macro when appropriate Jeff Garzik

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.