Re: [PATCH v2] lib: fix incomplete comment in refcount_dec_and_lock_irqsave()

From: Will Deacon
Date: Mon Sep 21 2020 - 07:31:50 EST


On Mon, Sep 21, 2020 at 07:23:58AM -0400, Miaohe Lin wrote:
> The description of arg flags is incomplete. The flags is saved IRQ-flags
> when the @lock is acquired.
>
> Signed-off-by: Miaohe Lin <linmiaohe@xxxxxxxxxx>
> ---
> lib/refcount.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/refcount.c b/lib/refcount.c
> index ebac8b7d15a7..dcfd092f66c7 100644
> --- a/lib/refcount.c
> +++ b/lib/refcount.c
> @@ -161,7 +161,7 @@ EXPORT_SYMBOL(refcount_dec_and_lock);
> * interrupts if able to decrement refcount to 0
> * @r: the refcount
> * @lock: the spinlock to be locked
> - * @flags: saved IRQ-flags if the is acquired
> + * @flags: saved IRQ-flags if the is @lock acquired

This still isn't quite right. If we go with:

@flags: saved IRQ-flags if @lock is acquired

then:

Acked-by: Will Deacon <will@xxxxxxxxxx>

Will