All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v3 1/2] bitops: drop volatile qualifier
Date: Mon, 16 Jul 2012 08:40:10 -0600	[thread overview]
Message-ID: <500427CA.2050200@redhat.com> (raw)
In-Reply-To: <a018eb4364ad9ff83ad40fffba12e417b896cc96.1342269249.git.blauwirbel@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 870 bytes --]

On 07/14/2012 06:34 AM, Blue Swirl wrote:
> Qualifier 'volatile' is not useful for applications, it's too strict
> for single threaded code but does not give the real atomicity guarantees
> needed for multithreaded code.
> 
> Drop them and now useless casts.
> 

> -static inline void set_bit(int nr, volatile unsigned long *addr)
> +static inline void set_bit(int nr, unsigned long *addr)
>  {
>  	unsigned long mask = BIT_MASK(nr);
> -	unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr);
> +        unsigned long *p = addr + BIT_WORD(nr);

The diff looks weird, because you are converting TAB to space on your
affected lines but not cleaning up the neighboring lines.  Is it worth a
preliminary patch to whitespace-sanitize things?

-- 
Eric Blake   eblake@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 620 bytes --]

  parent reply	other threads:[~2012-07-16 14:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-14 12:34 [Qemu-devel] [PATCH v3 0/2] bitops patches Blue Swirl
2012-07-14 12:34 ` [Qemu-devel] [PATCH v3 1/2] bitops: drop volatile qualifier Blue Swirl
2012-07-14 12:36   ` Peter Maydell
2012-07-16 14:40   ` Eric Blake [this message]
2012-07-23 16:38     ` Blue Swirl
2012-07-14 12:34 ` [Qemu-devel] [PATCH v3 2/2] bitops: fix types Blue Swirl
2012-07-16 15:25   ` Avi Kivity
2012-07-16 15:34   ` Peter Maydell
2012-07-17 12:36     ` Markus Armbruster
2012-07-23 17:33       ` Blue Swirl
2012-07-23 17:44         ` Peter Maydell
2012-07-24  9:26           ` Markus Armbruster
2012-07-24 19:51             ` Blue Swirl

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=500427CA.2050200@redhat.com \
    --to=eblake@redhat.com \
    --cc=blauwirbel@gmail.com \
    --cc=qemu-devel@nongnu.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.