From patchwork Tue Aug 27 09:55:41 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: 13779217 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 39158C5320E for ; Tue, 27 Aug 2024 09:58:40 +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=ulSL1wDh1UXX6pfgOa+SdSJMLV52Cd+y6JQhndrl4/Y=; b=2eMOhH0S+kPnth9U0Y3LhN/AVH jnxwFFzK8rIr7gK0CMeGe0jl55yK4K4iI0kVIJDbg2gum15GWuKzp0dYY33xxVmdztdiTB98CS+9C IaZhsGmQB13gvQbSYtbh+GFuP9MjXSFUtV0Zlt6MqcjdibXnSmjlRAqcDIbsisM+CyNrfyVuw0ZxH zt6RZRN3gfqmNPHjm4p6uh6Lqs699GC4NTcwaf7eZMkIt1TFL35gl8EpuzKf/Ua2owSU9tBL4dzGg j1xkMKyvE7/t359/Mg+J/SYxxHSiFe4B6RkYKcgXCVyVK1779nJRYv/21WJcme8eqQVOnAkshaK8f tuYDy42Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sisy7-0000000AhGF-3ReV; Tue, 27 Aug 2024 09:58:31 +0000 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sisvh-0000000AgXD-0BRS for linux-arm-kernel@lists.infradead.org; Tue, 27 Aug 2024 09:56:02 +0000 Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-20227ba378eso47563595ad.0 for ; Tue, 27 Aug 2024 02:56:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724752560; x=1725357360; 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=ulSL1wDh1UXX6pfgOa+SdSJMLV52Cd+y6JQhndrl4/Y=; b=Lz871i79hXx1T8J8VKTrZFPNQq7yyttvFHGXXmSN9nDHXQouoC1saNHe3D6MmRjEZL KJ7w+apkOaA7jhVqwv7MqqufrNjmR20rbD3ZSBGK4xA7vFJuaPN1xIfhBTo6z7wcxbjL yuydGxod4IUUISxs0U8Z0g+HcwGvZ28gyf8tc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724752560; x=1725357360; 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=ulSL1wDh1UXX6pfgOa+SdSJMLV52Cd+y6JQhndrl4/Y=; b=wdLi8hYSF7WKJcIj9Grow0mITEUqUYvdHabFHkiw3vgpmSEJdgc4EeO0SjBmeoNOs8 1pcpN02Vg9Jea4hw9ZiV7bINvGrH/Tkyi83o9cxYyRaFiLoBoB/+pU8J0XUFV7OLC+AB PaGbiz5MICtdSjxQEBOR6v1Ab3+SLuD1qC0740nG66AvCRZiwa8ApxT3sfyq8TkRY8sG xmJxCihz9EbHnqJ0O3TfUNk/RJctGy/RRbIeMgvFHFqOQXpOAHlgQaXotBat7+03jyqN 5LQk/GPyVJpJn9eBVZHsxLw1jeHiFJ87D2eaI7ntlap35yuVPDhEFEseql54VZyq1sIe jtdw== X-Forwarded-Encrypted: i=1; AJvYcCWrOT5jZecZ5zBr2zEjGx2TNWganzrv5iUsDHnQ+5GDsGvtjNkat2G70/ILp/bZYV4uO25xe3ue/+QCow2CBmWP@lists.infradead.org X-Gm-Message-State: AOJu0YytnyBMe3/E8uMuzsindzSDqoJTWI54yL6N/zWluhDQjE8xalD9 tEqkRc/8rB3rtT4ZXLd2IS00La28vVIfBArzZon2t5z/HIgLT/fXy4Hay3YvtA== X-Google-Smtp-Source: AGHT+IHG3kC3TvoiL564c2nCrzUqffudLVZMezuiycIsHxkJQk5Y8znjAyFMUcZ+3HMMg+b6baVggA== X-Received: by 2002:a17:903:41d1:b0:202:54a5:deaf with SMTP id d9443c01a7336-2039e4fbd80mr184597195ad.57.1724752559745; Tue, 27 Aug 2024 02:55:59 -0700 (PDT) Received: from wenstp920.tpe.corp.google.com ([2401:fa00:1:10:3102:657e:87f4:c646]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2038560c2basm80006775ad.222.2024.08.27.02.55.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Aug 2024 02:55:59 -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 1/8] regulator: core: Fix short description for _regulator_check_status_enabled() Date: Tue, 27 Aug 2024 17:55:41 +0800 Message-ID: <20240827095550.675018-2-wenst@chromium.org> X-Mailer: git-send-email 2.46.0.295.g3b9ea8a38a-goog In-Reply-To: <20240827095550.675018-1-wenst@chromium.org> References: <20240827095550.675018-1-wenst@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240827_025601_100629_BC9F470A X-CRM114-Status: GOOD ( 13.52 ) 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 that _regulator_check_status_enabled() is missing a short description. Since the current description is already quite short, just trim it a bit more and use it as the short description. Fixes: f7d7ad42a9dc ("regulator: Allow regulators to verify enabled during enable()") Signed-off-by: Chen-Yu Tsai --- drivers/regulator/core.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 9029de5395ee..763048d6f1ed 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -2707,10 +2707,8 @@ static void _regulator_delay_helper(unsigned int delay) } /** - * _regulator_check_status_enabled - * - * A helper function to check if the regulator status can be interpreted - * as 'regulator is enabled'. + * _regulator_check_status_enabled - check if regulator status can be + * interpreted as "regulator is enabled" * @rdev: the regulator device to check * * Return: From patchwork Tue Aug 27 09:55:42 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: 13779218 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 AC2CEC5320E for ; Tue, 27 Aug 2024 09:59:30 +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=d5dITA99bOKmhMprOxuF3vZ8vny2EwMiPeFLCOo3XcY=; b=zHvk5ZgJT+p9lRrkoFZ3mJNemB T8pIV7wg6tmb8Ibthy0jw5dXsHLbzNiO0bfDr3EFK1jrjjnKVRIZNYFz7Hjge/wOspMK02iq7PLyl 3FEN0L5RdpbOffo/p17PsDHWevlCkWdnsWTSBR/HCHasmPdXUX9LudonkTad9zMN/6kd46tjCeXiG CZVflJBIdWj+qr0u2ukNSn9eC2UoAklpXCCpC8dA+fmHJ5K7yIMZfY9MEPw1T9tVev6uA+mBZgB3D h+z0/TkS5YNJSaFdQ8IVanAHqnG3lKf9Fsy8vhoRFetYGNXOEZ0n6IwmpYqRLKS20fSro4XoxybrO W0Myy2YA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sisyt-0000000AhR4-3PHt; Tue, 27 Aug 2024 09:59:19 +0000 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sisvi-0000000AgXw-2dxI for linux-arm-kernel@lists.infradead.org; Tue, 27 Aug 2024 09:56:03 +0000 Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-1fec34f94abso52850135ad.2 for ; Tue, 27 Aug 2024 02:56:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724752561; x=1725357361; 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=d5dITA99bOKmhMprOxuF3vZ8vny2EwMiPeFLCOo3XcY=; b=dsg+3mOLYY6OLWvpWrf4bfMw6fxEse4Cl85bKlmcSVHPLECjK3JiIsAFdPQ0FYz8KY DBRcQgFqGZbldD7le+9MZwvWSrnjbn2+mPAVR8uJjRoyabhkL/91kvTprCxMBJ74zUuF X+VvvgwN2Mu3kD4acq7Z71tTubJ7LmjALZieo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724752561; x=1725357361; 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=d5dITA99bOKmhMprOxuF3vZ8vny2EwMiPeFLCOo3XcY=; b=XTkQF2ttmvoYattmqRgIKAnM0yV+dqSwEzcOVuMnFe6gEEqyb5mYs9RGCzXpYifGQO d0B+TJxRVUqtASndBzo7KXIkPNqFivZ9n58vam+KJ8H566cNKCwZXRO9ubcaUmkv/Rrr pDuWcdxvbKaLnUn/SVQFKT5RRr5x7UnYxTZ+xVzXGdsVn8vkeD+QTnRQH2AyYrfXhYw2 dLqEHSiygGeFhlY3yPkYW7LAT2V6+nsxCF5xR2Vdjxh+k9A+/Vgg7p3VYZPPsaKkVlK6 CJu0kGqX32u98521MHjrVFan5lrIO60m41yvIIDBv1W4f206K5HxLCSKSRLrFuT3Cx7x EFoA== X-Forwarded-Encrypted: i=1; AJvYcCW2mqZGq8IC60UalTbY13aPBnZq/yecUEGDOLibn6VmqlWg4fmRpA3efOTlzLXXxiLGIscJ1/gxFHcpGH4W2EF4@lists.infradead.org X-Gm-Message-State: AOJu0YzSxvqgah3FYrM6nDB0xsmLH5/9Pvuxf8mlZL2ASb4TLhlXd015 GSLJKXFMXd4gPPz3egY/Y5poCW7EZTemfdFk9IUv75PMGa/YGhCDFpOY3EEQxw== X-Google-Smtp-Source: AGHT+IFxyh4Dh7I2pxOeTqe3BqQCexIZIRHzvyu5zz5qW6LwCSFvv6FVccQkTwPQyRBDrynayef2Cw== X-Received: by 2002:a17:902:e842:b0:1fb:90e1:c8c5 with SMTP id d9443c01a7336-2039e4b5193mr94212775ad.33.1724752561488; Tue, 27 Aug 2024 02:56:01 -0700 (PDT) Received: from wenstp920.tpe.corp.google.com ([2401:fa00:1:10:3102:657e:87f4:c646]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2038560c2basm80006775ad.222.2024.08.27.02.56.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Aug 2024 02:56:01 -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 2/8] regulator: core: Fix regulator_is_supported_voltage() kerneldoc return value Date: Tue, 27 Aug 2024 17:55:42 +0800 Message-ID: <20240827095550.675018-3-wenst@chromium.org> X-Mailer: git-send-email 2.46.0.295.g3b9ea8a38a-goog In-Reply-To: <20240827095550.675018-1-wenst@chromium.org> References: <20240827095550.675018-1-wenst@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240827_025602_689113_18D06436 X-CRM114-Status: GOOD ( 14.00 ) 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 The kerneldoc for regulator_is_supported_voltage() states that the return value is a boolean. That is not correct, as it could return an error number if the check failed. Fix the description by expanding it to cover the true, false and error conditions. The description is also converted to a proper "Return" section. Fixes: c5f3939b8fe0 ("regulator: core: Support fixed voltages in regulator_is_supported_voltage()") Signed-off-by: Chen-Yu Tsai --- drivers/regulator/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 763048d6f1ed..3a1b6fd9780d 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -3456,7 +3456,8 @@ EXPORT_SYMBOL_GPL(regulator_get_linear_step); * @min_uV: Minimum required voltage in uV. * @max_uV: Maximum required voltage in uV. * - * Returns a boolean. + * Return: 1 if voltage range is support, 0 if not, or error number if + * voltage can't be changed and voltage readback failed. */ int regulator_is_supported_voltage(struct regulator *regulator, int min_uV, int max_uV) From patchwork Tue Aug 27 09:55:43 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: 13779219 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 9058AC52D6F for ; Tue, 27 Aug 2024 10:00:21 +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=7LLSsNj3le8TWETIDzCV0x45IW45F1GT/zaPgv3xeew=; b=XP9yiXo0IkFFeFkll3fsuVg49D g/MqKWe/FErJaHr5I36QwN4EnTcA5bf2W4Zzgw2VereRGjbp+hfW5ENdwIMjd/r+l9XHZTr7VNZnn LQgagQHsshtMtBDv+uUqphdGNC4c/rqk7bvQHaN02ipkO4TQu+rv1hyWB5Jec5p5bP+H+csjMbXGN 2HVizyR5ZkfPWFeLBkWhPp8FjzR+zTndtRiKiHSma+oil9XB8cXizxQwIyxts5ymyXnSixNyeqk8p eSN6Y6D+RseATEtYyac/rzwiZKNz5g4Ugn/FUxNMY+Lp40QDf69XEBqqaRPgu9Z9O+bJP3DWmvmOQ qeWHL+7A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1siszg-0000000Ahh1-0cfV; Tue, 27 Aug 2024 10:00:08 +0000 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sisvk-0000000AgYf-2NCm for linux-arm-kernel@lists.infradead.org; Tue, 27 Aug 2024 09:56:06 +0000 Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-201fbd0d7c2so43046225ad.0 for ; Tue, 27 Aug 2024 02:56:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724752563; x=1725357363; 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=7LLSsNj3le8TWETIDzCV0x45IW45F1GT/zaPgv3xeew=; b=DHj+n9RSVOTXDhWHTRYgUtnoCSw4dOALczORV/FDC/6jm+pQTRSXQSy8hdHMYrIlQb UZ7rtoa78k6MxjQE/DN0fULmFiUkckHM1OUltuX8ZYNfNQZb5eKYdXMIYEBs6LUL2eTe cT0Ci2n9/dK/BfdyDZMZH0gCG0BopGdtL+XCc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724752563; x=1725357363; 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=7LLSsNj3le8TWETIDzCV0x45IW45F1GT/zaPgv3xeew=; b=BMagvfaqCCDIAH6EDOdfkYn9uLBYsQop76wNcMBxUENE363T4HlD/3GrTy+bNRcDs1 81WeDSPBuVuJ4L3CMY1z9hfM5K5qqLnoPTE1nzqYYs2nDiH8fGk9rxibNoGkVY+aRlmr 4NPYQKcvSnp2IF6Uhw92fg3bJ6THOm1/Mm9yrub3RYOmD/89lxCCIVLPROLKZnde+7qN bZZ9VKacrX2fGdmMpIb9+ZBKy4LEWNEVVqRRn3wrFqVpdnOSWlOHrJtvwPd+BO5qKfqU Ji1OUd1d9CaKLit/p/dc2X/XndNXdNjeXNs7bCXevULqSI9VVywJVljpRt2b7LwZuoZQ h4vw== X-Forwarded-Encrypted: i=1; AJvYcCV4YzQY5Ps6Uizqs7JxBnqdNFz3y+16VYy7zK8yNWMGA+Mhk3Yes7aZ77tetl4Ah59cvcjx+BpZ+tM4iik4m1bT@lists.infradead.org X-Gm-Message-State: AOJu0Yz/mzsLLUvfwpFtG42bozyfh9PpYGTKPJK8kUcJpP2opg6RrI8H lH3nXEmNZKoVuBcnmerozaEbL2gqg6nTHnqPCuc6vyRoVfDKZoTpQA8VrMhR1g== X-Google-Smtp-Source: AGHT+IHnP0UxGHShDudSxRf4EKVdCozcxdusgqEAENCL/YU2wzK66FdkoWkYdwQomaRjL9BY0Eb7tw== X-Received: by 2002:a17:902:c411:b0:203:a046:c676 with SMTP id d9443c01a7336-204ddfe8059mr21403475ad.0.1724752563346; Tue, 27 Aug 2024 02:56:03 -0700 (PDT) Received: from wenstp920.tpe.corp.google.com ([2401:fa00:1:10:3102:657e:87f4:c646]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2038560c2basm80006775ad.222.2024.08.27.02.56.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Aug 2024 02:56:03 -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 3/8] regulator: core: Fix incorrectly formatted kerneldoc "Return" sections Date: Tue, 27 Aug 2024 17:55:43 +0800 Message-ID: <20240827095550.675018-4-wenst@chromium.org> X-Mailer: git-send-email 2.46.0.295.g3b9ea8a38a-goog In-Reply-To: <20240827095550.675018-1-wenst@chromium.org> References: <20240827095550.675018-1-wenst@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240827_025604_639243_C36425B4 X-CRM114-Status: GOOD ( 31.10 ) 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 core. Many of them actually 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. In a few cases where the functions don't call even more functions and the error numbers are known, those are documented in detail. Signed-off-by: Chen-Yu Tsai --- drivers/regulator/core.c | 101 ++++++++++++++++++++++----------------- 1 file changed, 56 insertions(+), 45 deletions(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 3a1b6fd9780d..b1950cbc046a 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -427,8 +427,9 @@ static void regulator_lock_dependent(struct regulator_dev *rdev, * * Traverse all child nodes. * Extract the child regulator device node corresponding to the supply name. - * returns the device node corresponding to the regulator if found, else - * returns NULL. + * + * Return: pointer the &struct device_node corresponding to the regulator if found, + * or %NULL if not found. */ static struct device_node *of_get_child_regulator(struct device_node *parent, const char *prop_name) @@ -460,8 +461,9 @@ static struct device_node *of_get_child_regulator(struct device_node *parent, * @supply: regulator supply name * * Extract the regulator device node corresponding to the supply name. - * returns the device node corresponding to the regulator if found, else - * returns NULL. + * + * Return: pointer the &struct device_node corresponding to the regulator if found, + * or %NULL if not found. */ static struct device_node *of_get_regulator(struct device *dev, const char *supply) { @@ -2308,13 +2310,13 @@ struct regulator *_regulator_get(struct device *dev, const char *id, * @dev: device for regulator "consumer" * @id: Supply name or regulator ID. * - * Returns a struct regulator corresponding to the regulator producer, - * or IS_ERR() condition containing errno. - * * Use of supply names configured via set_consumer_device_supply() is * strongly encouraged. It is recommended that the supply name used * should match the name used for the supply and/or the relevant * device pins in the datasheet. + * + * Return: pointer to a &struct regulator corresponding to the regulator + * producer, or ERR_PTR() encoded negative error number. */ struct regulator *regulator_get(struct device *dev, const char *id) { @@ -2327,11 +2329,9 @@ EXPORT_SYMBOL_GPL(regulator_get); * @dev: device for regulator "consumer" * @id: Supply name or regulator ID. * - * Returns a struct regulator corresponding to the regulator producer, - * or IS_ERR() condition containing errno. Other consumers will be - * unable to obtain this regulator while this reference is held and the - * use count for the regulator will be initialised to reflect the current - * state of the regulator. + * Other consumers will be unable to obtain this regulator while this + * reference is held and the use count for the regulator will be + * initialised to reflect the current state of the regulator. * * This is intended for use by consumers which cannot tolerate shared * use of the regulator such as those which need to force the @@ -2342,6 +2342,9 @@ EXPORT_SYMBOL_GPL(regulator_get); * strongly encouraged. It is recommended that the supply name used * should match the name used for the supply and/or the relevant * device pins in the datasheet. + * + * Return: pointer to a &struct regulator corresponding to the regulator + * producer, or ERR_PTR() encoded negative error number. */ struct regulator *regulator_get_exclusive(struct device *dev, const char *id) { @@ -2354,9 +2357,6 @@ EXPORT_SYMBOL_GPL(regulator_get_exclusive); * @dev: device for regulator "consumer" * @id: Supply name or regulator ID. * - * Returns a struct regulator corresponding to the regulator producer, - * or IS_ERR() condition containing errno. - * * This is intended for use by consumers for devices which can have * some supplies unconnected in normal use, such as some MMC devices. * It can allow the regulator core to provide stub supplies for other @@ -2368,6 +2368,9 @@ EXPORT_SYMBOL_GPL(regulator_get_exclusive); * strongly encouraged. It is recommended that the supply name used * should match the name used for the supply and/or the relevant * device pins in the datasheet. + * + * Return: pointer to a &struct regulator corresponding to the regulator + * producer, or ERR_PTR() encoded negative error number. */ struct regulator *regulator_get_optional(struct device *dev, const char *id) { @@ -2507,12 +2510,12 @@ EXPORT_SYMBOL_GPL(regulator_unregister_supply_alias); * lookup the supply * @num_id: Number of aliases to register * - * @return 0 on success, an errno on failure. - * * This helper function allows drivers to register several supply * aliases in one operation. If any of the aliases cannot be * registered any aliases that were registered will be removed * before returning to the caller. + * + * Return: 0 on success or negative error number on failure. */ int regulator_bulk_register_supply_alias(struct device *dev, const char *const *id, @@ -2837,7 +2840,7 @@ static int _regulator_do_enable(struct regulator_dev *rdev) * responsible for keeping track of the refcount for a given regulator consumer * and applying / unapplying these things. * - * Returns 0 upon no error; -error upon error. + * Return: 0 on success or negative error number on failure. */ static int _regulator_handle_consumer_enable(struct regulator *regulator) { @@ -2863,7 +2866,7 @@ static int _regulator_handle_consumer_enable(struct regulator *regulator) * * The opposite of _regulator_handle_consumer_enable(). * - * Returns 0 upon no error; -error upon error. + * Return: 0 on success or negative error number on failure. */ static int _regulator_handle_consumer_disable(struct regulator *regulator) { @@ -3271,13 +3274,13 @@ static int _regulator_list_voltage(struct regulator_dev *rdev, * regulator_is_enabled - is the regulator output enabled * @regulator: regulator source * - * Returns positive if the regulator driver backing the source/client - * has requested that the device be enabled, zero if it hasn't, else a - * negative errno code. - * * Note that the device backing this regulator handle can have multiple * users, so it might be enabled even if regulator_enable() was never * called for this particular source. + * + * Return: positive if the regulator driver backing the source/client + * has requested that the device be enabled, zero if it hasn't, else a + * negative error number. */ int regulator_is_enabled(struct regulator *regulator) { @@ -3298,9 +3301,10 @@ EXPORT_SYMBOL_GPL(regulator_is_enabled); * regulator_count_voltages - count regulator_list_voltage() selectors * @regulator: regulator source * - * Returns number of selectors, or negative errno. Selectors are - * numbered starting at zero, and typically correspond to bitfields - * in hardware registers. + * Return: number of selectors for @regulator, or negative error number. + * + * Selectors are numbered starting at zero, and typically correspond to + * bitfields in hardware registers. */ int regulator_count_voltages(struct regulator *regulator) { @@ -3322,9 +3326,9 @@ EXPORT_SYMBOL_GPL(regulator_count_voltages); * @selector: identify voltage to list * Context: can sleep * - * Returns a voltage that can be passed to @regulator_set_voltage(), - * zero if this selector code can't be used on this system, or a - * negative errno. + * Return: voltage for @selector that can be passed to regulator_set_voltage(), + * 0 if @selector can't be used on this system, or a negative error + * number on failure. */ int regulator_list_voltage(struct regulator *regulator, unsigned selector) { @@ -3336,8 +3340,8 @@ EXPORT_SYMBOL_GPL(regulator_list_voltage); * regulator_get_regmap - get the regulator's register map * @regulator: regulator source * - * Returns the register map for the given regulator, or an ERR_PTR value - * if the regulator doesn't use regmap. + * Return: pointer to &struct regmap for @regulator, or ERR_PTR() + * encoded -%EOPNOTSUPP if @regulator doesn't use regmap. */ struct regmap *regulator_get_regmap(struct regulator *regulator) { @@ -3387,7 +3391,9 @@ EXPORT_SYMBOL_GPL(regulator_get_hardware_vsel_register); * directly written to the regulator registers. The address of the voltage * register can be determined by calling @regulator_get_hardware_vsel_register. * - * On error a negative errno is returned. + * Return: 0 on success, -%EINVAL if the selector is outside the supported + * range, or -%EOPNOTSUPP if the regulator does not support voltage + * selectors. */ int regulator_list_hardware_vsel(struct regulator *regulator, unsigned selector) @@ -3414,7 +3420,7 @@ EXPORT_SYMBOL_GPL(regulator_list_hardware_vsel); * Request that the regulator be enabled/disabled with the regulator output at * the predefined voltage or current value. * - * On success 0 is returned, otherwise a negative errno is returned. + * Return: 0 on success or negative error number on failure. */ int regulator_hardware_enable(struct regulator *regulator, bool enable) { @@ -3438,8 +3444,8 @@ EXPORT_SYMBOL_GPL(regulator_hardware_enable); * regulator_get_linear_step - return the voltage step size between VSEL values * @regulator: regulator source * - * Returns the voltage step size between VSEL values for linear - * regulators, or return 0 if the regulator isn't a linear regulator. + * Return: the voltage step size between VSEL values for linear regulators, + * or 0 if the regulator isn't a linear regulator. */ unsigned int regulator_get_linear_step(struct regulator *regulator) { @@ -4526,7 +4532,7 @@ EXPORT_SYMBOL_GPL(regulator_get_voltage_rdev); * regulator_get_voltage - get regulator output voltage * @regulator: regulator source * - * This returns the current regulator voltage in uV. + * Return: current regulator voltage in uV, or negative error number on failure. * * NOTE: If the regulator is disabled it will return the voltage value. This * function should not be used to determine regulator state. @@ -4610,7 +4616,8 @@ static int _regulator_get_current_limit(struct regulator_dev *rdev) * regulator_get_current_limit - get regulator output current * @regulator: regulator source * - * This returns the current supplied by the specified current sink in uA. + * Return: current supplied by the specified current sink in uA, + * or negative error number on failure. * * NOTE: If the regulator is disabled it will return the current value. This * function should not be used to determine regulator state. @@ -4778,7 +4785,7 @@ EXPORT_SYMBOL_GPL(regulator_get_error_flags); * If a regulator is an always-on regulator then an individual consumer's * load will still be removed if that consumer is fully disabled. * - * On error a negative errno is returned. + * Return: 0 on success or negative error number on failure. */ int regulator_set_load(struct regulator *regulator, int uA_load) { @@ -4963,12 +4970,12 @@ int _regulator_bulk_get(struct device *dev, int num_consumers, * @num_consumers: Number of consumers to register * @consumers: Configuration of consumers; clients are stored here. * - * @return 0 on success, an errno on failure. - * * This helper function allows drivers to get several regulator * consumers in one operation. If any of the regulators cannot be * acquired then any regulators that were allocated will be freed * before returning to the caller. + * + * Return: 0 on success or negative error number on failure. */ int regulator_bulk_get(struct device *dev, int num_consumers, struct regulator_bulk_data *consumers) @@ -4989,12 +4996,13 @@ static void regulator_bulk_enable_async(void *data, async_cookie_t cookie) * * @num_consumers: Number of consumers * @consumers: Consumer data; clients are stored here. - * @return 0 on success, an errno on failure * * This convenience API allows consumers to enable multiple regulator * clients in a single API call. If any consumers cannot be enabled * then any others that were enabled will be disabled again prior to * return. + * + * Return: 0 on success or negative error number on failure. */ int regulator_bulk_enable(int num_consumers, struct regulator_bulk_data *consumers) @@ -5038,12 +5046,13 @@ EXPORT_SYMBOL_GPL(regulator_bulk_enable); * * @num_consumers: Number of consumers * @consumers: Consumer data; clients are stored here. - * @return 0 on success, an errno on failure * * This convenience API allows consumers to disable multiple regulator * clients in a single API call. If any consumers cannot be disabled * then any others that were disabled will be enabled again prior to * return. + * + * Return: 0 on success or negative error number on failure. */ int regulator_bulk_disable(int num_consumers, struct regulator_bulk_data *consumers) @@ -5077,7 +5086,6 @@ EXPORT_SYMBOL_GPL(regulator_bulk_disable); * * @num_consumers: Number of consumers * @consumers: Consumer data; clients are stored here. - * @return 0 on success, an errno on failure * * This convenience API allows consumers to forcibly disable multiple regulator * clients in a single API call. @@ -5085,6 +5093,8 @@ EXPORT_SYMBOL_GPL(regulator_bulk_disable); * likely occur if the regulators are not disabled (e.g. over temp). * Although regulator_force_disable function call for some consumers can * return error numbers, the function is called for all consumers. + * + * Return: 0 on success or negative error number on failure. */ int regulator_bulk_force_disable(int num_consumers, struct regulator_bulk_data *consumers) @@ -5581,8 +5591,9 @@ static struct regulator_coupler generic_regulator_coupler = { * @cfg: runtime configuration for regulator * * Called by regulator drivers to register a regulator. - * Returns a valid pointer to struct regulator_dev on success - * or an ERR_PTR() on error. + * + * Return: pointer to valid &struct regulator_dev on success + * or ERR_PTR() encoded negative error number on failure. */ struct regulator_dev * regulator_register(struct device *dev, From patchwork Tue Aug 27 09:55:44 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: 13779222 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 5341CC52D6F for ; Tue, 27 Aug 2024 10:01:12 +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=sghYcwjnzdejWIjBpN1UzeYRtefjC2IMHo4HFLUj5uA=; b=LZItA2xoOAe9k/CF0qfHtes+uW w54PNuc57y6jTRLDT3R5IarB9J4dHAFwf6eeurP7DvbVyYAJsxdEWCIzBoXi6TtPtrICdR1dLp0zS kgXNFqxwM0hWEOaRhl90wM5IvDmO7vBAmC4O6MQ9LrQTD5T+TFN3XTXp91B7q9SVP+yexmfRw3mpn juS0gUTXb4hvR6OpZf6sTOo2ddwRMh/LOWU0eLJPtP3RbH69yS0UwF685+Q+aKJEO4GBDsAZZji9l EkmIY3WIORW2SvGf2xFT2/a+gsuCwsLg6dHKjJ7PGatr/zCR+fe/hAhNS+6ZUYzRHtiopVZaUTMs0 +I4/EBgg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sit0T-0000000Ai17-0R35; Tue, 27 Aug 2024 10:00:57 +0000 Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sisvm-0000000AgZA-34cj for linux-arm-kernel@lists.infradead.org; Tue, 27 Aug 2024 09:56:08 +0000 Received: by mail-pg1-x531.google.com with SMTP id 41be03b00d2f7-7cd8d2731d1so3461016a12.3 for ; Tue, 27 Aug 2024 02:56:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724752565; x=1725357365; 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=sghYcwjnzdejWIjBpN1UzeYRtefjC2IMHo4HFLUj5uA=; b=kC+lLA9MvJ0CK1afn6Yvt6gtldKPXp8NJx3GV2V7UMvUlx+AzPqgo7c/QXCKYLpa8l oCDxD0FBgKqfqJE4pohrTSpw6UsjbLJsXxReDb5I1697FG14TqkUfX17OWbO3Ad8+6tB qYdmsq/dMCv4VE9Z6TgNRuTtu04xwIDp26xEw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724752565; x=1725357365; 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=sghYcwjnzdejWIjBpN1UzeYRtefjC2IMHo4HFLUj5uA=; b=UFtPggbsk4o+IV89nIs5uuu0/QtPLK8K9Xw+aSePXK8xxXkHnxkot+jwOsfgYsA4Io KDkHarY1Y+v+rdNuSDk2PpprN4fn/nXuokXktVgh4IMAmMoI3xxI5nVbzKFAjNx4bpa1 MXLjVZ076EWMpZmXcPFFKPUu304TiVgopqL3tiFQvJyo7EaK/o8+3sYVB9Wpwxzz4Iro /84mJYU/Eyp62opVovRYmXSZjYKNBdloSieBtVmmICPLTLzBD1kr5H5nqwydwIePmejx ID2k81sP+AE1WtKSGX9cOmDBagW5SxCvLJDLTZgQgwNk8z2qJNuk1/XKsutL/oZAf1uT 12yQ== X-Forwarded-Encrypted: i=1; AJvYcCXpwhiCMYzvDbrmZN8LpqM50j5PFET/AroYuT926z8okGpez3JLeusGdMvOtnuSNWxJzemQet6jWDYqGtaaTbrs@lists.infradead.org X-Gm-Message-State: AOJu0YxtwTi5zGKSXWTEXT5Yv2kgYHBJsvbd6xqNKiaTAEIwp++Ji44U IthUSD41ebjLrMAti+qi5XKsaw8q5vu2fe015oORNFf51kgNW2aY38Wfu7ZX+w== X-Google-Smtp-Source: AGHT+IFjt2qwKKVbLe4sOBHHmEf4C7vlTf8mEf3uCumq5WKVMPiLmtrco3HnyLt+ixtp3ic1ZXph6A== X-Received: by 2002:a05:6a21:1192:b0:1c2:8efc:88e9 with SMTP id adf61e73a8af0-1cc8b58f912mr11509172637.40.1724752565164; Tue, 27 Aug 2024 02:56:05 -0700 (PDT) Received: from wenstp920.tpe.corp.google.com ([2401:fa00:1:10:3102:657e:87f4:c646]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2038560c2basm80006775ad.222.2024.08.27.02.56.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Aug 2024 02:56:04 -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 4/8] regulator: core: Add missing kerneldoc Return sections Date: Tue, 27 Aug 2024 17:55:44 +0800 Message-ID: <20240827095550.675018-5-wenst@chromium.org> X-Mailer: git-send-email 2.46.0.295.g3b9ea8a38a-goog In-Reply-To: <20240827095550.675018-1-wenst@chromium.org> References: <20240827095550.675018-1-wenst@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240827_025606_825552_37E546F3 X-CRM114-Status: GOOD ( 29.01 ) 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 core. Some with free-form return value descriptions have been fixed in the previous patch. The remaining are completely missing any mention of return values. Add "Return" sections to these kerneldoc blocks with basic descriptions. In a few cases where the functions don't call even more functions and the error numbers are known, those are documented in detail. Signed-off-by: Chen-Yu Tsai --- drivers/regulator/core.c | 65 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 63 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index b1950cbc046a..1f2303a2ba7b 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -139,6 +139,8 @@ static bool regulator_ops_is_valid(struct regulator_dev *rdev, int ops) * once. If a task, which is calling this function is other * than the one, which initially locked the mutex, it will * wait on mutex. + * + * Return: 0 on success or negative error number on failure. */ static inline int regulator_lock_nested(struct regulator_dev *rdev, struct ww_acquire_ctx *ww_ctx) @@ -1464,6 +1466,8 @@ static int handle_notify_limits(struct regulator_dev *rdev, * Constraints *must* be set by platform code in order for some * regulator operations to proceed i.e. set_voltage, set_current_limit, * set_mode. + * + * Return: 0 on success or negative error number on failure. */ static int set_machine_constraints(struct regulator_dev *rdev) { @@ -1702,6 +1706,8 @@ static int set_machine_constraints(struct regulator_dev *rdev) * Called by platform initialisation code to set the supply regulator for this * regulator. This ensures that a regulators supply will also be enabled by the * core if it's child is enabled. + * + * Return: 0 on success or negative error number on failure. */ static int set_supply(struct regulator_dev *rdev, struct regulator_dev *supply_rdev) @@ -1734,6 +1740,8 @@ static int set_supply(struct regulator_dev *rdev, * sources to symbolic names for supplies for use by devices. Devices * should use these symbolic names to request regulators, avoiding the * need to provide board-specific regulator names as platform data. + * + * Return: 0 on success or negative error number on failure. */ static int set_consumer_device_supply(struct regulator_dev *rdev, const char *consumer_dev_name, @@ -2000,11 +2008,13 @@ static struct regulator_dev *regulator_lookup_by_name(const char *name) * @dev: device for regulator "consumer". * @supply: Supply name or regulator ID. * + * Return: pointer to &struct regulator_dev or ERR_PTR() encoded negative error number. + * * If successful, returns a struct regulator_dev that corresponds to the name * @supply and with the embedded struct device refcount incremented by one. * The refcount must be dropped by calling put_device(). - * On failure one of the following ERR-PTR-encoded values is returned: - * -ENODEV if lookup fails permanently, -EPROBE_DEFER if lookup could succeed + * On failure one of the following ERR_PTR() encoded values is returned: + * -%ENODEV if lookup fails permanently, -%EPROBE_DEFER if lookup could succeed * in the future. */ static struct regulator_dev *regulator_dev_lookup(struct device *dev, @@ -2451,6 +2461,8 @@ EXPORT_SYMBOL_GPL(regulator_put); * * All lookups for id on dev will instead be conducted for alias_id on * alias_dev. + * + * Return: 0 on success or negative error number on failure. */ int regulator_register_supply_alias(struct device *dev, const char *id, struct device *alias_dev, @@ -2640,6 +2652,8 @@ static void regulator_ena_gpio_free(struct regulator_dev *rdev) * * GPIO is enabled in case of initial use. (enable_count is 0) * GPIO is disabled when it is not shared any more. (enable_count <= 1) + * + * Return: 0 on success or negative error number on failure. */ static int regulator_ena_gpio_ctrl(struct regulator_dev *rdev, bool enable) { @@ -2962,6 +2976,8 @@ static int _regulator_enable(struct regulator *regulator) * * NOTE: the output value can be set by other drivers, boot loader or may be * hardwired in the regulator. + * + * Return: 0 on success or negative error number on failure. */ int regulator_enable(struct regulator *regulator) { @@ -3072,6 +3088,8 @@ static int _regulator_disable(struct regulator *regulator) * NOTE: this will only disable the regulator output if no other consumer * devices have it enabled, the regulator device supports disabling and * machine constraints permit this operation. + * + * Return: 0 on success or negative error number on failure. */ int regulator_disable(struct regulator *regulator) { @@ -3121,6 +3139,8 @@ static int _regulator_force_disable(struct regulator_dev *rdev) * NOTE: this *will* disable the regulator output even if other consumer * devices have it enabled. This should be used for situations when device * damage will likely occur if the regulator is not disabled (e.g. over temp). + * + * Return: 0 on success or negative error number on failure. */ int regulator_force_disable(struct regulator *regulator) { @@ -3203,6 +3223,8 @@ static void regulator_disable_work(struct work_struct *work) * NOTE: this will only disable the regulator output if no other consumer * devices have it enabled, the regulator device supports disabling and * machine constraints permit this operation. + * + * Return: 0 on success or negative error number on failure. */ int regulator_disable_deferred(struct regulator *regulator, int ms) { @@ -3362,6 +3384,9 @@ EXPORT_SYMBOL_GPL(regulator_get_regmap); * hardware or firmware that can make I2C requests behind the kernel's back, * for example. * + * Return: 0 on success, or -%EOPNOTSUPP if the regulator does not support + * voltage selectors. + * * On success, the output parameters @vsel_reg and @vsel_mask are filled in * and 0 is returned, otherwise a negative errno is returned. */ @@ -4215,6 +4240,8 @@ static int regulator_balance_voltage(struct regulator_dev *rdev, * request voltage that meets the system constraints will be used. * Regulator system constraints must be set for this regulator before * calling this function otherwise this call will fail. + * + * Return: 0 on success or negative error number on failure. */ int regulator_set_voltage(struct regulator *regulator, int min_uV, int max_uV) { @@ -4325,6 +4352,8 @@ EXPORT_SYMBOL_GPL(regulator_set_suspend_voltage); * Provided with the starting and ending voltage, this function attempts to * calculate the time in microseconds required to rise or fall to this new * voltage. + * + * Return: ramp time in microseconds, or negative error number if calculation failed. */ int regulator_set_voltage_time(struct regulator *regulator, int old_uV, int new_uV) @@ -4382,6 +4411,8 @@ EXPORT_SYMBOL_GPL(regulator_set_voltage_time); * * Drivers providing ramp_delay in regulation_constraints can use this as their * set_voltage_time_sel() operation. + * + * Return: ramp time in microseconds, or negative error number if calculation failed. */ int regulator_set_voltage_time_sel(struct regulator_dev *rdev, unsigned int old_selector, @@ -4434,6 +4465,8 @@ int regulator_sync_voltage_rdev(struct regulator_dev *rdev) * Re-apply the last configured voltage. This is intended to be used * where some external control source the consumer is cooperating with * has caused the configured voltage to change. + * + * Return: 0 on success or negative error number on failure. */ int regulator_sync_voltage(struct regulator *regulator) { @@ -4565,6 +4598,8 @@ EXPORT_SYMBOL_GPL(regulator_get_voltage); * * NOTE: Regulator system constraints must be set for this regulator before * calling this function otherwise this call will fail. + * + * Return: 0 on success or negative error number on failure. */ int regulator_set_current_limit(struct regulator *regulator, int min_uA, int max_uA) @@ -4638,6 +4673,8 @@ EXPORT_SYMBOL_GPL(regulator_get_current_limit); * * NOTE: Regulator system constraints must be set for this regulator before * calling this function otherwise this call will fail. + * + * Return: 0 on success or negative error number on failure. */ int regulator_set_mode(struct regulator *regulator, unsigned int mode) { @@ -4699,6 +4736,9 @@ static unsigned int _regulator_get_mode(struct regulator_dev *rdev) * @regulator: regulator source * * Get the current regulator operating mode. + * + * Return: Current operating mode as %REGULATOR_MODE_* values, + * or negative error number on failure. */ unsigned int regulator_get_mode(struct regulator *regulator) { @@ -4745,6 +4785,8 @@ static int _regulator_get_error_flags(struct regulator_dev *rdev, * @flags: pointer to store error flags * * Get the current regulator error information. + * + * Return: 0 on success or negative error number on failure. */ int regulator_get_error_flags(struct regulator *regulator, unsigned int *flags) @@ -4817,6 +4859,9 @@ EXPORT_SYMBOL_GPL(regulator_set_load); * for the regulator also enable bypass mode and the machine * constraints allow this. Bypass mode means that the regulator is * simply passing the input directly to the output with no regulation. + * + * Return: 0 on success or if changing bypass is not possible; + * negative error number on failure. */ int regulator_allow_bypass(struct regulator *regulator, bool enable) { @@ -4874,6 +4919,8 @@ EXPORT_SYMBOL_GPL(regulator_allow_bypass); * @nb: notifier block * * Register notifier block to receive regulator events. + * + * Return: 0 on success or negative error number on failure. */ int regulator_register_notifier(struct regulator *regulator, struct notifier_block *nb) @@ -4889,6 +4936,8 @@ EXPORT_SYMBOL_GPL(regulator_register_notifier); * @nb: notifier block * * Unregister regulator event notifier block. + * + * Return: 0 on success or negative error number on failure. */ int regulator_unregister_notifier(struct regulator *regulator, struct notifier_block *nb) @@ -5179,6 +5228,8 @@ static void regulator_handle_critical(struct regulator_dev *rdev, * * Called by regulator drivers to notify clients a regulator event has * occurred. + * + * Return: %NOTIFY_DONE. */ int regulator_notifier_call_chain(struct regulator_dev *rdev, unsigned long event, void *data) @@ -5197,6 +5248,8 @@ EXPORT_SYMBOL_GPL(regulator_notifier_call_chain); * @mode: Mode to convert * * Convert a regulator mode into a status. + * + * Return: %REGULATOR_STATUS_* value corresponding to given mode. */ int regulator_mode_to_status(unsigned int mode) { @@ -5887,6 +5940,8 @@ EXPORT_SYMBOL_GPL(regulator_unregister); * @dev: ``&struct device`` pointer that is passed to _regulator_suspend() * * Configure each regulator with it's suspend operating parameters for state. + * + * Return: 0 on success or negative error number on failure. */ static int regulator_suspend(struct device *dev) { @@ -5976,6 +6031,8 @@ EXPORT_SYMBOL_GPL(regulator_has_full_constraints); * * Get rdev regulator driver private data. This call can be used in the * regulator driver context. + * + * Return: pointer to regulator driver private data. */ void *rdev_get_drvdata(struct regulator_dev *rdev) { @@ -5989,6 +6046,8 @@ EXPORT_SYMBOL_GPL(rdev_get_drvdata); * * Get regulator driver private data. This call can be used in the consumer * driver context when non API regulator specific functions need to be called. + * + * Return: pointer to regulator driver private data. */ void *regulator_get_drvdata(struct regulator *regulator) { @@ -6010,6 +6069,8 @@ EXPORT_SYMBOL_GPL(regulator_set_drvdata); /** * rdev_get_id - get regulator ID * @rdev: regulator + * + * Return: regulator ID for @rdev. */ int rdev_get_id(struct regulator_dev *rdev) { From patchwork Tue Aug 27 09:55:45 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: 13779223 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 06D3DC5472C for ; Tue, 27 Aug 2024 10:02:04 +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=ESZ230OnhQbgGMwqd+oa/xXMpMZe5y6HmOQapIAtswk=; b=bOwhq8KXsAR93xGK2HluSpnQjL Q1G1Sd5bkuqWngbSVfWKElJOb5mx3ATu99/nR5W+gwvMAGwKr9dXaMlfofUPndgte2mk9iyhBjfzA sX0mvnZpzbwb4hs4d4JYIm0fIo7nomOUoTOVvv+sPdtLuDhtTQerwD4wZtNNAzvvJ+cXI9Cz6Kn/a 8vMi4T7cU/FfNV/t3vtF06J3xr16cpHftOYzZcoAAarpYr5mWAv42IeDKfSJ1apx9QVync3MuEq9g +uJYGTiQt2SPHCSxNXba2K0PwRnYaZASRc9UlBfXX86yeU1vQx/SvwDS1IG3F74lbztkFffjDs3VU wuq3MPeQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sit1L-0000000AiL3-3K2F; Tue, 27 Aug 2024 10:01:52 +0000 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sisvo-0000000AgZr-1WQx for linux-arm-kernel@lists.infradead.org; Tue, 27 Aug 2024 09:56:09 +0000 Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-20223b5c1c0so47220505ad.2 for ; Tue, 27 Aug 2024 02:56:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724752567; x=1725357367; 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=ESZ230OnhQbgGMwqd+oa/xXMpMZe5y6HmOQapIAtswk=; b=Vx6NSthn0fAcfOc3KsO4NTuu2wh7DKDAD6gFr8drZ6AQFU2kpO6qo5kExJikgTnyq+ 1L6XIU6+yV/Mz4IWeyf1Hqm2ho2L/PApF2hgP4MESn4iwCy6CNoi5yoc9Aoma8Jmf+Gy AN4MB+WuyI3GW2xzKY1WXWZJRfyAYgnSEeP/I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724752567; x=1725357367; 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=ESZ230OnhQbgGMwqd+oa/xXMpMZe5y6HmOQapIAtswk=; b=S8H+EIM2MBK4j8q5s7PIR1/EsqlB6TUT1hA5auk70DUO9dtWe1112UpuU/Bw4njaDr WbTz8AqiGbtIRa/Z9fcS3PNnx2sYqnfnLzaVo6zkgPMl4/q4S37KbwOI/AtvI5q60H2s lrNAVjpzDN09ZTcVTo9HKgilsY9S1DeWjVfqX9D5Uh5OuiKTyZA/nm+1A+phef5nNJDE wvi30DrO7xeJUNXl0wC4an5hrtZdXhH+LfPvNBImM7IpZmCmyC7+oCZi/InYl7bdv7s+ /chYcm4NeOQgozpW61sy4/0k8IGYvH62uWmQej6HUXIe5ohYfjvWPi8QkoCgkVxvCHYh cXcg== X-Forwarded-Encrypted: i=1; AJvYcCUT7iVUix49Phh0KpPiBzquM47n+Jm9S3js1TbmX6GiMnnEhxmeONZ9BA21jktPj4vYqIdLG1zZbJtEVwSH2nVR@lists.infradead.org X-Gm-Message-State: AOJu0YwAyFMZauDs6VapRjZdfy4E82lNE7S5d0+OdBBqHbY/4Xa5Z8wG Mi0fCkx+SBO5QPEpMBxRfu3mGJ0jb2GlIVrEN9Jt06b0b2BneJdItUePbINzE7UZhqBJhYQDwnc = X-Google-Smtp-Source: AGHT+IFFCHZgHL9RBU8dd5+9PfndpKeAF0h1nYtKjBFa8A/QGyHizQ8yJecYPHXnUGL5ASbJDHv72w== X-Received: by 2002:a17:902:ec8a:b0:202:3711:6fe9 with SMTP id d9443c01a7336-204df4d6d6dmr19210065ad.51.1724752566916; Tue, 27 Aug 2024 02:56:06 -0700 (PDT) Received: from wenstp920.tpe.corp.google.com ([2401:fa00:1:10:3102:657e:87f4:c646]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2038560c2basm80006775ad.222.2024.08.27.02.56.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Aug 2024 02:56:06 -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 5/8] regulator: of: Fix incorrectly formatted kerneldoc "Return" sections Date: Tue, 27 Aug 2024 17:55:45 +0800 Message-ID: <20240827095550.675018-6-wenst@chromium.org> X-Mailer: git-send-email 2.46.0.295.g3b9ea8a38a-goog In-Reply-To: <20240827095550.675018-1-wenst@chromium.org> References: <20240827095550.675018-1-wenst@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240827_025608_425634_A4B99FD2 X-CRM114-Status: GOOD ( 17.84 ) 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 --- 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..9dab8ee74fde 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 populated &struct regulator_init_data or NULL if + * memory alloc 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 code 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 &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) From patchwork Tue Aug 27 09:55:46 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: 13779224 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 8E920C52D6F for ; Tue, 27 Aug 2024 10:02:57 +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=/kEjsRoTrc9YEAoIm4fI2W5J5jFppY9yqOw4qUfYcYc=; b=qDMoZ7eyWwGYrF66yuDsOcs9Xk BofZ3gSdlE2181OhUccGd1e4T8B+60KaYOqaf3XwjQ3OaCVKwmsSEsIK1l5VY3yZCKK5JPTpgs6EG cFwOYWVCjoKm07lbvrjO3IfmspEYHZqFy+NTgJ35m2y/DSXJiVdtS0iWhaHrkZP18BsxEWxzHiWAQ ukO9R3jxpF5gOTFcMVFqyDMvXe33PucJyEH98K8GpdPdxyNMQ/dVsHS7zn1Z0Aybx6WMRHRm8ocrQ ZSZDravasT6yXY10+2OcHS7ix76VpMM7P6GY5iDemyZJR6eQ5fLNu91Un2wzHunoekH3G4M3aj1XN 0rDv5n0g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sit2A-0000000AidZ-1ymx; Tue, 27 Aug 2024 10:02:42 +0000 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sisvq-0000000AgaZ-2xQ5 for linux-arm-kernel@lists.infradead.org; Tue, 27 Aug 2024 09:56:12 +0000 Received: by mail-pg1-x533.google.com with SMTP id 41be03b00d2f7-7cd835872ceso3594461a12.3 for ; Tue, 27 Aug 2024 02:56:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724752569; x=1725357369; 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=/kEjsRoTrc9YEAoIm4fI2W5J5jFppY9yqOw4qUfYcYc=; b=UhXnpWikSEMYfjVav5v+fyGtQOrn5BvBrxrZG2vj7LZSMWiUbRiBC2/fKf8zVnuRMA J8g3K8G4L7fqhBJaS3mzX7VdbE/9wECrpBMJNQz2fy36WTDiO9RF5P0GZdWk/31FEuuT sIdDkJ6M+w3mGzt1YfbJ7wKNub5nKUuSiDrRM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724752569; x=1725357369; 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=/kEjsRoTrc9YEAoIm4fI2W5J5jFppY9yqOw4qUfYcYc=; b=PqwoVaYe/mcFvX+i64lDYZmEb2tgUM8yfVIn5a/TmlLwVQCMjboePxfSR985QaeNlJ lWQwdMEF3tffyW7smbEE0DurFZeKbLPOItpL19yVjQ6//6JCum7GSKIQiXtsHMCZVok/ wjizcfuElUjUKM7Z+MTvU+DxLrw0V/XYorIXWF4Y0BY4Bk5GG/SqRiWETVJf30Kq7Saj ZK6P5Qr6Qn1jGQMtzkJmohLN2sW5RK+xWD6dIUbNZU5ZU+hMW62JJj1Kf1Dn/hLkiPMV RmNis4/3XakSd2ZFcIqOlhAriqG1Dk2jPkUHDj2229LzzBzQKCAWZo03nvW+Nk1yH9IB UmXw== X-Forwarded-Encrypted: i=1; AJvYcCV/94pqOmFe/9utbhll6IAGoMEExctj47dM0ftqc7GUszV/QmD3MZ59XJkFtEwI9DP4Q2CkPXVhesckCFPjPMbB@lists.infradead.org X-Gm-Message-State: AOJu0YweeANijIySDyUVoJ0+nvv9pbjOE6quPeqBPdDDV3+Zmxr+Jbx2 7KUc8S2KvdnD+4w5rATjODHo95HGTG/dbqAr0qRXzCAD/AnPOw7dEScJYh2zzg== X-Google-Smtp-Source: AGHT+IEkDjIQuJoQ6kCa98vVLTWPO/VYtGd1/XSnCdwwHvl9WI+e65ZCQr6Z5uPOx+2prdu3WCvVxQ== X-Received: by 2002:a05:6a21:33a9:b0:1cc:c2d5:f9aa with SMTP id adf61e73a8af0-1ccc2d5fa66mr1778594637.4.1724752569071; Tue, 27 Aug 2024 02:56:09 -0700 (PDT) Received: from wenstp920.tpe.corp.google.com ([2401:fa00:1:10:3102:657e:87f4:c646]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2038560c2basm80006775ad.222.2024.08.27.02.56.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Aug 2024 02:56:08 -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 6/8] regulator: fixed: Fix incorrectly formatted kerneldoc "Return" section Date: Tue, 27 Aug 2024 17:55:46 +0800 Message-ID: <20240827095550.675018-7-wenst@chromium.org> X-Mailer: git-send-email 2.46.0.295.g3b9ea8a38a-goog In-Reply-To: <20240827095550.675018-1-wenst@chromium.org> References: <20240827095550.675018-1-wenst@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240827_025610_764440_67AEB099 X-CRM114-Status: GOOD ( 13.65 ) 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 kerneldoc of of_get_fixed_voltage_config(). The kerneldoc has a description about the return values, just not in the format kernel-doc wants. Convert it to use the proper "Return:" section header. The existing description have been reworded and moved around to fit the grammar and formatting. Signed-off-by: Chen-Yu Tsai --- drivers/regulator/fixed.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c index cb93e5cdcfa9..1629aa525ef2 100644 --- a/drivers/regulator/fixed.c +++ b/drivers/regulator/fixed.c @@ -158,8 +158,10 @@ static int reg_fixed_get_irqs(struct device *dev, * @desc: regulator description * * Populates fixed_voltage_config structure by extracting data from device - * tree node, returns a pointer to the populated structure of NULL if memory - * alloc fails. + * tree node. + * + * Return: pointer to populated &struct fixed_voltage_config or %NULL if + * memory alloc fails. */ static struct fixed_voltage_config * of_get_fixed_voltage_config(struct device *dev, From patchwork Tue Aug 27 09:55:47 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: 13779291 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 0DEFFC52D6F for ; Tue, 27 Aug 2024 10:03:40 +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=QWF2y1DaAfCI+OxvAbtfW9C6juMvoH4TVoXic04e7PQ=; b=MRRHQAhEjkJAYdWerSL8BbK4oa IsEnsVJAviA9bJHLZczfp9gyaSnTVX+2rmMWZt7CvltcBx6YrvhiP1kylGrrf8szcIpbIA7qGZZa4 EZ+3roSuW5MawxTRKwb6L+iW6SE6opNh3xbz1uXFovrej/58xkh2KyWKi1V6pum0vB564wkokGxTV ZomzRv4XV4ZSAmyBbAnGpA0l9OjrKMybCgF2/Xe3Z/51IK8s4omRUOvgslTc6p4je0t876DQ5/6Lx E8YoPJo+9dt8derfLyQ2+EKH8U4GHx1wC0yRlFSYMU9Dk/seYoB1TFN/7Cai1eMVTkZvOxRNCNPJH 5zpwtkZg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sit2x-0000000Aiv6-1jVH; Tue, 27 Aug 2024 10:03:31 +0000 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sisvs-0000000AgbC-2heM for linux-arm-kernel@lists.infradead.org; Tue, 27 Aug 2024 09:56:14 +0000 Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-201cd78c6a3so36285075ad.1 for ; Tue, 27 Aug 2024 02:56:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724752571; x=1725357371; 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=QWF2y1DaAfCI+OxvAbtfW9C6juMvoH4TVoXic04e7PQ=; b=HmV7xdBTjkt/62FW96xJ9wC968TV6CzWA+XPipfv111ADL3p032Pwy7wxgRK73aDrw XQ3/ClKU6CcrUCmpMOnsC0O+WJtXEteZtxnMVNlRe9VoCUmctosFSRBEJHwerQQNQhAv cVAmi/l4FYDc1F5FHGt9eUdovR+vPEHB/K+NQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724752571; x=1725357371; 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=QWF2y1DaAfCI+OxvAbtfW9C6juMvoH4TVoXic04e7PQ=; b=HCrvccu8f+gXsP6ncdKX3NAxnk+vGv0MVUONl+X8vWmSJE1eiCP9JJgSScL+v33OJD xxt0k+NVF/2Q8OF2X4XX9GWh54YRtQZQ7yHIVM928qQF54fspPF9teR/s0R+VsFLIypk jnlFhpgvuNPGqJnb8qy1ZyVbuXxx2P2HQotlDUb8U8IMv+fXJMZNLzl2yYxyMvEoych7 Nv+1DZMdz/SubiYtx/X21HrSlDClilWS9Yqi/uV/VFLP49B6n0/WZ4868W2/l5FJQ0mQ GBia/kavGejy1FsHl4u7KVFzpRWhWLnXToyNo0ugjYvZeMyVMOSIa2jz64KclRu2SwZ1 c3yg== X-Forwarded-Encrypted: i=1; AJvYcCUicIeiJNCP2f+KkVflpIdb+lmQuVPcrlJGgA5xdsFiBvqQCzvANB7Yt4DAjVtuPnGm85HMRrG2iVy590J0FRXc@lists.infradead.org X-Gm-Message-State: AOJu0YxzB9qqrGMGc43+nU8hkBgSgM854dWOh5jlA+YwxhUqNti+NF55 LPiW5pdiN/6uNrKmVAJ+CblpE1VHjWDgKWoBm46Psk2yvzGww73Q5SVzjTID9Q== X-Google-Smtp-Source: AGHT+IG1bfKL3An8XqshnrBPErEA+/k/utDPS4gPGGdrb8g9f7KtjCgE/tEqVtdEn/QXw5TVbNEMPg== X-Received: by 2002:a17:903:bcd:b0:203:a12e:faa7 with SMTP id d9443c01a7336-204df45fdafmr21313875ad.27.1724752570967; Tue, 27 Aug 2024 02:56:10 -0700 (PDT) Received: from wenstp920.tpe.corp.google.com ([2401:fa00:1:10:3102:657e:87f4:c646]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2038560c2basm80006775ad.222.2024.08.27.02.56.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Aug 2024 02:56:10 -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 7/8] regulator: fixed-helper: Add missing "Return" kerneldoc section Date: Tue, 27 Aug 2024 17:55:47 +0800 Message-ID: <20240827095550.675018-8-wenst@chromium.org> X-Mailer: git-send-email 2.46.0.295.g3b9ea8a38a-goog In-Reply-To: <20240827095550.675018-1-wenst@chromium.org> References: <20240827095550.675018-1-wenst@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240827_025612_704048_1A402830 X-CRM114-Status: GOOD ( 12.38 ) 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 the function regulator_register_always_on(). Add a "Return" section for it based on its behavior. Signed-off-by: Chen-Yu Tsai --- drivers/regulator/fixed-helper.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/regulator/fixed-helper.c b/drivers/regulator/fixed-helper.c index 2d5a42b2b3d8..72807af63126 100644 --- a/drivers/regulator/fixed-helper.c +++ b/drivers/regulator/fixed-helper.c @@ -26,6 +26,8 @@ static void regulator_fixed_release(struct device *dev) * @supplies: consumers for this regulator * @num_supplies: number of consumers * @uv: voltage in microvolts + * + * Return: pointer to registered platform device, or %NULL if memory alloc fails. */ struct platform_device *regulator_register_always_on(int id, const char *name, struct regulator_consumer_supply *supplies, int num_supplies, int uv) From patchwork Tue Aug 27 09:55:48 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: 13779292 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 E3179C5320E for ; Tue, 27 Aug 2024 10:04:33 +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=3/5VBNfYAsqRzbHrubk/0yjXqiOSkP3Dbb2C0/1kFpM=; b=BwYB9eZIFm9nps0+YiUPUTM/NT 5apllgftsCvs1HqWl2TYFtedRH4oH7EC5lKJF64XecxiIodhjJabYlQR9/saGEmhcPBihQCB/eJVV MF0EFO5ehoTVC4mpLjgzluYMtp0jgZ2TF+1JNRgsAPZegB5GYozrH5xi95bsCGtz+zpwx6IBxXXh/ SWY+t9jCfLqIjAbyBXiyidI3JkBE2UBgSnXRYCyF/GHJGUBxf7RQzU18P3FaH3eEaiND1aUqOp15N DnqU8xtMvsopQEZRHCvRv1aOJnRBG/Tw8y8PxhRvlEzvNdhbZomyB84ujwIwhxuAJVbtnMc0P7vqi XI7cP9Cw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sit3j-0000000Aj6r-3Ux1; Tue, 27 Aug 2024 10:04:19 +0000 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sisvu-0000000Agbj-0U4c for linux-arm-kernel@lists.infradead.org; Tue, 27 Aug 2024 09:56:15 +0000 Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-201fba05363so42399555ad.3 for ; Tue, 27 Aug 2024 02:56:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724752573; x=1725357373; 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=3/5VBNfYAsqRzbHrubk/0yjXqiOSkP3Dbb2C0/1kFpM=; b=NRrui0GILKh4khSEOoxk7RFZhj1NWEv2c2SOiFQqcO35cDnok62jmJk3GNIMldiMme ODqCzqd/2pMI77bHc0/pyTzuwhEWsC/xMdBTDSh1kdDsNf/R5bPSfYIV4uMPVu+auOhW +Hdlk2+9lw/Y9xh4YpyfvcZw2i/91SAUnc1h8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724752573; x=1725357373; 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=3/5VBNfYAsqRzbHrubk/0yjXqiOSkP3Dbb2C0/1kFpM=; b=jr6D/nBvjzfWYCo3UyYkE4ZeL066mTOdNxSlLuQNDipXz58dxVZ/NWDvXSJ7RJm75Z TEq6fHGr4G/QKMO9uTPGAUI4t+RBo2jZqFIuqJvuBleZnu4Yg6XoomgbgLkeopvSSp+r xvdjQc0bA9Jsv+nFD/BiaRxqVpt7pRkSdzfv6NrvziIyev708ASkTUChcoh4BJqE5Pfv fPuA7Spgc6QLBnncnFJE9MUf+S+4WGzW+FqoxlCm8eV7HBhmBiYZOKyYg2BoObELUiKm vk4xpntZK0cIWoAfe8tvxryBKEb3zfEgDfOezU9lk/gKyYVWGBRRGxUAwmNijcIi38hV X45w== X-Forwarded-Encrypted: i=1; AJvYcCXSTTiOnhzuAMbAjD+MdNzbHYk4BuqWl0T4PEib4h7CYd489xrVGswxL0h+Mi709GJmw4bkPO4moTH+yXKuQDc6@lists.infradead.org X-Gm-Message-State: AOJu0YweTv0+zxnyUrFfIFbWTrqALvVTx1TkQEO/Z/N8K7A6NJhyLywr 9yDcD4ntaxVClrzdaX9fKZfSJrk7iAYQSGUpG9x9dcnUCOGHZYUgZVo427Vxiw== X-Google-Smtp-Source: AGHT+IGK0iObEbnV0ut5x5siCGHthaaUKI10Pjne/4Dtm0WJAt/GcXg1cPDu6YGnkB3ody3D/pB6Pg== X-Received: by 2002:a17:903:11c7:b0:202:4d05:a24a with SMTP id d9443c01a7336-204df13ee41mr24113125ad.16.1724752572692; Tue, 27 Aug 2024 02:56:12 -0700 (PDT) Received: from wenstp920.tpe.corp.google.com ([2401:fa00:1:10:3102:657e:87f4:c646]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2038560c2basm80006775ad.222.2024.08.27.02.56.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Aug 2024 02:56:12 -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 8/8] regulator: irq_helpers: Add missing "Return" kerneldoc section Date: Tue, 27 Aug 2024 17:55:48 +0800 Message-ID: <20240827095550.675018-9-wenst@chromium.org> X-Mailer: git-send-email 2.46.0.295.g3b9ea8a38a-goog In-Reply-To: <20240827095550.675018-1-wenst@chromium.org> References: <20240827095550.675018-1-wenst@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240827_025614_211256_13FD4BE3 X-CRM114-Status: GOOD ( 11.48 ) 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 the function regulator_irq_map_event_simple(). Add a "Return" section for it based on its behavior. Signed-off-by: Chen-Yu Tsai Reviewed-by: Matti Vaittinen --- drivers/regulator/irq_helpers.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/regulator/irq_helpers.c b/drivers/regulator/irq_helpers.c index 5ab1a0befe12..5803ef016b7d 100644 --- a/drivers/regulator/irq_helpers.c +++ b/drivers/regulator/irq_helpers.c @@ -414,6 +414,10 @@ EXPORT_SYMBOL_GPL(regulator_irq_helper_cancel); * notification helperk. Exactly one rdev and exactly one error (in * "common_errs"-field) can be given at IRQ helper registration for * regulator_irq_map_event_simple() to be viable. + * + * Return: 0 + * + * Actual regulator error and notification are passed back through @rid. */ int regulator_irq_map_event_simple(int irq, struct regulator_irq_data *rid, unsigned long *dev_mask)