From patchwork Thu Aug 29 08:51:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen-Yu Tsai X-Patchwork-Id: 13782803 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 52906C83010 for ; Thu, 29 Aug 2024 08:57:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=+qPNG8Y3Tb15rLUaBWAZZ/ecrzt8HqGuiaoxCHg7qJs=; b=UVHV36DDB3Af9EgN94izEfF0Yr hah7G2ctA7rW5E6GKfvrnvvCo06L69tzEKrNh8mu23uunreq0TtEcdkWVcWqQmLoM0M+YKSba3n+H P/axDBCn6FFUlcwHyJpp48rU46kD0Y+19apMiBLmtAAiHIm/fqOPondyrnvYfYJkh4vv+lbctCL+W GY8UH61woFvh04vFkfKaA42Z8ax4h34K3rGNVx2XKuYvVpIcXe+5UxMaqXl/YHsmJRGBntiMcu5xK +cgC5BlQO8y/F2fif6GqKX785UpK1RX5x8EYVC9O5FB2EiuwF9NWnfRZyh/rutGxj8zF0AhiUJShL dobNLTvg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjaxj-00000001FWs-16ht; Thu, 29 Aug 2024 08:57:03 +0000 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjasp-00000001DrC-3tjn for linux-arm-kernel@lists.infradead.org; Thu, 29 Aug 2024 08:52:01 +0000 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-2021c08b95cso11600855ad.0 for ; Thu, 29 Aug 2024 01:51:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724921519; x=1725526319; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+qPNG8Y3Tb15rLUaBWAZZ/ecrzt8HqGuiaoxCHg7qJs=; b=iJkT+bIPw54XbR1LUC9u0KSECgkkdcAeDtdAGCrBGZSVu4MRL7+50EroAaldS4hEeu Q09G2vlyIHXBB6IKkeyJNK+z/QVxVd0ftPZOZ6KNuLuUe9HCVMoflae0NtVqsLKAeraR vcXFhoNKVMp6vc50o/Dp0vRYZB9mylaH4mqak= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724921519; x=1725526319; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+qPNG8Y3Tb15rLUaBWAZZ/ecrzt8HqGuiaoxCHg7qJs=; b=YhYjAM6Mal2tFUKSfdM4o/p17gX2V40JPZp93OiHyTyG8ME03C4WHxrwY3pmJ2F/zE I0fpBVoCeJ98PXcqrcRReMbf5OsCi0szKSJRfcvvotzfV3ipdpiTXBBdszaZcHQm6Ul0 or8vEMN9nYF7AYr5+WHmW2GbuYVitm2jvdHIrjwS5qqfEhbAjV4XwiiCKXMHwAhMsoUZ 8m+YRdBuQ02kxGjhW+81b2Lt0KyqR7m0vk4ieHgMTqqvRh6orwHypt3c2ObPKdWUn8fk fFSKayLh3smP+v4Y4hVWlCqWKN4Fhfm4jqyznK6FFQaueoc+eAqZ4YNoNA7ZNtt1yOUB CKzw== X-Forwarded-Encrypted: i=1; AJvYcCVPGVNfST5ApvEYZCW7a8nZ+05QZa0rIzaTY2pKjL0lWuUrNNvbxndtnSiGGKWZIC2OUK+KbhFnx5xmzhNDjWWD@lists.infradead.org X-Gm-Message-State: AOJu0Yyp/7ZRVwC+wnIBzZFH2sY/digqzCVodltZLg4LLjCJ9WNnDMCL z4xbJ50TJu8P9k01Q+57cPN5YIpkOw06R4cgyusoz48UCAt94MVxjrPGW/vkMA== X-Google-Smtp-Source: AGHT+IHniIg70zN8Mcbn6SOTtRLOmATPMt3xZKk81frTkXYpYHX5zq7/IMrglokTZFmgklGCVG2ZMA== X-Received: by 2002:a17:902:c402:b0:1fd:6ca4:f987 with SMTP id d9443c01a7336-2051675f88amr16164665ad.15.1724921519210; Thu, 29 Aug 2024 01:51:59 -0700 (PDT) Received: from wenstp920.tpe.corp.google.com ([2401:fa00:1:10:fbe5:6d6c:1cc7:23f3]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20515543fbdsm6924165ad.218.2024.08.29.01.51.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2024 01:51:58 -0700 (PDT) From: Chen-Yu Tsai To: Mark Brown , Liam Girdwood Cc: Chen-Yu Tsai , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Andy Shevchenko Subject: [PATCH v2 05/10] regulator: of: Fix incorrectly formatted kerneldoc "Return" sections Date: Thu, 29 Aug 2024 16:51:25 +0800 Message-ID: <20240829085131.1361701-6-wenst@chromium.org> X-Mailer: git-send-email 2.46.0.295.g3b9ea8a38a-goog In-Reply-To: <20240829085131.1361701-1-wenst@chromium.org> References: <20240829085131.1361701-1-wenst@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240829_015200_070426_FDF87D2B X-CRM114-Status: GOOD ( 18.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org kernel-doc complains about missing "Return" section for many documented functions in the regulator OF-specific code. These all have descriptions about the return values, just not in the format kernel-doc wants. Convert these to use the proper "Return:" section header. The existing descriptions have been reworded and moved around to fit the grammar and formatting. Signed-off-by: Chen-Yu Tsai --- Changes since v1: - Capitalized first word of first sentence in "Return" section - Added articles ("the", "a") to the description based on surrounding and function implementation context - s/alloc/allocation/ - s/error code/error number/ --- drivers/regulator/of_regulator.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c index d557f7b1ec7c..dfa9f42d4629 100644 --- a/drivers/regulator/of_regulator.c +++ b/drivers/regulator/of_regulator.c @@ -338,8 +338,10 @@ static int of_get_regulation_constraints(struct device *dev, * @desc: regulator description * * Populates regulator_init_data structure by extracting data from device - * tree node, returns a pointer to the populated structure or NULL if memory - * alloc fails. + * tree node. + * + * Return: Pointer to a populated &struct regulator_init_data or NULL if + * memory allocation fails. */ struct regulator_init_data *of_get_regulator_init_data(struct device *dev, struct device_node *node, @@ -391,7 +393,7 @@ static void devm_of_regulator_put_matches(struct device *dev, void *res) * in place and an additional of_node reference is taken for each matched * regulator. * - * Returns the number of matches found or a negative error code on failure. + * Return: The number of matches found or a negative error number on failure. */ int of_regulator_match(struct device *dev, struct device_node *node, struct of_regulator_match *matches, @@ -619,7 +621,7 @@ static bool of_coupling_find_node(struct device_node *src, * - all coupled regulators have the same number of regulator_dev phandles * - all regulators are linked to each other * - * Returns true if all conditions are met. + * Return: True if all conditions are met; false otherwise. */ bool of_check_coupling_data(struct regulator_dev *rdev) { @@ -690,8 +692,8 @@ bool of_check_coupling_data(struct regulator_dev *rdev) * "regulator-coupled-with" property * @index: Index in phandles array * - * Returns the regulator_dev pointer parsed from DTS. If it has not been yet - * registered, returns NULL + * Return: Pointer to the &struct regulator_dev parsed from DTS, or %NULL if + * it has not yet been registered. */ struct regulator_dev *of_parse_coupled_regulator(struct regulator_dev *rdev, int index)