[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
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v3 0/2] bitops patches, Blue Swirl, 2012/07/14
- [Qemu-devel] [PATCH v3 1/2] bitops: drop volatile qualifier, Blue Swirl, 2012/07/14
- [Qemu-devel] [PATCH v3 2/2] bitops: fix types, Blue Swirl, 2012/07/14
- Re: [Qemu-devel] [PATCH v3 2/2] bitops: fix types, Avi Kivity, 2012/07/16
- Re: [Qemu-devel] [PATCH v3 2/2] bitops: fix types, Peter Maydell, 2012/07/16
- Re: [Qemu-devel] [PATCH v3 2/2] bitops: fix types, Markus Armbruster, 2012/07/17
- Re: [Qemu-devel] [PATCH v3 2/2] bitops: fix types, Blue Swirl, 2012/07/23
- Re: [Qemu-devel] [PATCH v3 2/2] bitops: fix types, Peter Maydell, 2012/07/23
- Re: [Qemu-devel] [PATCH v3 2/2] bitops: fix types, Markus Armbruster, 2012/07/24
- Re: [Qemu-devel] [PATCH v3 2/2] bitops: fix types, Blue Swirl, 2012/07/24