| To: | "Bradley D. LaRonde" <brad@ltc.com> |
|---|---|
| Subject: | Re: PATCH: io.h remove detrimental do {...} whiles, add sequence points, add const modifiers |
| From: | Geert Uytterhoeven <geert@linux-m68k.org> |
| Date: | Fri, 7 Dec 2001 18:30:43 +0100 (MET) |
| Cc: | Ralf Baechle <ralf@oss.sgi.com>, Linux/MIPS Development <linux-mips@oss.sgi.com> |
| In-reply-to: | <20011207121416.A9583@dev1.ltc.com> |
| Sender: | owner-linux-mips@oss.sgi.com |
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...
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
|
| Previous by Date: | PATCH: io.h remove detrimental do {...} whiles, add sequence points, add const modifiers, Bradley D. LaRonde |
|---|---|
| Next by Date: | Re: PATCH: io.h remove detrimental do {...} whiles, add sequence points, add const modifiers, Daniel Jacobowitz |
| Previous by Thread: | PATCH: io.h remove detrimental do {...} whiles, add sequence points, add const modifiers, Bradley D. LaRonde |
| Next by Thread: | Re: PATCH: io.h remove detrimental do {...} whiles, add sequence points, add const modifiers, Daniel Jacobowitz |
| Indexes: | [Date] [Thread] [Top] [All Lists] |