mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Huisong Li <lihuisong@huawei.com>
To: <rafael@kernel.org>, <lenb@kernel.org>
Cc: <linux-acpi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<Sudeep.Holla@arm.com>, <linuxarm@huawei.com>,
	<jonathan.cameron@huawei.com>, <zhanjie9@hisilicon.com>,
	<zhenglifeng1@huawei.com>, <yubowen8@huawei.com>,
	<lihuisong@huawei.com>
Subject: [PATCH 2/3] ACPI: processor: idle: Redefine acpi_processor_setup_cpuidle_dev to void
Date: Tue, 25 Nov 2025 14:52:09 +0800	[thread overview]
Message-ID: <20251125065210.3670266-3-lihuisong@huawei.com> (raw)
In-Reply-To: <20251125065210.3670266-1-lihuisong@huawei.com>

Notice that the acpi_processor_setup_cpuidle_dev() don't need to
return any value because their callers don't check them anyway
and the function doesn't fail to execute.
So redefine the function to void.

No intentional functional impact.

Signed-off-by: Huisong Li <lihuisong@huawei.com>
---
 drivers/acpi/processor_idle.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index cdf86874a87a..2804fa91c1ec 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -1244,18 +1244,17 @@ static int acpi_processor_setup_cpuidle_states(struct acpi_processor *pr)
  * @pr: the ACPI processor
  * @dev : the cpuidle device
  */
-static int acpi_processor_setup_cpuidle_dev(struct acpi_processor *pr,
-					    struct cpuidle_device *dev)
+static void acpi_processor_setup_cpuidle_dev(struct acpi_processor *pr,
+					     struct cpuidle_device *dev)
 {
 	if (!pr->flags.power_setup_done || !pr->flags.power || !dev)
-		return -EINVAL;
+		return;
 
 	dev->cpu = pr->id;
 	if (pr->flags.has_lpi)
-		return 0;
+		return;
 
 	acpi_processor_setup_cpuidle_cx(pr, dev);
-	return 0;
 }
 
 static int acpi_processor_get_power_info(struct acpi_processor *pr)
-- 
2.33.0


  parent reply	other threads:[~2025-11-25  6:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-25  6:52 [PATCH 0/3] ACPI: processor: idle: Enhance LPI verification and Huisong Li
2025-11-25  6:52 ` [PATCH 1/3] ACPI: processor: idle: Relocate and verify acpi_processor_ffh_lpi_probe Huisong Li
2026-01-14 17:27   ` Rafael J. Wysocki
2026-01-15 12:09     ` lihuisong (C)
2026-01-15 13:06       ` Rafael J. Wysocki
2026-01-16  6:37         ` lihuisong (C)
2026-01-16 12:22           ` Rafael J. Wysocki
2025-11-25  6:52 ` Huisong Li [this message]
2025-11-25  6:52 ` [PATCH 3/3] ACPI: processor: idle: Redefine acpi_processor_setup_cpuidle_states to void Huisong Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251125065210.3670266-3-lihuisong@huawei.com \
    --to=lihuisong@huawei.com \
    --cc=Sudeep.Holla@arm.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=rafael@kernel.org \
    --cc=yubowen8@huawei.com \
    --cc=zhanjie9@hisilicon.com \
    --cc=zhenglifeng1@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®