From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) (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 086FE258CCC for ; Sun, 15 Mar 2026 15:46:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773589582; cv=none; b=GPz6ZhAoaxqWkRkQvFXUPovdrcpA0xunGdkElQttI4DuaBLlyydVEFrHJBLWOl2NExLy+53FwIf4qKZ7bXuBbgvTGKIwiqKy26f7tI7FIitz7QaWzzD7MGdvjnXjcUQIcC99SO7F/Rra+f0sqpz9TLGZ0V/g1nMGG7TE7zhNyuQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773589582; c=relaxed/simple; bh=/4TxCRmAFVjj0HQMyo988GTmjzUI/GgwkZk6foJDDP8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=nuFR/1juqjEi52Di0t5xvvUThRaDN1oDE0dYQs9tzeY+MFAyLAZf03q5eLSWQmSSjZ0t+Nx1vov+XcT51eld0VvI1yx/pPlAn7UP8ljTt9J7p7IZWEqIyJjphsT6iKC7YjcoyMa8PXpGaRGp2+AGQBe787WEYyKDT8t4fynjb/s= 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=B0N8G9GV; arc=none smtp.client-ip=209.85.221.50 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="B0N8G9GV" Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-439bc14dcf4so3425823f8f.1 for ; Sun, 15 Mar 2026 08:46:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773589579; x=1774194379; 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=GHiZfFMU5597hEQav2iGD+pMwvYCiesjxK+AXpnt3o8=; b=B0N8G9GVIyxjAWhkxFvsfDaZ3T2MXZSLC/pK2nVFXavFbK5D7C5o946JVDKfkAtNAs p/FDZocIaUvB7lTWxLOkvrWygDBvFEsyIPOHeDC+ra0ElbcQDizKVEeVJUqLdx0hMdbW 8XkgpXVGmraOyrDIDLrA3DKuXihlFq/NncguRQpIqae1fYm/XTMTQ3NzuZpCUlPlT1oL kDAokObqB/LspjUkaY97ku2Q2zrs7rQQ7gC+VXFO4zHl5L2Q7GWpYa1xmLPEOcQSIfs+ JtOQkh+tTAkUMY6YBAOBmHR1hTgWrOfm0dohaQt1bRp3qfj3WG4DFzJ8CFd41NcAOq5b qTYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773589579; x=1774194379; 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=GHiZfFMU5597hEQav2iGD+pMwvYCiesjxK+AXpnt3o8=; b=LPsiUXTLz1U6vN5QTwbjgPRqbOR9mHTlBLMRg/X1ga1hgnyWOqPVmtWNYoB8bSsDbF xsjxePI8TpLGU3fbheMqPX6MZzomqE0cccu0y4VvVeWuwPcHjx1e2+Q+VEv7bGKNWJ4n WAqCnE9AiCL+ht508sZfOy17/EJOXn113NmoJ6YbzJdwVXwOOQVwvJFt9G0+EyS6K3C1 p8LRF7OuDHwYyhY7E2Bpl0bGRCV/abW0cSrROtbGw2HMUR2ug23glcMjSnw9qq33lKJu wzu87FMFY/i893iD5l+PXq+I6x62MP0ipXhCztJ8CcszydcDMnmwegi7Wu2epUbFwuJT yQGw== X-Forwarded-Encrypted: i=1; AJvYcCX1+sZW7trsjXF8My92HYoANWG39OfgnVBLSk38w38kacYDSrmDN3ACxrfi7Yi1dfJQzNHe/HSBiYWW3PU=@vger.kernel.org X-Gm-Message-State: AOJu0YzzcH5+i1irZyY3Q1sZ1jaK9+LlWlvVQEPM9V/OCjvKk2aDm08S 8cMfqxvVUiucpLRixb9cyX6yGnKwKV8MjLrX/nSpz3njKmmATTnf+plX X-Gm-Gg: ATEYQzzBmq6rtcTgHVqaDDeAzmi1bVSwW45Usvu3rTJDNVcgi8JB4UwUnzhL3cJoyHk UV7cOkEx0yC1Bvz6jFJj6v4Xma4he/lBtIbNJocVC9bTNNY4Up9zgliQ6PyCaXgrjVY8jhSwZdl c2uOl9H/gQpKMqSdL+fHyRFBlKPjM9BgmAv0P5DTNoYbskBwtvJ2mJWrPjRF6Xjj8VYxRjsfw7A Bw6gIolCaWDAE+e8r4sscD21FpcsiE9fsquIllumJwwKt6bbx6jgdcyZ9D/snLf0iZTytNJgns5 VTRYKLsVeVOGhnlMn2YPexDC1NqgI9W2PsqR56Y/T68wQc5w379FGTNh776cdDdJtu2li0NNfHQ bcE6SBNF++VSoDLV68ZwS0IOs11FfcBLgdcwqwKFdKr4Q6Wtm8cm5rZR/a5pgV+PTEq2JqYboC1 3QyvKGWWcsd+rjalEDTCDBVdjH08lunD+EGHWwZ7rDfLn4aN1FhCOImZzbTJZOQlwWF1jtQ4xBv U0GTfb91K5BCH33eaIWQDIGlfpKUw== X-Received: by 2002:a05:6000:2309:b0:43b:4166:b855 with SMTP id ffacd0b85a97d-43b4166ba79mr2927251f8f.14.1773589579328; Sun, 15 Mar 2026 08:46:19 -0700 (PDT) Received: from DESKTOP-TILNSD1.localdomain ([139.47.104.103]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43b43761bddsm2357954f8f.38.2026.03.15.08.46.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Mar 2026 08:46:18 -0700 (PDT) From: Kit Dallege To: Kent Overstreet Cc: linux-bcachefs@vger.kernel.org, linux-kernel@vger.kernel.org, Kit Dallege , Claude Subject: [PATCH 1/3] closures: add missing kernel-doc for closure API functions Date: Sun, 15 Mar 2026 16:46:09 +0100 Message-ID: <20260315154609.50917-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: 8bit 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 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 closure *cl) } /** - * 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 closure owns * the last refcount. @@ -272,6 +273,7 @@ static inline void closure_queue(struct closure *cl) /** * 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) } /** - * 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 closure *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_waitlist *list) /** * 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 have + * 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 running out * of @wq (or, if @wq is NULL, @fn will be called by closure_put() directly). * @@ -375,8 +382,9 @@ do { \ /** * closure_return - finish execution of a closure + * @_cl: closure to return from * - * This is used to indicate that @cl is finished: when all outstanding refs on + * This is used to indicate that @_cl is finished: when all outstanding refs 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); /** * 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 directly if + * Causes @_fn to be executed out of @_cl, in @_wq context (or called directly if * @wq is NULL). * * The ref the caller of continue_at_nobarrier() had on @cl is now owned by @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 safely * free the memory occupied by @cl, and it is called with the ref on the parent * closure still held - so @destructor could safely return an item to a @@ -419,6 +432,10 @@ do { \ /** * 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 -- 2.53.0