From nobody Tue Apr 7 05:42:50 2026 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BAC5A371CFA for ; Sun, 15 Mar 2026 17:06:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773594407; cv=none; b=qvcK2gEt+mMX7/3CjnhH9y2nkRnggNlLtlcQqfP8akzTc2g5sL3y2/tDEZzy5Qo6Gvb3G4cP61kYv+o4z7bw5buSrl2nYMvivwDh9bIbxlQ42t1Z7uSRIBnQONrRiZvMO2f3GeHyWJPlUy+r7kLbnNHjErYS+mu/qUBqEbkUafM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773594407; c=relaxed/simple; bh=HWa/1Nd3KstykfM1F0qL/ax2EKg59QUTP2h4BKzh1sI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=s4Y8cdD+f/lIIc1H0iRfgeWG+lDTVlFjImJI5JE7X8Wi+VAMuT/bK5pBjwEYnqJzimKu+BGsapHkyr+pTUxeLkDHGEpJ35GJ0rnTuL6bP/TrwhbQxKtV46edSU8SgHnr21En/IOcJBs98UNDeHZfb/H2h0lZuw+49tjmdLWxZFo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=JKzuVlhP; arc=none smtp.client-ip=209.85.128.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JKzuVlhP" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-4852b81c73aso33533075e9.3 for ; Sun, 15 Mar 2026 10:06:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773594404; x=1774199204; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=70K/jXTqjKva1WrU3OIkwUbaoc+5tgMJDmiLGmjO9TY=; b=JKzuVlhPSJPDXUEvnxDlRoykcMTrl98YXI2W1UJc8w4RnklcCS8wRcxQ011BdxiqPS OBAkTAEczW4NkbodQXfU2tVQmW0yo3W3wraMk3VIeyHQm2pjfUo+HnSYWGr3G2OunDnZ Panp5vbCC6YdWlyP9Ua2RE1ZNZgtdc1N6HvJFLPisx902dVWPux/HJCd4un97e0HUrkU 8fFRlFpteXAsqjelMVvoYLTlFBEICMbV321p+uugCie3ooJsJorK2hpPr7JUaa8bombR EfyFOW01v9aPvNHp1pNL95v6hgn0SS/bPlqNMt7RILtNbPAAUPzCoZaSswgP5cqAe3jU 04jA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773594404; x=1774199204; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=70K/jXTqjKva1WrU3OIkwUbaoc+5tgMJDmiLGmjO9TY=; b=GfC1Sh9TGHBID/Hn2fFsbWgGIOtFmduXpicb9zZ7Lq8pb50omS0Yvzmvl0JHq945Co vvjHkpS45/0CZaOBF7IydtCATTcx9UGYgbxAAcWcIjuBuTHIknWYDkjD/BBSCTsEXhXs mGUClZJJk8gxd2uRg/ZDf3m7jd7CvUH5fEUZzEQpWSIFyktIoOAg7JNdtNxDIJbucfPF qRpnt6aFcVFbDQY9MSdB6qj83viQukcJDTV+vjgycN2yuFb+FW96RQaRKR+nDl9D/AKV Iz66RjnD0+7hiwgrNfl0RZ8QB92GZPfudM6kJFfSK6XsVARreaAJd0sEWFxaTUz+TwhH gm/g== X-Forwarded-Encrypted: i=1; AJvYcCX1iG2B44hM23Cbd7tjZ/NiZHIsZESGwcp8Z36Q0oO1ofrkLGKNSbly4CqzFrAPk0FgtVfrIxXwTg317uE=@vger.kernel.org X-Gm-Message-State: AOJu0YwjVgtv9LbnkA+UGWltuCixzoOeLJts3wzzboY6Atz9duNp6BXu v4RNlDzotk14CrGNBXQlGzqd2Mk3TtAV9u61mXOeRiVtE4oKhkyFJF/y X-Gm-Gg: ATEYQzwvWpwHV0TFKRqA9AKfq99pNvfrCQgH7JK1Zl8vcV1cGMUtVE5/VYE+2TZSr7g J+pQ8NnVQ+mkTAHJYV4HN4lhg5SwZ1I7QFNBC4PIch1pDUSoteQsbkKNNLOhOQHfsOecuZJU0g6 f8QgVjqvhpX6X83meMmPNqYGnjZbkD4KSuaybnpmQwHgRK0J/qylA+XSJ8Nmny0YxLRxMdr904X 4OK/SW3+0TODWukBeYupg5ExeKZd/WpejTqFrf1BYO6KI+mEzgwgIofF2t5qk5I/K53D2VhzOub 9oUpfIZriOysOLQND6CBs9gv7O0BVS/nJaV2KNOeLWL3MDLGdwdq9ihY+MpNunlku5Zu9WJl3HC +av7pNNeZFkos8YvbKaUlchexRAmD1wUTupk+4tdeUayO9+GYTrk5+VZfzQSUABHHBeZxwcqn2C Wi08MsckLBZFkT33/0ZlkK/COhjKaHZDSH5IJgk094pSsZn+GwqK8pg3lL00wDXcOEHuAn27lBC zY6ZY1L/ZjVoa6SmFcYc2AVAeD73A== X-Received: by 2002:a05:600c:4689:b0:477:9b35:3e49 with SMTP id 5b1f17b1804b1-485566cf80dmr167876495e9.3.1773594404020; Sun, 15 Mar 2026 10:06:44 -0700 (PDT) Received: from DESKTOP-TILNSD1.localdomain ([139.47.104.103]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48557777105sm119905905e9.4.2026.03.15.10.06.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Mar 2026 10:06:43 -0700 (PDT) From: Kit Dallege To: Kent Overstreet Cc: linux-bcachefs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] closures: add missing kernel-doc for closure API functions Date: Sun, 15 Mar 2026 18:06:34 +0100 Message-ID: <20260315170634.64804-1-xaum.io@gmail.com> X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Document all missing parameters across 9 functions and macros: closure_sync(), closure_get(), closure_get_not_zero(), closure_wake_up(), continue_at(), closure_return(), continue_at_nobarrier(), closure_return_with_destructor(), and closure_call(). Also fix a duplicated word in the closure_sync() description. Assisted-by: Claude:claude-opus-4-6 Signed-off-by: Kit Dallege --- include/linux/closure.h | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/include/linux/closure.h b/include/linux/closure.h index 880fe85e35e9..12f44945a523 100644 --- a/include/linux/closure.h +++ b/include/linux/closure.h @@ -180,7 +180,8 @@ static inline unsigned closure_nr_remaining(struct clos= ure *cl) } =20 /** - * closure_sync - sleep until a closure a closure has nothing left to wait= on + * closure_sync - sleep until a closure has nothing left to wait on + * @cl: closure to wait on * * Sleeps until the refcount hits 1 - the thread that's running the closur= e owns * the last refcount. @@ -272,6 +273,7 @@ static inline void closure_queue(struct closure *cl) =20 /** * closure_get - increment a closure's refcount + * @cl: closure to increment the refcount of */ static inline void closure_get(struct closure *cl) { @@ -286,7 +288,8 @@ static inline void closure_get(struct closure *cl) } =20 /** - * closure_get_not_zero + * closure_get_not_zero - increment a closure's refcount if non-zero + * @cl: closure to increment the refcount of */ static inline bool closure_get_not_zero(struct closure *cl) { @@ -341,6 +344,7 @@ static inline void closure_init_stack_release(struct cl= osure *cl) /** * closure_wake_up - wake up all closures on a wait list, * with memory barrier + * @list: wait list to wake up */ static inline void closure_wake_up(struct closure_waitlist *list) { @@ -356,8 +360,11 @@ static inline void closure_wake_up(struct closure_wait= list *list) =20 /** * continue_at - jump to another function with barrier + * @_cl: closure to set the continuation on + * @_fn: function to resume execution at + * @_wq: workqueue to run @_fn out of (or NULL for synchronous) * - * After @cl is no longer waiting on anything (i.e. all outstanding refs h= ave + * After @_cl is no longer waiting on anything (i.e. all outstanding refs = have * been dropped with closure_put()), it will resume execution at @fn runni= ng out * of @wq (or, if @wq is NULL, @fn will be called by closure_put() directl= y). * @@ -375,8 +382,9 @@ do { \ =20 /** * closure_return - finish execution of a closure + * @_cl: closure to return from * - * This is used to indicate that @cl is finished: when all outstanding ref= s on + * This is used to indicate that @_cl is finished: when all outstanding re= fs on * @cl have been dropped @cl's ref on its parent closure (as passed to * closure_init()) will be dropped, if one was specified - thus this can be * thought of as returning to the parent closure. @@ -387,8 +395,11 @@ void closure_return_sync(struct closure *cl); =20 /** * continue_at_nobarrier - jump to another function without barrier + * @_cl: closure to set the continuation on + * @_fn: function to resume execution at + * @_wq: workqueue to run @_fn out of (or NULL for synchronous) * - * Causes @fn to be executed out of @cl, in @wq context (or called directl= y if + * Causes @_fn to be executed out of @_cl, in @_wq context (or called dire= ctly if * @wq is NULL). * * The ref the caller of continue_at_nobarrier() had on @cl is now owned b= y @fn, @@ -404,8 +415,10 @@ do { \ /** * closure_return_with_destructor - finish execution of a closure, * with destructor + * @_cl: closure to return from + * @_destructor: function to call when all refs are dropped * - * Works like closure_return(), except @destructor will be called when all + * Works like closure_return(), except @_destructor will be called when all * outstanding refs on @cl have been dropped; @destructor may be used to s= afely * free the memory occupied by @cl, and it is called with the ref on the p= arent * closure still held - so @destructor could safely return an item to a @@ -419,6 +432,10 @@ do { \ =20 /** * closure_call - execute @fn out of a new, uninitialized closure + * @cl: closure to initialize and run + * @fn: function to execute + * @wq: workqueue to run @fn out of (or NULL for synchronous) + * @parent: parent closure, @cl will take a refcount on it (may be NULL) * * Typically used when running out of one closure, and we want to run @fn * asynchronously out of a new closure - @parent will then wait for @cl to --=20 2.53.0