[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 1/2] bitops: drop volatile qualifier

From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v3 1/2] bitops: drop volatile qualifier
Date: Mon, 16 Jul 2012 08:40:10 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1

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   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]