lkml.org 
[lkml]   [2018]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] staging: pi433: add descriptions for mutex locks
From
Date
Hi Valentin,

could you please decribe in short words, why you think, that hte lock
isn't obsolete?

I wasn't sure, but close to remove the lock. That's why I putted the
comment.

Thanks,

Marcus

Am 23.03.2018 um 10:47 schrieb Valentin Vidic:
> Removes TODO for tx_fifo_lock as tx_fifo is modified from
> both pi433_tx_thread and pi433_write.
>
> Fixes checkpatch warning:
>
> CHECK: struct mutex definition without comment
>
> Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
> ---
> drivers/staging/pi433/pi433_if.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
> index d1e0ddbc79ce..f6f106a3ff8e 100644
> --- a/drivers/staging/pi433/pi433_if.c
> +++ b/drivers/staging/pi433/pi433_if.c
> @@ -87,7 +87,7 @@ struct pi433_device {
>
> /* tx related values */
> STRUCT_KFIFO_REC_1(MSG_FIFO_SIZE) tx_fifo;
> - struct mutex tx_fifo_lock; // TODO: check, whether necessary or obsolete
> + struct mutex tx_fifo_lock; /* serialize access to tx_fifo */
> struct task_struct *tx_task_struct;
> wait_queue_head_t tx_wait_queue;
> u8 free_in_fifo;
> @@ -100,7 +100,7 @@ struct pi433_device {
> u32 rx_bytes_to_drop;
> u32 rx_bytes_dropped;
> unsigned int rx_position;
> - struct mutex rx_lock;
> + struct mutex rx_lock; /* serialize read requests */
> wait_queue_head_t rx_wait_queue;
>
> /* fifo wait queue */
>

--
Smarthome-Wolf UG (haftungsbeschränkt)
Helene-Lange-Weg 23
80637 München
Amtsgericht München, HRB 223529
Umastzsteuer-ID: DE304719911
Geschäftsführer: Marcus Wolf

\
 
 \ /
  Last update: 2018-03-23 11:32    [W:0.077 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site