Skip to contentSkip to conversation

lib: fix incomplete comment in refcount_dec_and_lock_irqsave()

PATCH Superseded Miaohe Lin 2 participants 2 messages Sep 21, 2020 Library code

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Miaohe Lin

author
#0 lore raw

PATCH v2 1/1 lib: fix incomplete comment in refcount_dec_and_lock_irqsave()

The description of arg flags is incomplete. The flags is saved IRQ-flags when the @lock is acquired.

---
 lib/refcount.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/refcount.c +1 -1
index ebac8b7d15a7..dcfd092f66c7 100644
@@ -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
  *
  * Same as refcount_dec_and_lock() above except that the spinlock is acquired
  * with disabled interupts.
Signature · 1 line
2.19.1
Acked-by on v2 1/1
#1 lore raw
Quoted 13 lines · Miaohe Lin

The description of arg flags is incomplete. The flags is saved IRQ-flags when the @lock is acquired.

---
 lib/refcount.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/refcount.c +0 -0
index ebac8b7d15a7..dcfd092f66c7 100644

lib/refcount.c EXPORT_SYMBOL(refcount_dec_and_lock); · line 164

Quoted 5 lines
lib/refcount.c +1 -1
@@ -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:

Will