All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: linux-ia64@vger.kernel.org
Subject: Re: [PATCH] altix: Add volatile qualifiers in places where it seems necessary
Date: Fri, 02 Sep 2005 19:21:34 +0000	[thread overview]
Message-ID: <jeu0h3ff7l.fsf@sykes.suse.de> (raw)
In-Reply-To: <20050902153612.8521.73623.91869@attica.americas.sgi.com>

Mark Maule <maule@sgi.com> writes:

> Index: volatile/include/asm-ia64/sn/io.h
> =================================> --- volatile.orig/include/asm-ia64/sn/io.h	2005-09-02 09:13:20.730793919 -0500
> +++ volatile/include/asm-ia64/sn/io.h	2005-09-02 12:35:33.897375370 -0500
> @@ -36,6 +36,13 @@
>  #define __sn_readq_relaxed ___sn_readq_relaxed
>  
>  /*
> + * Convenience macros for read/modify/write operations using above accessors
> + */
> +
> +#define __sn_rwq_relaxed(addr, op, val) \
> +	{uint64_t r = __sn_readq_relaxed(addr); r op (val); writeq(r, addr);}

The local variable should be renamed to something less likely to clash
with names used in the arguments.  The expansion should be surrounded by
do ... while(0) to make it a proper statement immune from the dangling
else problem.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

  parent reply	other threads:[~2005-09-02 19:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-02 15:36 [PATCH] altix: Add volatile qualifiers in places where it seems necessary Mark Maule
2005-09-02 15:38 ` Christoph Hellwig
2005-09-02 15:41 ` Mark Maule
2005-09-02 15:49 ` Christoph Hellwig
2005-09-02 15:52 ` Russ Anderson
2005-09-02 16:08 ` Mark Maule
2005-09-02 16:12 ` Christoph Hellwig
2005-09-02 18:53 ` Mark Maule
2005-09-02 19:21 ` Andreas Schwab [this message]
2005-09-02 19:57 ` Russ Anderson
2005-09-06 18:03 ` Mark Maule
2005-09-08 22:31 ` Luck, Tony
2005-09-09 20:19 ` Luck, Tony

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=jeu0h3ff7l.fsf@sykes.suse.de \
    --to=schwab@suse.de \
    --cc=linux-ia64@vger.kernel.org \
    /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.