As you've marked this with the linux-device-driver
tag, some specific advice for coding within the Linux kernel is possibly in order.
In general, you shouldn't need to write volatile
in your Linux kernel code. In the cases where volatile
might be required, its use is wrapped in core kernel functions that you should call instead. For example, if you're doing memory-mapped I/O, then you should be using ioremap()
, writel()
, readl()
etc.