Re: [PATCH 1/9] remove volatile keyword from clflush.

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

 



Glauber de Oliveira Costa wrote:
> the p parameter is an explicit memory reference, and is
> enough to prevent gcc to being nasty here. The volatile
> seems completely not needed.
>   

The usual reason for these types of "volatiles" is to make type checking
happier, since "volatile void *" is compatible with any argument you
might pass.  IOW, if you pass a plain "char *" then the compiler will
promote it to "volatile char *" and not complain, and passing an already
volatile pointer will be OK too.

The volatile isn't there to modify the generated code in any way.

    J
_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/virtualization

[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux