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)