qemu-devel
[Top][All Lists]
Advanced

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

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


From: Blue Swirl
Subject: Re: [Qemu-devel] [PATCH v3 1/2] bitops: drop volatile qualifier
Date: Mon, 23 Jul 2012 16:38:18 +0000

On Mon, Jul 16, 2012 at 2:40 PM, Eric Blake <address@hidden> wrote:
> 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?

That is close to reformatting, this is the usual way these days.

>
> --
> Eric Blake   address@hidden    +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
>



reply via email to

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