On Wed, Oct 22, 2014 at 05:52:25PM -0400, Erik Arfvidson wrote:
> This patch adds comment documentation to visorchannel_tag struct
> 
> Signed-off-by: Erik Arfvidson <erik.arfvid...@unisys.com>
> Signed-off-by: Benjamin Romer <benjamin.ro...@unisys.com>
> ---
>  drivers/staging/unisys/visorchannel/visorchannel_funcs.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c 
> b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
> index 01a44c5..48e28e3 100644
> --- a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
> +++ b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
> @@ -34,8 +34,8 @@ struct VISORCHANNEL_Tag {
>       uuid_le guid;
>       ulong size;
>       BOOL needs_lock;
> -     spinlock_t insert_lock;
> -     spinlock_t remove_lock;
> +     spinlock_t insert_lock; /* insert lock for visorchannel queue */
> +     spinlock_t remove_lock; /* remove lock for visorchannel queue */

The locking here is sort of weird and these comments aren't enough to
help me understand.

When is needs_lock true/false?  How can it possibly work with separate
remove/insert locks?  Doessn't that mean removing and inserting at the
same time is racy?

regards,
dan carpenter

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

Reply via email to