From: Jim Paris <jim@jtan.com>
To: Daniel Jacobowitz <dan@debian.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
"Bradley D. LaRonde" <brad@ltc.com>,
Ralf Baechle <ralf@oss.sgi.com>,
Linux/MIPS Development <linux-mips@oss.sgi.com>
Subject: Re: PATCH: io.h remove detrimental do {...} whiles, add sequence points, add const modifiers
Date: Fri, 7 Dec 2001 13:04:33 -0500 [thread overview]
Message-ID: <20011207130433.A3806@neurosis.mit.edu> (raw)
In-Reply-To: <20011207123833.A23784@nevyn.them.org>; from dan@debian.org on Fri, Dec 07, 2001 at 12:38:33PM -0500
> > > #define set_io_port_base(base) \
> > > - do { * (unsigned long *) &mips_io_port_base = (base); } while (0)
> > > + *(unsigned long *)&mips_io_port_base = (base);
>
> If Bradley loses the extra semicolon, what other problem is the
> do/while construct supposed to address? I seem to recall there being
> another problem case, but I can't remember what it is.
For that particular #define, I can't think of any problem cases. The
do/while helps with multiple statements, gives you a new scope for
variable declaration, and allows the code to do a break, but we don't
need any of that here.
-jim
next prev parent reply other threads:[~2001-12-07 19:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-07 17:14 PATCH: io.h remove detrimental do {...} whiles, add sequence points, add const modifiers Bradley D. LaRonde
2001-12-07 17:30 ` Geert Uytterhoeven
2001-12-07 17:38 ` Daniel Jacobowitz
2001-12-07 18:04 ` Jim Paris [this message]
2001-12-07 18:06 ` Ralf Baechle
2001-12-07 18:15 ` Jim Paris
2001-12-07 19:36 ` Justin Carlson
2001-12-07 19:43 ` Jim Paris
2001-12-07 20:23 ` Bradley D. LaRonde
2001-12-07 20:23 ` Bradley D. LaRonde
2001-12-07 20:44 ` Justin Carlson
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=20011207130433.A3806@neurosis.mit.edu \
--to=jim@jtan.com \
--cc=brad@ltc.com \
--cc=dan@debian.org \
--cc=geert@linux-m68k.org \
--cc=linux-mips@oss.sgi.com \
--cc=ralf@oss.sgi.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox