Skip to content

Commit

Permalink
sh: ARRAY_SIZE() cleanup
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alejandro Martinez Ruiz authored and Paul Mundt committed Oct 29, 2007
1 parent afca035 commit 767f0d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/sh/drivers/pci/pci-st40.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand All @@ -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)
{
Expand Down

0 comments on commit 767f0d6

Please sign in to comment.