[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1211740916.8496.27.camel@localhost>
Date: Sun, 25 May 2008 11:41:56 -0700
From: Joe Perches <joe@...ches.com>
To: "Robert P. J. Day" <rpjday@...shcourse.ca>
Cc: Jiri Slaby <jirislaby@...il.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...l.org>
Subject: Re: [PATCH] SERIAL: Simplify code using ARRAY_SIZE() macro.
On Sun, 2008-05-25 at 13:09 -0400, Robert P. J. Day wrote:
> > > diff --git a/drivers/serial/68328serial.c b/drivers/serial/68328serial.c
> > > index bbf5bc5..71c56c1 100644
> > > --- a/drivers/serial/68328serial.c
> > > +++ b/drivers/serial/68328serial.c
> > > @@ -1413,10 +1413,10 @@ static void m68328_set_baud(void)
> > > USTCNT = ustcnt & ~USTCNT_TXEN;
> > >
> > > again:
> > > - for (i = 0; i < sizeof(baud_table) / sizeof(baud_table[0]); i++)
> > > + for (i = 0; i < BAUD_TABLE_SIZE); i++)
> > typo? does this compile?
> will resubmit.
There are only two uses of BAUD_TABLE_SIZE
and MCFRS_BAUD_TABLE_SIZE.
I think it better to avoid
#define SOME_SIZE ARRAY_SIZE(some_array)
and use ARRAY_SIZE(some_array) where possible.
NR_PORTS seems to be an exception.
--
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