<br><br><div class="gmail_quote">On Fri, Oct 14, 2011 at 3:14 PM, rohan puri <span dir="ltr"><<a href="mailto:rohan.puri15@gmail.com">rohan.puri15@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br><br><div class="gmail_quote"><div><div></div><div class="h5">On Fri, Oct 14, 2011 at 2:51 PM, Prabhakar Lad <span dir="ltr"><<a href="mailto:prabhakar.csengg@gmail.com" target="_blank">prabhakar.csengg@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div class="h5">
Hi everyone,<br><br>I had question in want eradicate volatile from here: for example:<br><br><br> #define 0x01c40800<br><br><br> if ((volatile void *)pllbase == (volatile void *)DAVINCI_PLL_CNTRL0_BASE) /*<b>HERE</b>*/<br>
return 8;<br> else<br> return pll_div(pllbase, PLLC_PREDIV); <br><br><br>Thanks.<br><br><br>Regards<br><font color="#888888">--Prabhakar<br>
</font><br></div></div>_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org" target="_blank">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
<br></blockquote></div>Hi,<br><br>volatile keyword is make use of to enforce compiler that not to optimize the code that contains this qualifier.<br><br>In this case maybe any of the two compared values could be changed in an unknowing way to the compiler which are to be considered and no optimization is required, hence volatile keyword is made use of.<br>
<br>Regards,<br><font color="#888888">Rohan Puri<br>
</font><br></blockquote></div><br>Hi,<br><br>I think Prabhakar is referring to Documentation/volatile-considered-harmful.txt in the <br>Linux kernel source code and is hence trying to avoid volatile.. Am I right Prabhakar?<br>
<br>Regards,<br>Srivatsa S. Bhat<br>