From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 367ECC433E7 for ; Tue, 13 Oct 2020 12:01:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D85962080A for ; Tue, 13 Oct 2020 12:01:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602590467; bh=hBdl3lIVj4oe9LNqfVXBf7iTw2vtsjwNz0H5DBowN7g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=G2AS5TSv6uH+7P9OQxu6fQaD9pugPww2bdqIuNXC1OaoUk7PQqBCu5/bfbgASEYMb Tg0CIuo1bBIBFstZlIZDDINrGBP168AP7NlJ9WYD1MPpS0DhZ+YRHu9y/BkWDxc1yc l+pwt2Lb9BnXECi9IjXJcDue11U1oiRfsobh26kw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728552AbgJMMAx (ORCPT ); Tue, 13 Oct 2020 08:00:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:58144 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727473AbgJMLym (ORCPT ); Tue, 13 Oct 2020 07:54:42 -0400 Received: from mail.kernel.org (ip5f5ad5b2.dynamic.kabel-deutschland.de [95.90.213.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C2C0C22384; Tue, 13 Oct 2020 11:54:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602590081; bh=hBdl3lIVj4oe9LNqfVXBf7iTw2vtsjwNz0H5DBowN7g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NR4vvpRDK31oV3OutaD555kjA5zix8kj3hXl2yNCQm9bDGef7raS82Ugm9xdq87iN uVJtNCHaR9/MAta6DPyPUEnfBpii89gXFED30z3htrXO4GuR/5CD4c6l4lEqcTV3nB y/K5g1rwQZC1B1O/SK3uGgcne39adCjZQVPCIT+8= Received: from mchehab by mail.kernel.org with local (Exim 4.94) (envelope-from ) id 1kSIt5-006CWG-Iu; Tue, 13 Oct 2020 13:54:39 +0200 From: Mauro Carvalho Chehab To: Linux Doc Mailing List Cc: Mauro Carvalho Chehab , "Jonathan Corbet" , Ard Biesheuvel , Ingo Molnar , Jann Horn , Kees Cook , Peter Zijlstra , Will Deacon , linux-kernel@vger.kernel.org Subject: [PATCH v6 66/80] locking/refcount: document the new "oldp" pointer value Date: Tue, 13 Oct 2020 13:54:21 +0200 Message-Id: X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: Mauro Carvalho Chehab Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Changeset a435b9a14356 ("locking/refcount: Provide __refcount API to obtain the old value") added a new parameter to most refcount functions, but didn't update the kernel-doc markups. Add a description for it on all touched functions. Fixes: a435b9a14356 ("locking/refcount: Provide __refcount API to obtain the old value") Signed-off-by: Mauro Carvalho Chehab --- include/linux/refcount.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/linux/refcount.h b/include/linux/refcount.h index 0e3ee25eb156..24c343bed889 100644 --- a/include/linux/refcount.h +++ b/include/linux/refcount.h @@ -151,6 +151,7 @@ static inline unsigned int refcount_read(const refcount_t *r) * refcount_add_not_zero - add a value to a refcount unless it is 0 * @i: the value to add to the refcount * @r: the refcount + * @oldp: if not NULL, stores the previous value of the refcount * * Will saturate at REFCOUNT_SATURATED and WARN. * @@ -184,6 +185,7 @@ static inline __must_check bool refcount_add_not_zero(int i, refcount_t *r) * refcount_add - add a value to a refcount * @i: the value to add to the refcount * @r: the refcount + * @oldp: if not NULL, stores the previous value of the refcount * * Similar to atomic_add(), but will saturate at REFCOUNT_SATURATED and WARN. * @@ -209,6 +211,7 @@ static inline void refcount_add(int i, refcount_t *r) /** * refcount_inc_not_zero - increment a refcount unless it is 0 * @r: the refcount to increment + * @oldp: if not NULL, stores the previous value of the refcount * * Similar to atomic_inc_not_zero(), but will saturate at REFCOUNT_SATURATED * and WARN. @@ -227,6 +230,7 @@ static inline __must_check bool refcount_inc_not_zero(refcount_t *r) /** * refcount_inc - increment a refcount * @r: the refcount to increment + * @oldp: if not NULL, stores the previous value of the refcount * * Similar to atomic_inc(), but will saturate at REFCOUNT_SATURATED and WARN. * @@ -245,6 +249,7 @@ static inline void refcount_inc(refcount_t *r) * refcount_sub_and_test - subtract from a refcount and test if it is 0 * @i: amount to subtract from the refcount * @r: the refcount + * @oldp: if not NULL, stores the previous value of the refcount * * Similar to atomic_dec_and_test(), but it will WARN, return false and * ultimately leak on underflow and will fail to decrement when saturated @@ -279,6 +284,7 @@ static inline __must_check bool refcount_sub_and_test(int i, refcount_t *r) /** * refcount_dec_and_test - decrement a refcount and test if it is 0 * @r: the refcount + * @oldp: if not NULL, stores the previous value of the refcount * * Similar to atomic_dec_and_test(), it will WARN on underflow and fail to * decrement when saturated at REFCOUNT_SATURATED. @@ -297,6 +303,7 @@ static inline __must_check bool refcount_dec_and_test(refcount_t *r) /** * refcount_dec - decrement a refcount * @r: the refcount + * @oldp: if not NULL, stores the previous value of the refcount * * Similar to atomic_dec(), it will WARN on underflow and fail to decrement * when saturated at REFCOUNT_SATURATED. -- 2.26.2