[U-Boot] Checkpatch warnings for "volatile"

Wolfgang Denk wd at denx.de
Fri Oct 14 23:24:18 CEST 2011


Dear Jason,

In message <20111014202224.GI7102 at titan.lakedaemon.net> you wrote:
> 
> > > 	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.
> > 
> > This would, in almost all cases, trigger a NAK due to the fact that
> > device register accesses should be done through I/O accesors, and
> > never through volatile pointers.
> 
> very true, I was attempting to give a generic example.  Sorry if that
> led to any confusion.

I've explained this a number of times recently - there are actually
very, very few occasions where "volatile" actually makes sense.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Conceptual integrity in turn dictates that the  design  must  proceed
from  one  mind,  or  from  a  very small number of agreeing resonant
minds.               - Frederick Brooks Jr., "The Mythical Man Month" 


More information about the U-Boot mailing list