Re: [PATCH v2 13/27] staging: unisys: visorbus: Make visordriver_callback_lock a mutex

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 31 May 2016, David Kershner wrote:

> From: Bryan Thompson <bryan.thompson@xxxxxxxxxx>
> 
> visordriver_callback_lock is just a binary semaphore that logically
> makes more sense as a mutex.
> 
> Signed-off-by: Bryan Thompson <bryan.thompson@xxxxxxxxxx>
> Signed-off-by: David Kershner <david.kershner@xxxxxxxxxx>
> Reviewed-by: Tim Sell <Timothy.Sell@xxxxxxxxxx>
> ---
>  drivers/staging/unisys/include/visorbus.h       |  3 ++-
>  drivers/staging/unisys/visorbus/visorbus_main.c | 10 +++++-----
>  2 files changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/staging/unisys/include/visorbus.h b/drivers/staging/unisys/include/visorbus.h
> index 9bb88bb..9da25c0 100644
> --- a/drivers/staging/unisys/include/visorbus.h
> +++ b/drivers/staging/unisys/include/visorbus.h
> @@ -161,7 +161,8 @@ struct visor_device {
>  	struct timer_list timer;
>  	bool timer_active;
>  	bool being_removed;
> -	struct semaphore visordriver_callback_lock;
> +	/* mutex to serialize visor_driver function callbacks */

TBH. I hate these kind of comments. The mutex name is self explaining, right?
I rather wish you would have spent time documenting the non obvious parts of
the code.

Thanks,

	tglx
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux