[PATCH 6/7] Staging: bcm: Removes the volatile type definition from Adapter.h

Dan Carpenter dan.carpenter at oracle.com
Fri May 18 13:49:45 UTC 2012


On Fri, May 18, 2012 at 08:50:59AM -0400, Kevin McKinney wrote:
> This patch removes the following warning: "Use of
> volatile is usually wrong: see
> Documentation/volatile-considered-harmful.txt".
> There were two variables defined in this manner.
> 

Normally if someone uses volatile like this it means they wanted the
variable protected by a lock.  The changelog should have said
something about how the variable is protected againsts races.

In this case the first ->AppCtrlQueueLen is only used when the
->RxAppControlQueuelock samaphor is held.  The other variable gets
removed in the [PATCH 7/7] so it doesn't matter.

So the patch is fine.

regards,
dan carpenter




More information about the devel mailing list