mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Gerb Stralko" <gerb.stralko@gmail.com>
To: rmk+lkml@arm.linux.org.uk
Cc: "Linux Kernel" <linux-kernel@vger.kernel.org>
Subject: [PATCH] ARM/ARM26 Cleanup, using ARRAY_SIZE
Date: Wed, 23 May 2007 13:27:11 -0400	[thread overview]
Message-ID: <75b57c110705231027l4d0aeca5u778cb907dbd7c814@mail.gmail.com> (raw)

Use the kernel wide ARRAY_SIZE when determining the array size of a struct.

Signed-off-by: Jerry Stralko <gerb.stralko@gmail.com>

---

diff --git a/arch/arm/kernel/dma-isa.c b/arch/arm/kernel/dma-isa.c
index 0a3e9ad..c94ad71 100644
--- a/arch/arm/kernel/dma-isa.c
+++ b/arch/arm/kernel/dma-isa.c
@@ -19,6 +19,7 @@
 #include <linux/ioport.h>
 #include <linux/init.h>
 #include <linux/dma-mapping.h>
+#include <linux/kernel.h>

 #include <asm/dma.h>
 #include <asm/io.h>
@@ -216,7 +217,7 @@ void __init isa_init_dma(dma_t *dma)

                request_dma(DMA_ISA_CASCADE, "cascade");

-               for (i = 0; i < sizeof(dma_resources) /
sizeof(dma_resources[0]); i++)
+               for (i = 0; i < ARRAY_SIZE(dma_resources); i++)
                        request_resource(&ioport_resource, dma_resources + i);
        }
 }

             reply	other threads:[~2007-05-23 17:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-23 17:27 Gerb Stralko [this message]
2007-05-23 18:10 ` Russell King
2007-05-23 18:48   ` Gerb Stralko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=75b57c110705231027l4d0aeca5u778cb907dbd7c814@mail.gmail.com \
    --to=gerb.stralko@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk+lkml@arm.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®