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

Kevin McKinney klmckinney1 at gmail.com
Fri May 18 13:53:36 UTC 2012


On Fri, May 18, 2012 at 9:49 AM, Dan Carpenter <dan.carpenter at oracle.com> wrote:
> 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.

Yeah, good point; I confirmed the variable was indeed protected by
proper locking.  I will be sure to be more explicit in the changelog
next time.

Thanks,
Kevin



More information about the devel mailing list