lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <75b57c110705231027l4d0aeca5u778cb907dbd7c814@mail.gmail.com>
Date:	Wed, 23 May 2007 13:27:11 -0400
From:	"Gerb Stralko" <gerb.stralko@...il.com>
To:	rmk+lkml@....linux.org.uk
Cc:	"Linux Kernel" <linux-kernel@...r.kernel.org>
Subject: [PATCH] ARM/ARM26 Cleanup, using ARRAY_SIZE

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

Signed-off-by: Jerry Stralko <gerb.stralko@...il.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);
        }
 }
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ