]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
sh: ARRAY_SIZE() cleanup
authorAlejandro Martinez Ruiz <alex@flawedcode.org>
Wed, 24 Oct 2007 08:10:11 +0000 (17:10 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Mon, 29 Oct 2007 23:44:13 +0000 (08:44 +0900)
I'm converting most array size calculations under arch/ to use the
ARRAY_SIZE() macro. This is the (tiny) patch for sh.

Signed-off-by: Alejandro Martinez Ruiz <alex@flawedcode.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/drivers/pci/pci-st40.c

index 1502a14386b65cbc16d6af22571e09d8a982c84f..0814a5afe9b7e59430fcce8403c3044e6a604981 100644 (file)
@@ -114,7 +114,7 @@ static struct pci_err int_error[]={
   { INT_MWPDI,  "MWPDI: PERR from target at data write"},
   { INT_MRDPEI, "MRDPEI: Master read data parity error"}
 };
-#define NUM_PCI_INT_ERRS (sizeof(int_error)/sizeof(struct pci_err))
+#define NUM_PCI_INT_ERRS ARRAY_SIZE(int_error)
 
 static struct pci_err aint_error[]={
   { AINT_MBI,   "MBI: Master broken"},
@@ -126,7 +126,7 @@ static struct pci_err aint_error[]={
   { AINT_WDPE,  "WDPE: Write data parity"}
 };
 
-#define NUM_PCI_AINT_ERRS (sizeof(aint_error)/sizeof(struct pci_err))
+#define NUM_PCI_AINT_ERRS ARRAY_SIZE(aint_error)
 
 static void print_pci_errors(unsigned reg,struct pci_err *error,int num_errors)
 {