From patchwork Thu Aug 29 08:51:22 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: 13782800 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 DA496C83010 for ; Thu, 29 Aug 2024 08:54:43 +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=7DtBpQpzoEhtHDP36c0mJ9L5tYUfKN1YBrSu8HK2DxM=; b=nn7GIg91eNvLW5sD4cUOAc+DxE ak3QBhvFRUMkLeFIn2HfyO0S361kFI+cbQgDhbSpEvX3oW/MsEe4PfQOW3VnTDJyAQYDEHddWC55l jrUeX67uIEYltH3rSvuZ24KRiDgygAaIfjN2fPdT0hcJ+KUDGhQDDdDQIcJHsbddisXyX9QVrESLP aHl8eHPadYJGdxTvhuiJa874wuZF3skMQWWUsSAbV0pA/kemgVOH27wlE1IRwCxjS1ivV8nqSZbpk 4DOsNeqdGqOQ97ouTHq5EiBI5+J+gu/x9IHqQClPhcNoxA5f6WQQIYj0VFDzgDMpLCadogJ4E9TnI Sowc/JPQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjavC-00000001Efj-3dxU; Thu, 29 Aug 2024 08:54:26 +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 1sjasj-00000001Dol-11rD for linux-arm-kernel@lists.infradead.org; Thu, 29 Aug 2024 08:51:54 +0000 Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-201ee6b084bso3393005ad.2 for ; Thu, 29 Aug 2024 01:51:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724921512; x=1725526312; 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=7DtBpQpzoEhtHDP36c0mJ9L5tYUfKN1YBrSu8HK2DxM=; b=genVTer3oA8AGjxr/9i9tq1+42GEaHUSKYnKGfciN9m6pdIek6Z8yus3CTdIcrMtXO YtN8xSqO2Q811NRSZoeYCvyNjrmL+Ndbqtd8efcbE4LF3bRexkeLJaug/x/zkh8oDPiP 91U/vJJLirum6qjfTT7wWqZsDs8Tx1ceH4pgA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724921512; x=1725526312; 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=7DtBpQpzoEhtHDP36c0mJ9L5tYUfKN1YBrSu8HK2DxM=; b=MBNY5ya8s3r36f13xmLScXxaFMVA7Ko+Kp9mbWxI5llQ+92R/8WtPSFjBYZ5mRPCci IKr3ifaSsI80UgKuQ1HZfI5b3JWzysEOZScZ7U49BxcqoBGVX47N6jNQxM+rqhEp8/Qt EGL7ebhuuhRdggOYTuf9xz+oBiYNQrckLzrsir8qXSEPfld01iPqu3lsUuBy+J9xnVaw pNA9DjSv/Z5Xyc/16INBvUYMCf7YHPmC9RrC6J4MrmIsGBqEsFl5NyD45Ml2FarZt+rp 2l7IXDH8LoFwZ0MP6TMRHVHY9HTGM4TH9o6mnJgroYp+OnYJDjOjViIvf8tYlPM8VE1F b4LQ== X-Forwarded-Encrypted: i=1; AJvYcCX3Fd+khrmKTgJBe/kMTo0vA9U6+2tZ8HPFhOXn8yRfj/yyi9lE2EOUpMPLJFgnTXvLP1umr9iv4MSHs0Ll27/E@lists.infradead.org X-Gm-Message-State: AOJu0YyuM210wdM2rWlnZFh4vpI+g2UcxmrJ6tJSC1xby51IiDK59d5P r+T0ETlCZNIZ16bpmVJ8zoaN2ypYN3oa56BLdXUT6yCsJTxIWfUDYVF6Q84XZK1r1tzIk5eMpfk = X-Google-Smtp-Source: AGHT+IEcjaIAJ52LI0Yoz6FfV49r57/iDw8FfyvOIgo4jwrVsqHjPRBovzCDzdVCqzFPC1qXPu6OlA== X-Received: by 2002:a17:903:647:b0:205:79c:56f5 with SMTP id d9443c01a7336-2050c3777demr18432935ad.27.1724921512415; Thu, 29 Aug 2024 01:51:52 -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.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2024 01:51:52 -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 02/10] regulator: core: Fix regulator_is_supported_voltage() kerneldoc return value Date: Thu, 29 Aug 2024 16:51:22 +0800 Message-ID: <20240829085131.1361701-3-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_015153_302880_2583B519 X-CRM114-Status: GOOD ( 15.78 ) 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 valid return values 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 --- Changes since v1: - Replaced "true, false" in commit message with "valid return values" - Added articles ("the", "a") to the description based on surrounding and function implementation context --- drivers/regulator/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 763048d6f1ed..0ce3fe1774fe 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -3456,7 +3456,9 @@ 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 the voltage range is supported, 0 if not, or a negative error + * number if @regulator's voltage can't be changed and voltage readback + * failed. */ int regulator_is_supported_voltage(struct regulator *regulator, int min_uV, int max_uV)