From: Daniel Jacobowitz <dan@debian.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "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 12:38:33 -0500 [thread overview]
Message-ID: <20011207123833.A23784@nevyn.them.org> (raw)
In-Reply-To: <Pine.GSO.4.21.0112071830000.29896-100000@mullein.sonytel.be>
On Fri, Dec 07, 2001 at 06:30:43PM +0100, Geert Uytterhoeven wrote:
> On Fri, 7 Dec 2001, Bradley D. LaRonde wrote:
> > 2001-12-07 Bradley D. LaRonde <brad@ltc.com>
> >
> > * remove detrimental do {...} whiles
> > * add sequence point to in[b,w,l] to prevent compiler from reordering
> > * add const modifier to outs[b,w,l] (quiets some compiler warnings)
> >
> >
> > --- linux-oss-2.4-2001-12-04/include/asm-mips/io.h Thu Dec 6 17:07:24 2001
> > +++ linux-patch/include/asm-mips/io.h Thu Dec 6 16:47:20 2001
> > @@ -63,7 +63,7 @@
> > extern const unsigned long mips_io_port_base;
> >
> > #define set_io_port_base(base) \
> > - do { * (unsigned long *) &mips_io_port_base = (base); } while (0)
> > + *(unsigned long *)&mips_io_port_base = (base);
>
> Now consider someone writing
>
> if (...)
> set_io_port_base(...);
> else
> ...
>
> And see what happens...
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.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2001-12-07 18:38 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 [this message]
2001-12-07 18:04 ` Jim Paris
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=20011207123833.A23784@nevyn.them.org \
--to=dan@debian.org \
--cc=brad@ltc.com \
--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 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.