[U-Boot] Checkpatch warnings for "volatile"

Jason u-boot at lakedaemon.net
Fri Oct 14 15:12:45 CEST 2011


Prabhakar,

On Wed, Oct 12, 2011 at 04:05:57PM +0530, Prabhakar Lad wrote:
> The checkpatch complains for volatile  keyword,

Just to make sure [1], since there is a lot of misunderstanding regarding
volatile.

> if "volatile" is necessary and cannot be removed,

Please see [2], people are more inclined to help if you provide the code
and the warning.  Stating what research you've already done is helpful
as well.

> Is it necessary to inform in  the cover letter or the patch itself
> stating that these warnings should be neglected ?

Assuming you've read [1] and [2] and it is indeed a valid use of
volatile, I would put it in the comment area of the patch email, eg:

---

Notes:

	1.) checkpatch.pl complained about volatile in source.c:312.  This is
       a register we bitbang in a loop and we don't want the compiler
       optimizing it out.

diff...


hth,

Jason.

[1]
http://www.mjmwired.net/kernel/Documentation/volatile-considered-harmful.txt
[2] http://catb.org/~esr/faqs/smart-questions.html


More information about the U-Boot mailing list