From patchwork Thu Aug 29 08:51:21 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: 13782799 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 0BAAAC8300F for ; Thu, 29 Aug 2024 08:53:54 +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=heIFKAnQeQ+nyj/vXNO0cty0i3q7712MChM12fe4bG8=; b=If/Zlj+RIpZFFw2wi6MFzfavRB nL5IVKTKsqVKcNZxLs79dvRJrVwybJgioh0imdLJGkDbBffuoWOnOXAOA+zexWwHpQeG00yD6vDkx O2A6gmPqIcsDYQ5UkRGXe494CPkPKPzq/LtK+/rR2e9uQMsH+GcCXt1nn9NPM2P5r9o//cSWdqgZ+ 6Ui+OqzGKFFXflVZhgVp9Ercvjs79YJ6m2ac/2KuisZlmeogX5B8F+1kP/8H52pcElNdQfN/CLibI 37kFcNY040bKt5cLZrPHbp2uYsQ1OdFGeSwWTaPo65Et3eJszRXuYfg9Z/vGsphNSGlcBNVpG27wB O+mFxOsg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjauN-00000001EOj-1PtF; Thu, 29 Aug 2024 08:53:35 +0000 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjash-00000001DoQ-2Bzs for linux-arm-kernel@lists.infradead.org; Thu, 29 Aug 2024 08:51:52 +0000 Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-204f52fe74dso3559925ad.1 for ; Thu, 29 Aug 2024 01:51:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724921511; x=1725526311; 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=heIFKAnQeQ+nyj/vXNO0cty0i3q7712MChM12fe4bG8=; b=elnj6ax7cVWel+Q1PJvTAR37nvc216mVz9D+7yc1CT+nFdhOMF+GaMaj7dhQPe0sUx n0rnQFQG8szgnvy05rwmUcvSJzKjGcaUil01HXlRP081LEod1pO/pzjLv+P6lTLEIOZM K7VPxJ3PcP7X3oreQDgT4oA9/KWC6UOPMXJQ0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724921511; x=1725526311; 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=heIFKAnQeQ+nyj/vXNO0cty0i3q7712MChM12fe4bG8=; b=TSDAdsbTYGSwFCGFFC6wHwLJg9T/Tt1brVFMSjRWdnQGUyKo8aaybJd0juKvT4lEFU meIHyXmiYgR3g8ebcPZmPbHgsFh7zW96pgvCXSzJXsRoABaWHvSMXobm6Ot8auNMl91I qfyr705aMcFv679vA6wL18fboTpmrZ/jRjWOcz7hyBKkZ28hCSGgQ6HISZtLNyMgjDux 9A9mTKU8HR3Um7hkfN+IyXi/GrD9Aqbn9WKEo4/dNxR61eGk4XA5c3Wxe4wdlHCkcekn U3c5GZwIJUiOeGlJ9u83DUjGYRwndu+QxraBlbcW5EIgksH1Ioc1k8XTn9/tbDKBM9CY DCjg== X-Forwarded-Encrypted: i=1; AJvYcCWpwP/OQim26d36rLuu7GvGqM+Z8amGPX0kXcGc+Mbmkwcl3eDr9/A6vbI8bHeBNhwO8uvS7JwmVLrsg/IWSelJ@lists.infradead.org X-Gm-Message-State: AOJu0YwtBIw4JUeu1y2/cC93aBZHDG+wB3xhzTwDBV+u8tiRmWAHwlX6 78PdGlovic1VLl1FhvuqzWLtEViYpOdseLX/L4mti1YbUvjllEO+uPRNjS1PsA== X-Google-Smtp-Source: AGHT+IEF5DMEz3vypFVgvJ9fuRxtis7hT+mK/UUazZidY3knWdLTfD07eXsusPkoSY4O2j+uwdw9cA== X-Received: by 2002:a17:902:e5c4:b0:202:44a3:e324 with SMTP id d9443c01a7336-2050c34d93fmr23219625ad.21.1724921510665; Thu, 29 Aug 2024 01:51:50 -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.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2024 01:51:48 -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 01/10] regulator: core: Fix short description for _regulator_check_status_enabled() Date: Thu, 29 Aug 2024 16:51:21 +0800 Message-ID: <20240829085131.1361701-2-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_015151_582754_DFAED03D X-CRM114-Status: GOOD ( 13.73 ) 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 --- Changes since v1: none --- 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 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) From patchwork Thu Aug 29 08:51:23 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: 13782801 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 14001C8300F for ; Thu, 29 Aug 2024 08:55:37 +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=Peh3KRS2otd9KMsQofYzoADoRSJG/N+Ns2pNhtBQcKs=; b=xpMmg5pVSj71zFVTVinIY+3kKf +Zm9Lv48ywIb93aylfXr7U4/p11AkhltndRiqNl/Wlc5edyFsKxvM5u6Y/8gI1mjvwUfr5ljaayJD w7eTaIQUuptM4/fU43NoSh3mduQGYGd3Q4gJ29e49z7zPJZPjU5yVWy6JkdZMX5Xb1+KqsiFvc3zR YQwxFIrR5zfzzg5QFcNSRUZr87BspIpkXxRnzShFO4d3S9QNfSHlJiQXgjDA4hj12iYkzsOM1dh0O C99PvygoIMayPujtYaKieOfnA7Y63RkcTXMAF3+wC80C9ZXDk0tigh+6CGz8rsrsHN6LLxHzHjmYO 5Lx+ptyA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjaw3-00000001F0O-1kgp; Thu, 29 Aug 2024 08:55:19 +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 1sjasm-00000001DpP-0jaU for linux-arm-kernel@lists.infradead.org; Thu, 29 Aug 2024 08:51:58 +0000 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-201d5af11a4so3455465ad.3 for ; Thu, 29 Aug 2024 01:51:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724921515; x=1725526315; 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=Peh3KRS2otd9KMsQofYzoADoRSJG/N+Ns2pNhtBQcKs=; b=MSCwr4aF0dYm7j0EvuxnVYe7IIP9sC7o5aLxmza/iE1NYE9Ro1+TK6y7UsnnNeaHnu GernZ6YUPzCtz2tvbUKeQtPbRtNFHSkfns07xqGj6DTrLiZnIb7NqGOvWeiWoABzCUNp Y0YGnDNRlfWBgAH3ZXY2WQJ0K6n5SA0UaT7oo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724921515; x=1725526315; 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=Peh3KRS2otd9KMsQofYzoADoRSJG/N+Ns2pNhtBQcKs=; b=vEsbtYldSTEoWsxM/5s/sbWb6DvHEOg7qR2hqy77lFb7HtgvKgJE5you4QiKqpds2t TjCtEnCBwk/mwhfoBBjhua+uYPErh+XL4+491I07Q1O2ovzo+2JAa3HypeNarJ2o5LTL Q5wLEO3IQM1XcQuvU2vOVwEcOZ/+ekjXQpiLQ3UXrOIQMMcsMz2s0G/u7VVQQ86r6rdV TC+rONGpZZPJvNTBdMhqfuQdXYpHAhkR2IcyMUJ/dwuBCONYnJDuoY35UlWHe5QAtFLL NNxFX6z8SdEDUb3Hs7U0WzwXhqRp5RgifB6N/7V+oQD8er5eMbDJi0FyuXs9spWvtRoI wRtg== X-Forwarded-Encrypted: i=1; AJvYcCVIjRYr8vSkUKS3SlTuZcMUHAhmyKgDZr2Pi0GtSMIH9yYHyzQ8/UP6ISM1EFpMCmMyhCFlfr01Aq2nwjlwkngh@lists.infradead.org X-Gm-Message-State: AOJu0YzPcqlElDbNEM5F9mRxyPUlOPmXXvaPo4J5tFk1ZZh25CRWJVLn 0Tu3ij0hQHVnfOLT7fX/OCBcMO7NP+IUPVamOpvCuCoiYi1r6VW14BIt38Q2CA== X-Google-Smtp-Source: AGHT+IGo3tvc2nBfopqiex+TZW5v8gp7UnG5vd9DIk3b/JKNnSyE+2RajYwWR7PuW+PQtgmHbWWHHQ== X-Received: by 2002:a17:902:ec84:b0:203:a0c7:3156 with SMTP id d9443c01a7336-2050c23699amr22263655ad.5.1724921515115; Thu, 29 Aug 2024 01:51:55 -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.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2024 01:51:54 -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 03/10] regulator: core: Fix incorrectly formatted kerneldoc "Return" sections Date: Thu, 29 Aug 2024 16:51:23 +0800 Message-ID: <20240829085131.1361701-4-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_015156_256147_7F567C26 X-CRM114-Status: GOOD ( 31.34 ) 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 --- 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 - Indented "Return" section for regulator_is_enabled() --- 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 0ce3fe1774fe..d7656b91f5bb 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 to 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 to 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 an 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 an 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 an 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 a 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 a 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 the &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 a 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) { @@ -4527,7 +4533,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 a 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. @@ -4611,7 +4617,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 a 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. @@ -4779,7 +4786,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 a negative error number on failure. */ int regulator_set_load(struct regulator *regulator, int uA_load) { @@ -4964,12 +4971,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 a negative error number on failure. */ int regulator_bulk_get(struct device *dev, int num_consumers, struct regulator_bulk_data *consumers) @@ -4990,12 +4997,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 a negative error number on failure. */ int regulator_bulk_enable(int num_consumers, struct regulator_bulk_data *consumers) @@ -5039,12 +5047,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 a negative error number on failure. */ int regulator_bulk_disable(int num_consumers, struct regulator_bulk_data *consumers) @@ -5078,7 +5087,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. @@ -5086,6 +5094,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 a negative error number on failure. */ int regulator_bulk_force_disable(int num_consumers, struct regulator_bulk_data *consumers) @@ -5582,8 +5592,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 a valid &struct regulator_dev on success or + * an ERR_PTR() encoded negative error number on failure. */ struct regulator_dev * regulator_register(struct device *dev, From patchwork Thu Aug 29 08:51:24 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: 13782802 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 C2DEDC8300F for ; Thu, 29 Aug 2024 08:56:28 +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=9eExJ/LSKKVvg9hYH9GnPj/p8H26y4FLjUbJxPPs080=; b=cIbWp1rVxFpgfBtsSN8SQb8zKu VWywg+wAkQX/Rok4GjpfcrYvyl27mopDH6uKoFerY2pWIaUkvQkX3l+3wBLPkJJbxF6xM9OhskFVq n9mjHh/OiE4u+sN7biiQnlj3JoTw5x+bcBhDhQKS0ahHjLHyp6K+s+UEGFkvZ/36jB4mW/385ZDSG wB+BVaZpnqpw9ySN9TSIeDudcnVnEZ54l8+6irhtK/BXXZz6u+4ken+pOFXH+A2wN5qs/njG+eYq/ apISbBOG/vYxfiHIfjbbd++S3LUBAceu/Gt0hGkSCM4hdJDj0fAr3oKP4pREHZuXZdQbP8znOtZbk lO046ixQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjawu-00000001FK4-3x9O; Thu, 29 Aug 2024 08:56:12 +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 1sjasn-00000001Dpm-3mwk for linux-arm-kernel@lists.infradead.org; Thu, 29 Aug 2024 08:51:59 +0000 Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-2021537a8e6so2779165ad.2 for ; Thu, 29 Aug 2024 01:51:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724921517; x=1725526317; 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=9eExJ/LSKKVvg9hYH9GnPj/p8H26y4FLjUbJxPPs080=; b=YxiGNEG2LH/C12A0pNG+9PnE71Se37ySi56NQX3ccY6vlHcRaTBVKyZpKjSgRIeyER uz8C3C5kSks/FVHplCcB88ZD9SY3BAxFVGxz3O3i/aT1qGjxewIq6LIgYBRmIAonS1Dr SJLwcgnqvZ6L5nfpr4Dsqkw3mF1LxPoc0P+TY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724921517; x=1725526317; 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=9eExJ/LSKKVvg9hYH9GnPj/p8H26y4FLjUbJxPPs080=; b=GMAsjxknInvFQ3yAiLy14B1HqndqlUp/jTKlXG8BG38D1W0SbLTkZ36Q+OBJEn8Fq7 w51DpywFQTJK1KBIjUgaCS1f5hD3R/RZTwRnkbqdm01FFqAQ4po0LHs5IJ+h9vo4CRjg 4xRdJ7sFl3wJfo7J+2OF5t/uz/hQw2aQUF1rNVn//gc9crlP2+rAPsfp2OjMYB1JVYlV JSrbQz8rlg8vUzZ6GhQ9YrWfJ9PkpxbyUdCYKcFZLJ/7VXyXlEvxtnMKG2+8FJFTGqHf tcfKwQE408YYk5nPoek+N8XX7HlXuxWc4kOSDZ38xyOxsfYbs7ycf6U2g0rNQS5AnHRw 3BGA== X-Forwarded-Encrypted: i=1; AJvYcCWXzRAYREhIUWy7MtXjRUpwdxVr0MNAGc5hLTyemU2vCSH9/C7vHtw7gh49MZ0VKz36p5r5sUpkcJpL3s+4B03u@lists.infradead.org X-Gm-Message-State: AOJu0YwqgVN9n90frwc0saEefjzSXH38inmXTO+3a7/y5+my3BQd/beT a+KGPBgiEruU1LOHCzzfhWWFqTlcnmx/AFgwn2sDnhJ3s4otaigtfIT3LC7COA== X-Google-Smtp-Source: AGHT+IHUH7tsXNguLatZjd+DWsassoMfMvLOPUoskM9fuBDw+9E/mq7qkdIorWuKes7byOLkDCI3Ag== X-Received: by 2002:a17:902:ce83:b0:202:3ebf:679d with SMTP id d9443c01a7336-2050c3d2936mr21337985ad.37.1724921516915; Thu, 29 Aug 2024 01:51:56 -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.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2024 01:51:56 -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 04/10] regulator: core: Add missing kerneldoc "Return" sections Date: Thu, 29 Aug 2024 16:51:24 +0800 Message-ID: <20240829085131.1361701-5-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_015157_998945_36CB0D6E X-CRM114-Status: GOOD ( 29.28 ) 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 --- 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 --- 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 d7656b91f5bb..0b929ab71188 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 a 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 a 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 a 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 a 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 a 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 a 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 a 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 a 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 a 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 a 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. */ @@ -4216,6 +4241,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 a negative error number on failure. */ int regulator_set_voltage(struct regulator *regulator, int min_uV, int max_uV) { @@ -4326,6 +4353,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 a negative error number if calculation failed. */ int regulator_set_voltage_time(struct regulator *regulator, int old_uV, int new_uV) @@ -4383,6 +4412,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 a negative error number if calculation failed. */ int regulator_set_voltage_time_sel(struct regulator_dev *rdev, unsigned int old_selector, @@ -4435,6 +4466,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 a negative error number on failure. */ int regulator_sync_voltage(struct regulator *regulator) { @@ -4566,6 +4599,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 a negative error number on failure. */ int regulator_set_current_limit(struct regulator *regulator, int min_uA, int max_uA) @@ -4639,6 +4674,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 a negative error number on failure. */ int regulator_set_mode(struct regulator *regulator, unsigned int mode) { @@ -4700,6 +4737,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 a negative error number on failure. */ unsigned int regulator_get_mode(struct regulator *regulator) { @@ -4746,6 +4786,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 a negative error number on failure. */ int regulator_get_error_flags(struct regulator *regulator, unsigned int *flags) @@ -4818,6 +4860,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, or + * a negative error number on failure. */ int regulator_allow_bypass(struct regulator *regulator, bool enable) { @@ -4875,6 +4920,8 @@ EXPORT_SYMBOL_GPL(regulator_allow_bypass); * @nb: notifier block * * Register notifier block to receive regulator events. + * + * Return: 0 on success or a negative error number on failure. */ int regulator_register_notifier(struct regulator *regulator, struct notifier_block *nb) @@ -4890,6 +4937,8 @@ EXPORT_SYMBOL_GPL(regulator_register_notifier); * @nb: notifier block * * Unregister regulator event notifier block. + * + * Return: 0 on success or a negative error number on failure. */ int regulator_unregister_notifier(struct regulator *regulator, struct notifier_block *nb) @@ -5180,6 +5229,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) @@ -5198,6 +5249,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) { @@ -5888,6 +5941,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 a negative error number on failure. */ static int regulator_suspend(struct device *dev) { @@ -5977,6 +6032,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) { @@ -5990,6 +6047,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) { @@ -6011,6 +6070,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 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) From patchwork Thu Aug 29 08:51:26 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: 13782804 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 C36EDC8300F for ; Thu, 29 Aug 2024 09:02:16 +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=sgPHavE7K4ClGYJgJpC5pW6t6qCTjxay4H8VAVIO8qM=; b=y+bBuRxuY/6e0EXLzGLljnP+rj ETlnYuNgZkKh16ycLC0XtORdlYhfVYenzXJZ5zFFjVwNN3SHN/4PGRn/5pdvDU+PB3jN2vyHjPm/6 IkcwI0XFCI+BcbrLTYganF0Upyh6ckCg1A54mtXavu1JuMbPeNR64ElAR+ghjhYNMZu48YGJIEWcr u3JjvViCKmXsD5qfgVFfp+OCyfv/4H94nHuxLkhUkPi52mlx7usJaI4LHRwF39H3Mf/hAIXjBZ0VO B9z6PnvQG67PYn4RM4cZ802FsO1W+aTFVMw1yAqO6QJCZQCSxVxVKXAB2OW+X9NSuyB6lZ0Og7ZEK aUxiC6mg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjb2b-00000001GMC-2OtS; Thu, 29 Aug 2024 09:02:05 +0000 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjasr-00000001Drl-3JxO for linux-arm-kernel@lists.infradead.org; Thu, 29 Aug 2024 08:52:03 +0000 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-20203988f37so3971315ad.1 for ; Thu, 29 Aug 2024 01:52:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724921521; x=1725526321; 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=sgPHavE7K4ClGYJgJpC5pW6t6qCTjxay4H8VAVIO8qM=; b=gPaUv3+L+TjONulc7BAKwpCpsGlu6GIBwnnp+NOawE9Ms8cjJeb0xjSPMngdoAhR6b TXY9WvYdmCfyMuPAYpm5GMJ/5YVzIZ6QKUwd7aO17baxx9RqePYqSIX4JdGBQt4Dvod/ pQ1F0YK7hNpy5yMWafRiD4TVn+eOVm7Ybmhu4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724921521; x=1725526321; 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=sgPHavE7K4ClGYJgJpC5pW6t6qCTjxay4H8VAVIO8qM=; b=auVten/JNOiLlsiAylH4FSGBhUPWT/OsFO6vmz1nnWlIHjAdUGXMYg0QaYuqXOGXdn 4miUkrWWkqMvRtoj6VNBb42MJ8HU/68tiUhnF6nsFtVQL1U9R5XAx6vqbY46rGEa2yEh xPGXgVLJeZzfNetk0itBMb8nEVY8zKW9mDcrFyBII34TrviFgHahwqo0zV539mVMW/fO wLXIdufo6LLmwFt4Z5m1PnM1ondY6N+mq7ZP3MXY8WmUEbe97YPsWxLPngpONpHViCPV aiEYt6Y+NsYqPsq0FULx0ZiinYe6zrQO6Mr0U6dBMIerk0ltyEF2PGOgTertpgJfrLCy y3nQ== X-Forwarded-Encrypted: i=1; AJvYcCUgzS5gQA+8RcEZiGB8mA6vn/aWrohwYZQP5+EBE9Uo70jQYkjEyi2ZqnK94TbnWOaewjn28nvQ4Mi+GBCS+/zS@lists.infradead.org X-Gm-Message-State: AOJu0Yx6HyQoA8WmeD1uMjXj8UDLEgE3RMEbsJnZ/Sz9T+YKMfixC1Uw x1+RjeXC6xbRklp/311pHzfA919J5zuXHY1BKLkIvNUFbk1Cuaevi9X1PMzL2Q== X-Google-Smtp-Source: AGHT+IHNUXOidI2Jf1faocA3YuPGFcSZUSZSENW9FgWaOxjFlPiWIkyXqvj6UuCHYbxvh0ZYtCh0GA== X-Received: by 2002:a17:902:d4c2:b0:1fd:a0b9:2be7 with SMTP id d9443c01a7336-2050c33e3eamr25630315ad.13.1724921520981; Thu, 29 Aug 2024 01:52:00 -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.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2024 01:52:00 -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 06/10] regulator: fixed: Fix incorrectly formatted kerneldoc "Return" section Date: Thu, 29 Aug 2024 16:51:26 +0800 Message-ID: <20240829085131.1361701-7-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_015201_900222_07772F2F X-CRM114-Status: GOOD ( 14.13 ) 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 --- 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/ --- 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..c3de9c783d26 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 a populated &struct fixed_voltage_config or %NULL if + * memory allocation fails. */ static struct fixed_voltage_config * of_get_fixed_voltage_config(struct device *dev, From patchwork Thu Aug 29 08:51:27 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: 13782805 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 EDD87C83010 for ; Thu, 29 Aug 2024 09:02:19 +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=SH5i9APy7hcIZsD71Cy0fPlXqstfyKV2jYdTC5JW2L8=; b=uDwlzsEbvt0wfeW2Sm3Q3MC1tG n3GWKowyuEzYIgsUXsmbCHFM47zMUSgwoFwceXxgYdkIWIF8TEcXTtZPZ7I/FbUuWSwbyIe6dW8u+ y6h46GakrDIVdiOMY5K7ik5Opm2yrzd48yugbmyiGULVjWVSnGC0zKdRhAts3ejkq1eqh+PY8ySmm RUvZPW5Zd5ZrDB/0XewtIv58xC8zqeCGo3O7AuSuoqL6tDLQpZHoJXlcJLYXWiz8MHWW8VMpATNso eUAITIZCxKHrGry/fDRCHogyLOprqPdl7fXFMTqg4PnMj93C5y09j7K0TsN15SZMXPUEnZy2YLxiR rUT/Xr8w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjb2c-00000001GMY-173e; Thu, 29 Aug 2024 09:02:06 +0000 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjasu-00000001Dt3-1VWX for linux-arm-kernel@lists.infradead.org; Thu, 29 Aug 2024 08:52:05 +0000 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-20231aa8908so3096105ad.0 for ; Thu, 29 Aug 2024 01:52:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724921523; x=1725526323; 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=SH5i9APy7hcIZsD71Cy0fPlXqstfyKV2jYdTC5JW2L8=; b=K86o9kD9oPniAxcWtNz5e319yDULhuijC9fYatGFvUu8tPKhzvGo3T3LWiAPIBgys0 TqNDtyoWBDrEWtoUduhwtex5GbFV/h+AN55twuA8XnrpbSklduSyaIcX/8coS/CPr+Ys Y7TTw5jo2Io7IgRItFPBSQeYB1XY3YR2vPU5Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724921523; x=1725526323; 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=SH5i9APy7hcIZsD71Cy0fPlXqstfyKV2jYdTC5JW2L8=; b=w02//7RhKlxC0uAcLtZjOQ6NUpURgB27jgPzWggrRSPcsKdLyqAxOG+w4ILgVde1X1 acAyuT7tLuUA5L96r11fYabfxoHYB/21wwZ55Vs5gWX/w4nw2RZv/sqPf7suHZlHpl2l zLH1/Lx1GcJvKKhnBE+1ituzvnUci8oO06az82Rn+xDNIek2kxz6pCupZFV7C52UeR5f L0ez6nvfys6CQxQODYBAOLZgM0oK3b46NQXfjChlZGvXKNa6jJOLCtNSWv5OQi5aMaU/ 2boAjBLABC6vsdQZ9SmK3d2UNwvM9+BSZ73tKMBgxNSyhiG3c+9yrH0HYr828ZGsJy4b 6OwQ== X-Forwarded-Encrypted: i=1; AJvYcCW+jWEISgs57ThhubClPhYouxRiVqww+WUIK/paZylC1SS4TWgRN7G31m9Hn6wTUk6oWjJZs3f15YWAixuAQ2vE@lists.infradead.org X-Gm-Message-State: AOJu0YzP45zCqc1zTK5aRRji6YFojYL/vbzdmGPuxn6/Ax+bKvgKyT9w 0fb0GsrFYqm1eL8mdHEyjhBuwSiHcUqgqeRKZkPfM3ghFAh7MRZHqW2/zg7xkxKeJznlKfln+QI = X-Google-Smtp-Source: AGHT+IGvMUAJLJKTXy1U/I9Oz2SRJocUKAPqs8ZLqPE3NaF6A1+zA4ieje9ST+i37tUB7r8buTiUFA== X-Received: by 2002:a17:902:f648:b0:1fb:4f8f:f212 with SMTP id d9443c01a7336-2050c4e89a1mr24399925ad.60.1724921523557; Thu, 29 Aug 2024 01:52:03 -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.52.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2024 01:52: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 v2 07/10] regulator: fixed-helper: Add missing "Return" kerneldoc section Date: Thu, 29 Aug 2024 16:51:27 +0800 Message-ID: <20240829085131.1361701-8-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_015204_416510_408ADD19 X-CRM114-Status: GOOD ( 12.58 ) 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 --- 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/ --- 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..b6cb0aaac3b1 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 allocation 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 Thu Aug 29 08:51:28 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: 13782807 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 4C2DFC83013 for ; Thu, 29 Aug 2024 09:02: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=7f9k7PpUQjpljatpt98ZEbTrZ2XDZjx22JMjFJskajY=; b=xDhQoEPmlgorZdTjQWGlMoijXZ hDemn7uId8ZjQ4iiPuGjeE5N0fsoffSMeepCaHzrAf4nOAXRiPYFhYhv1UFLvdDhEhJm+0ZcftMQp Paubg/lj8u73nAdJUwLcatm9xpCeAz0hMYAFZ0TwtBKrYFA5VxElcenb5bSwm34PtFmJfFx/zLpBn robY+F6GsT1ajHVStoEGYsyRLGzZUKEOi5S8zLri2Bhvei93COtZyYs+DvHQBtfgRCWFjYfaiuEaf Gw8i528sHjZ9OwsoWDBi7zh/GWplb8Vjv/pf2qlQ8ta/Ouy/FEM1JVziwhWErrFQxowtAFz45CMb5 Rtc2+0BQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjb2d-00000001GNO-2OF7; Thu, 29 Aug 2024 09:02:07 +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 1sjasw-00000001Du3-3zvZ for linux-arm-kernel@lists.infradead.org; Thu, 29 Aug 2024 08:52:08 +0000 Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-204f52fe74dso3561725ad.1 for ; Thu, 29 Aug 2024 01:52:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724921526; x=1725526326; 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=7f9k7PpUQjpljatpt98ZEbTrZ2XDZjx22JMjFJskajY=; b=CMHrnEKVG71FaMcHN4yfl4bV55sA77nmoUbhXOFDURwOzTrWCi1WTn1J9hQNpYp5BV QBmeAUEeso+iCtrQn1etkbmP7+8shCbKHZJGMAWBrM9PExtUjkBZRx7KTsgKiH7dI2Tv l6QdIZ2JRLi7qd0u3HxM0NidyIUz2yYhN7LOg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724921526; x=1725526326; 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=7f9k7PpUQjpljatpt98ZEbTrZ2XDZjx22JMjFJskajY=; b=CUi4heobKtABUtb4It3km9QEbDgNiGOqCf1swOhpLuj2gILCdET4hUN4WEtgXzCJFJ 5sLXv/7TOPIgBbIe3X9S2YTN2VyhiP/pWKB3ii1aNi4v6NLcywvOd0QKjqs3O0d0+sET C4BGZs/kEwl/iTrlz39+rp13OB2QNGPpkqXx4khghiDfjHB+OWsNFT3K0jysoqv+L4JP bo3/gU9rMnoZycXh28F3hhquZRVDgJWOS4q1rmYyIAMAzvYPcT1tVPYUfzSHrrTgD6eX 13DzNDHAzpnM8nyIoOBXZkx6cOUzUV9wLewjiYnrlkDOUAISPMN7suqRq8sEhMEpNUCO cHkw== X-Forwarded-Encrypted: i=1; AJvYcCU5Q8KiPZpNN5270Gd/l5o8mwan8DfD44ijvuYGMMpq0mlU7qq5EPay00IEgQnRMOWYlXbqcX/Dy/1s9QUVggIZ@lists.infradead.org X-Gm-Message-State: AOJu0YxWMXzW5jWj8AGNDayOfoHJ5z+DtKQ0cyb1fH1Jlhciw6eeE72h L8hUQgSsHe99rEDC5nBi/iWq4+gyFsELSYQ/9Pp9bPHIc8dWURRFLttq4uE9Gg== X-Google-Smtp-Source: AGHT+IGhKkcGNXI0K2CzplNu1hl3pLJjO1nnoCWwWYcUIQxyGIW+1Pl1x1rPn6MjaWMLeftQHomqJg== X-Received: by 2002:a17:902:ec84:b0:203:a0c7:3156 with SMTP id d9443c01a7336-2050c23699amr22267205ad.5.1724921526443; Thu, 29 Aug 2024 01:52:06 -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.52.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2024 01:52:05 -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 , Matti Vaittinen Subject: [PATCH v2 08/10] regulator: irq_helpers: Fix regulator_irq_map_event_simple() kerneldoc Date: Thu, 29 Aug 2024 16:51:28 +0800 Message-ID: <20240829085131.1361701-9-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_015207_041563_623B7C52 X-CRM114-Status: GOOD ( 14.42 ) 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. The function actually always returns 0, but fills in fields in its @rid parameter as needed. Expand the description of the parameter to cover this. While at it fix a typo found in the description of the same function. Reported-by: Matti Vaittinen Closes: https://lore.kernel.org/all/e341240e-1c1f-49a2-91cd-440888fdbda0@gmail.com/ Signed-off-by: Chen-Yu Tsai --- Changes since v1: - Update commit subject to reflect changes - Was 'regulator: irq_helpers: Add missing "Return" kerneldoc section' - Add period ('.') to the end of the "Return" section sentence - Fix typo in function description spotted by Marti - Describe output fields in @rid clearly --- drivers/regulator/irq_helpers.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/regulator/irq_helpers.c b/drivers/regulator/irq_helpers.c index 5ab1a0befe12..2de7b907c81d 100644 --- a/drivers/regulator/irq_helpers.c +++ b/drivers/regulator/irq_helpers.c @@ -404,16 +404,21 @@ EXPORT_SYMBOL_GPL(regulator_irq_helper_cancel); /** * regulator_irq_map_event_simple - regulator IRQ notification for trivial IRQs * - * @irq: Number of IRQ that occurred - * @rid: Information about the event IRQ indicates - * @dev_mask: mask indicating the regulator originating the IRQ + * @irq: Number of IRQ that occurred. + * @rid: Information about the event IRQ indicates. + * The function fills in the ®ulator_err_state->notifs + * and ®ulator_err_state->errors fields of + * ®ulator_irq_data->states as output. + * @dev_mask: mask indicating the regulator originating the IRQ. * * Regulators whose IRQ has single, well defined purpose (always indicate * exactly one event, and are relevant to exactly one regulator device) can - * use this function as their map_event callbac for their regulator IRQ - * notification helperk. Exactly one rdev and exactly one error (in + * use this function as their map_event callback for their regulator IRQ + * notification helper. 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. */ int regulator_irq_map_event_simple(int irq, struct regulator_irq_data *rid, unsigned long *dev_mask) From patchwork Thu Aug 29 08:51:29 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: 13782808 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 5AFD1C83027 for ; Thu, 29 Aug 2024 09:02:23 +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=SGXU5ZUf9Kum8MvTiT62dktX9ZINShim7TcYLEwJ+xA=; b=GSxFCrFbSJKsF57Z0NMob0JRt3 XdxkYqMC1yooSwIfe9KP4wSohD5hwqPUuSK8ZC5bGl7CqhsfHsuxyfNgvg+i4iHul8B2kqlt5l7jC Z3isMlI70pRHlKSkxWslQ/AyYyL2ne5PwUrlM3aQbiG6t8xsFn/lTD+uEVvF3mDkseos41EcxsWu5 z1LNvgPcxz32UYPkpZpLYwypKAW3ooGsNi7GW4odJpVtIkqexR+WrIChg+6NeLkD3eoFdUTGkwGaY +RXo0i6mxpPsVa18I6VQsldHCK8YjgSJjFqMvmAZ44boC0RedCnF0ALwlTqV/RmIbIqIRU3P97oyU zYfQbclA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjb2e-00000001GNl-1mAj; Thu, 29 Aug 2024 09:02:08 +0000 Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjasz-00000001Dul-0jj6 for linux-arm-kernel@lists.infradead.org; Thu, 29 Aug 2024 08:52:10 +0000 Received: by mail-pg1-x52d.google.com with SMTP id 41be03b00d2f7-7cd9e4f550dso124898a12.0 for ; Thu, 29 Aug 2024 01:52:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724921528; x=1725526328; 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=SGXU5ZUf9Kum8MvTiT62dktX9ZINShim7TcYLEwJ+xA=; b=hC2La3uPgXR8ZxBvcYfIOvPx2ymUBd2Lw7bxNHgh5jdkPFiOLuI/V9kntEocpSIgDg 241EGxlnrfqK6CtAUpbr6wCbf3GatQggaQkCT4DlPjXsAhZEp86TObbqA3VD3ryysG5+ eSdYmZCvgP9PnkTWcF8qXDg3IG0o668U38VoU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724921528; x=1725526328; 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=SGXU5ZUf9Kum8MvTiT62dktX9ZINShim7TcYLEwJ+xA=; b=asUfXfBjlu0b9DpsCTZUxwAcXR42QZmYnLtURkE33AOKvTHV1cBZj+ZYz7kK0yXnnw sTTIw5md8WbHUrVMZpn9RdLNwpmhAXlyM/Bql0tQtdKcD7Bu6nmka/FWrwwM83z3Nlrf MhW52iGL1ShkkNl8GqwAg1G6dg7F5Mab4FW/Pp5JdimITyAQ/mZDT15M1YWNkS3qKsGU YraOgH/yk9gsFFFhW2ihdqMnFMTWNd4ZwR9WsMTC7ZRfAXa5MFqecioWiT+75bj7TvkB hZ/YXz/KyZ3eKyGAODqSRxmgX3QsCLH0/mgAc4rksz6w4J6IhvJ0TEoIuZoUeCCB//Ie 1FxA== X-Forwarded-Encrypted: i=1; AJvYcCUBYdm+94Z84hj3d+DPhcj359l6tgB3fDDhHIyWuwIr84cd1fwAmIQWTHQ2+jsd398+UheArk/ABzRJsGK1TawS@lists.infradead.org X-Gm-Message-State: AOJu0Yz3YrTVZbdj6jMs/I6QQsgJUmFQM7dWx+wsYK9YvVOtkLK7gT46 Zn2Tbjkszu6Qim/idKXEZxAqJrdwbM7ZARyVlKVRGXFZVjGcUVDDnd6mlibBfQ== X-Google-Smtp-Source: AGHT+IHUyBDCpfIX5P3V2AMkg3EedGNWdt2N5Ptsh59Vr2CDGX3G67sN2tw4UC/flCPqMmOzvy7RXA== X-Received: by 2002:a17:903:32c1:b0:202:4bd9:aeb4 with SMTP id d9443c01a7336-2050c237b8cmr20017425ad.17.1724921528190; Thu, 29 Aug 2024 01:52:08 -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.52.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2024 01:52:07 -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 09/10] regulator: of: Fix kerneldoc format for of_regulator_bulk_get_all() Date: Thu, 29 Aug 2024 16:51:29 +0800 Message-ID: <20240829085131.1361701-10-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_015209_240172_7251A648 X-CRM114-Status: GOOD ( 14.62 ) 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 of_regulator_bulk_get_all() has a comment section that pretty much resembles a kerneldoc block, except that the block begins with "/*" instead of "/**". Fix that and also rework the "Return" section and the error code terminology so that it is the same as the other kerneldoc blocks in the same file. Fixes: 27b9ecc7a9ba ("regulator: Add of_regulator_bulk_get_all") Signed-off-by: Chen-Yu Tsai --- Changes since v1: - New patch --- drivers/regulator/of_regulator.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c index dfa9f42d4629..cec8c3647a00 100644 --- a/drivers/regulator/of_regulator.c +++ b/drivers/regulator/of_regulator.c @@ -737,20 +737,21 @@ static int is_supply_name(const char *name) return 0; } -/* +/** * of_regulator_bulk_get_all - get multiple regulator consumers * * @dev: Device to supply * @np: device node to search for consumers * @consumers: Configuration of consumers; clients are stored here. * - * @return number of regulators 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, and @consumers will not be * changed. + * + * Return: Number of regulators on success, or a negative error number + * on failure. */ int of_regulator_bulk_get_all(struct device *dev, struct device_node *np, struct regulator_bulk_data **consumers) From patchwork Thu Aug 29 08:51:30 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: 13782806 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 E8F3AC8300F for ; Thu, 29 Aug 2024 09:02: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=iWRchbsiI/jit0CfCKj74uSu6ttu4ROq7KriKtjM8cE=; b=b9lC+kOxopgCVCbU4eYV9dts99 QC/WFEfUm2ZpeOvqG9whEJMg0HJFgTugPTmuSE3Z5xsTmWCejtvwlEZB+hHifEIrCwN7Qqj67m4Zb VtZf3WJvS/uNAk+a4C5XJDEABDcHKTm1gT8oPzhfVJKiarjVRMTTj8q5KwaJQbl3JTdM2rbqaCS9r A8/UiQoratPMmyMzZQerZsLYvSAN2SN4Q97O/jqwPwtCoVb6ZXHSy413sB2NSOM6K1nfflDAx8HTR B7JjCjPqumVsole0AMyCDLL/6XbAjKz3gAoYZ9Tc3Hm3E+ibMioXo9D8StGGP64jjklvnCx+UWU+o tgEr4F0Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjb2f-00000001GPB-2IiG; Thu, 29 Aug 2024 09:02:09 +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 1sjat0-00000001Dvw-3dRT for linux-arm-kernel@lists.infradead.org; Thu, 29 Aug 2024 08:52:12 +0000 Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-2021c03c13aso3323075ad.1 for ; Thu, 29 Aug 2024 01:52:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724921530; x=1725526330; 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=iWRchbsiI/jit0CfCKj74uSu6ttu4ROq7KriKtjM8cE=; b=gZo7WwPxDVbgSdmzpDCxgOkK5TqmhV4z9w0dH1BhjjBrDYTSxKjJF0sx6o+8/XZ1y1 gbgEq/DOGwbdA9/27N50ULVUVAmYc/aWg5Qm4dSTLIl45VrX+hTo5mZ/Ai++EUtOWUIj UWxL7i/b1GunTyj4bDPq8IycBjBnBhydUi7H4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724921530; x=1725526330; 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=iWRchbsiI/jit0CfCKj74uSu6ttu4ROq7KriKtjM8cE=; b=ReHTdXpgoF9imYJ9xIWP8YnqXscvxukSKwvjf6sWVDzOoG+dMZPqa3IwpRb/yuHCri BrozvGjWiMv9tqKIIQqS5BUcEsPNZr4r2djtFqCXJlRLWkf8jmwed+YaZXkKRU/EBkZf 7Lz2240SxB4gWMUFYrGkOvoTTGiXhKo7Rz173KUJvuhcksqRm/7sM/iEPWQ/+lzruS7t 6WIeN9bb6tPewrdfOV8Myu2B3ErkiVxfFvyD/l8s7idiU9gbaSXFf+LVw9MOIfIT2brF yR+Y0YObuQ5IPSjJXA/j04KKAM0fCWq+O0n1iK6y5hATtk6JBVVtK6gUj74EG7DVUIgU 0zPQ== X-Forwarded-Encrypted: i=1; AJvYcCWbWnNQDfxGdWLxb7MUelL+7UIULPE8Jg+3zmkSphN2f5eR5G1hr2x+WUCh6jjlKIYpc0aZkhxQ1DQTAGV1yG5l@lists.infradead.org X-Gm-Message-State: AOJu0Yz1glap0V1m3vDkl6Pe+znLbBfvT1UdZBxet1PNTEes/VD2BD4c hH4avgwAQn9WnCPg1eKuQQJYsQmrABGGejlu/HGgy7Ay4nTKddX5k1zQFIvuxg== X-Google-Smtp-Source: AGHT+IGOtUweXCQpV0LrosRSEGtTwTNe13Qf96/F2cMlyFpBImeyvt9uH0ZmoT0phJz7470I5C5maQ== X-Received: by 2002:a17:902:da84:b0:202:60e:76f6 with SMTP id d9443c01a7336-2050ea4ce5emr31435735ad.29.1724921529985; Thu, 29 Aug 2024 01:52:09 -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.52.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2024 01:52:09 -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 10/10] regulator: Unify "negative error number" terminology in comments Date: Thu, 29 Aug 2024 16:51:30 +0800 Message-ID: <20240829085131.1361701-11-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_015210_946547_44DBE1CE X-CRM114-Status: GOOD ( 24.50 ) 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 Previous commits cleaning up kerneldoc used the term "negative error number" to refer to error condition return values. Update remaining instances of other terminology such as "error code" or "errno" as well so the whole regulator subsystem is unified. Signed-off-by: Chen-Yu Tsai --- Changes since v1: - New patch --- drivers/regulator/core.c | 2 +- drivers/regulator/devres.c | 18 +++++++++--------- drivers/regulator/fixed.c | 2 +- drivers/regulator/irq_helpers.c | 2 +- drivers/regulator/max77802-regulator.c | 4 ++-- drivers/regulator/qcom-rpmh-regulator.c | 6 +++--- drivers/regulator/qcom_smd-regulator.c | 2 +- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 0b929ab71188..c1d11924d892 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -3388,7 +3388,7 @@ EXPORT_SYMBOL_GPL(regulator_get_regmap); * 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. + * and 0 is returned, otherwise a negative error number is returned. */ int regulator_get_hardware_vsel_register(struct regulator *regulator, unsigned *vsel_reg, diff --git a/drivers/regulator/devres.c b/drivers/regulator/devres.c index 7111c46e9de1..1b893cdd1aad 100644 --- a/drivers/regulator/devres.c +++ b/drivers/regulator/devres.c @@ -163,7 +163,7 @@ EXPORT_SYMBOL_GPL(devm_regulator_get_optional); * In cases where the supply is not strictly required, callers can check for * -ENODEV error and handle it accordingly. * - * Returns: voltage in microvolts on success, or an error code on failure. + * Returns: voltage in microvolts on success, or an negative error number on failure. */ int devm_regulator_get_enable_read_voltage(struct device *dev, const char *id) { @@ -174,8 +174,8 @@ int devm_regulator_get_enable_read_voltage(struct device *dev, const char *id) * Since we need a real voltage, we use devm_regulator_get_optional() * rather than getting a dummy regulator with devm_regulator_get() and * then letting regulator_get_voltage() fail with -EINVAL. This way, the - * caller can handle the -ENODEV error code if needed instead of the - * ambiguous -EINVAL. + * caller can handle the -ENODEV negative error number if needed instead + * of the ambiguous -EINVAL. */ r = devm_regulator_get_optional(dev, id); if (IS_ERR(r)) @@ -276,7 +276,7 @@ static int _devm_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. + * @return 0 on success, a negative error number on failure. * * This helper function allows drivers to get several regulator * consumers in one operation with management, the regulators will @@ -299,7 +299,7 @@ EXPORT_SYMBOL_GPL(devm_regulator_bulk_get); * @num_consumers: number of consumers to register * @consumers: configuration of consumers; clients are stored here. * - * @return 0 on success, an errno on failure. + * @return 0 on success, a negative error number on failure. * * This helper function allows drivers to exclusively get several * regulator consumers in one operation with management, the regulators @@ -326,7 +326,7 @@ EXPORT_SYMBOL_GPL(devm_regulator_bulk_get_exclusive); * This is a convenience function to allow bulk regulator configuration * to be stored "static const" in files. * - * Return: 0 on success, an errno on failure. + * Return: 0 on success, a negative error number on failure. */ int devm_regulator_bulk_get_const(struct device *dev, int num_consumers, const struct regulator_bulk_data *in_consumers, @@ -393,7 +393,7 @@ static void devm_regulator_bulk_disable(void *res) * @num_consumers: number of consumers to register * @id: list of supply names or regulator IDs * - * @return 0 on success, an errno on failure. + * @return 0 on success, a negative error number on failure. * * This helper function allows drivers to get several regulator * consumers in one operation with management, the regulators will @@ -574,7 +574,7 @@ static void devm_regulator_unregister_supply_alias(struct device *dev, * lookup the supply * @num_id: number of aliases to register * - * @return 0 on success, an errno on failure. + * @return 0 on success, a negative error number on failure. * * This helper function allows drivers to register several supply * aliases in one operation, the aliases will be automatically @@ -726,7 +726,7 @@ static void regulator_irq_helper_drop(void *res) * IRQ. * @rdev_amount: Amount of regulators associated with this IRQ. * - * Return: handle to irq_helper or an ERR_PTR() encoded error code. + * Return: handle to irq_helper or an ERR_PTR() encoded negative error number. */ void *devm_regulator_irq_helper(struct device *dev, const struct regulator_irq_desc *d, int irq, diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c index c3de9c783d26..1cb647ed70c6 100644 --- a/drivers/regulator/fixed.c +++ b/drivers/regulator/fixed.c @@ -129,7 +129,7 @@ static irqreturn_t reg_fixed_under_voltage_irq_handler(int irq, void *data) * If it's an optional IRQ and not found, it returns 0. * Otherwise, it attempts to request the threaded IRQ. * - * Return: 0 on success, or error code on failure. + * Return: 0 on success, or a negative error number on failure. */ static int reg_fixed_get_irqs(struct device *dev, struct fixed_voltage_data *priv) diff --git a/drivers/regulator/irq_helpers.c b/drivers/regulator/irq_helpers.c index 2de7b907c81d..0aa188b2bbb2 100644 --- a/drivers/regulator/irq_helpers.c +++ b/drivers/regulator/irq_helpers.c @@ -333,7 +333,7 @@ static void init_rdev_errors(struct regulator_irq *h) * IRQ. * @rdev_amount: Amount of regulators associated with this IRQ. * - * Return: handle to irq_helper or an ERR_PTR() encoded error code. + * Return: handle to irq_helper or an ERR_PTR() encoded negative error number. */ void *regulator_irq_helper(struct device *dev, const struct regulator_irq_desc *d, int irq, diff --git a/drivers/regulator/max77802-regulator.c b/drivers/regulator/max77802-regulator.c index 69eb6abd2551..b2e87642bec4 100644 --- a/drivers/regulator/max77802-regulator.c +++ b/drivers/regulator/max77802-regulator.c @@ -160,8 +160,8 @@ static unsigned max77802_get_mode(struct regulator_dev *rdev) * Enable Control Logic3 by PWRREQ (LDO 3) * * If setting the regulator mode fails, the function only warns but does - * not return an error code to avoid the regulator core to stop setting - * the operating mode for the remaining regulators. + * not return a negative error number to avoid the regulator core to stop + * setting the operating mode for the remaining regulators. */ static int max77802_set_suspend_mode(struct regulator_dev *rdev, unsigned int mode) diff --git a/drivers/regulator/qcom-rpmh-regulator.c b/drivers/regulator/qcom-rpmh-regulator.c index 6b4cb7ba49c7..6c343b4b9d15 100644 --- a/drivers/regulator/qcom-rpmh-regulator.c +++ b/drivers/regulator/qcom-rpmh-regulator.c @@ -158,7 +158,7 @@ struct rpmh_vreg_init_data { * @wait_for_ack: Boolean indicating if execution must wait until the * request has been acknowledged as complete * - * Return: 0 on success, errno on failure + * Return: 0 on success, or a negative error number on failure */ static int rpmh_regulator_send_request(struct rpmh_vreg *vreg, struct tcs_cmd *cmd, bool wait_for_ack) @@ -317,7 +317,7 @@ static unsigned int rpmh_regulator_vrm_get_mode(struct regulator_dev *rdev) * This function is used in the regulator_ops for VRM type RPMh regulator * devices. * - * Return: 0 on success, errno on failure + * Return: 0 on success, or a negative error number on failure */ static unsigned int rpmh_regulator_vrm_get_optimum_mode( struct regulator_dev *rdev, int input_uV, int output_uV, int load_uA) @@ -409,7 +409,7 @@ static const struct regulator_ops rpmh_regulator_xob_ops = { * @pmic_rpmh_data: Pointer to a null-terminated array of rpmh-regulator * resources defined for the top level PMIC device * - * Return: 0 on success, errno on failure + * Return: 0 on success, or a negative error number on failure */ static int rpmh_regulator_init_vreg(struct rpmh_vreg *vreg, struct device *dev, struct device_node *node, const char *pmic_id, diff --git a/drivers/regulator/qcom_smd-regulator.c b/drivers/regulator/qcom_smd-regulator.c index 6761ada0cf7d..28e7ce60cb61 100644 --- a/drivers/regulator/qcom_smd-regulator.c +++ b/drivers/regulator/qcom_smd-regulator.c @@ -1386,7 +1386,7 @@ MODULE_DEVICE_TABLE(of, rpm_of_match); * @pmic_rpm_data: Pointer to a null-terminated array of qcom_smd-regulator * resources defined for the top level PMIC device * - * Return: 0 on success, errno on failure + * Return: 0 on success, or a negative error number on failure */ static int rpm_regulator_init_vreg(struct qcom_rpm_reg *vreg, struct device *dev, struct device_node *node,