From: Joe Perches <joe@perches.com>
To: "Robert P. J. Day" <rpjday@crashcourse.ca>
Cc: Jiri Slaby <jirislaby@gmail.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH] SERIAL: Simplify code using ARRAY_SIZE() macro.
Date: Sun, 25 May 2008 11:41:56 -0700 [thread overview]
Message-ID: <1211740916.8496.27.camel@localhost> (raw)
In-Reply-To: <alpine.LFD.1.10.0805251308420.25842@localhost.localdomain>
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.
next prev parent reply other threads:[~2008-05-25 18:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-25 11:37 [PATCH] SERIAL: Simplify code using ARRAY_SIZE() macro Robert P. J. Day
2008-05-25 16:50 ` Jiri Slaby
2008-05-25 17:09 ` Robert P. J. Day
2008-05-25 18:41 ` Joe Perches [this message]
2008-05-26 7:38 ` Robert P. J. Day
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=1211740916.8496.27.camel@localhost \
--to=joe@perches.com \
--cc=akpm@osdl.org \
--cc=jirislaby@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rpjday@crashcourse.ca \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.