Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6484124rwb; Mon, 5 Dec 2022 13:04:16 -0800 (PST) X-Google-Smtp-Source: AA0mqf7nJKEjLjMz5Ae6ummN67Pv3vaQuad1NzelGKoxcSg81pkNsgSJmuce++i9XJwbffHwRqCQ X-Received: by 2002:a05:6a00:1413:b0:56b:8e99:a5e9 with SMTP id l19-20020a056a00141300b0056b8e99a5e9mr65878063pfu.24.1670274256523; Mon, 05 Dec 2022 13:04:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670274256; cv=none; d=google.com; s=arc-20160816; b=hflyDVzOoVIUyWBc0WdCnDkqcqrb8l6LWt9Lqtasr5aSHIOOUEsJ8a+Lvdgn0xVpgh kD0NZXnnRZsbQOxOy+zmU2Ajg1eF5yIKeoEyXSmQHZQpLxbdmh75k5QkTAL/QYOLQ72f 8ulvojvuAOH1cpO6cm8lv7TMCsyhROzSCw2M2c/KV59ZeGVQf2oMYHAHDBJJ1vycBlCh AALbnG5P8YCBe3iJtyVZiG8CQ9sRPbx8QsebBhFsyj+t6JkkmnzJpW+ROneDI+2H8MqH /UrEepaBrd6gSX4MFUp9Ci34qaDftidJmVRY6tBosuGFC8pwdWc+ImO3gpAHtX4h7dOl eL0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=dzBM01KCLbRyuPze19sOCfYJEY4mZ+70HROFKkDOAn4=; b=Ov8Cq5tYy8ksCJeGwQhKtEZF0Fnd4PZCU6AqispR0VtXPdrl3Sumhqn/2RKrWLijcJ IAjH6HU8gHXwDxPKS0U7Oaqfv+oOMJjI4iiGnwANVyEC9dhCR4WcGla2V7XPASllld2/ PfEstb6CN2sUJvV6EHr+oscyH4Vj43nVycDxE10ogkYM9vbmFngLqBsfdk4tDmfRX7K0 S6SgqlbyZf/HqylC7a27E622PB+pOQ7shtYlOFbwyrwh2rDbvkxHMVDHR1N2DWDjFQlz wUzUOZnM0/JD6V8JAMnsFCyWbLI2xxzrtthLNXYnF+He55z/asZnGW7oplkdhnatk3oX t5Hg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k63-20020a638442000000b00476d1591b76si15614107pgd.119.2022.12.05.13.04.05; Mon, 05 Dec 2022 13:04:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232490AbiLETIQ (ORCPT + 80 others); Mon, 5 Dec 2022 14:08:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230352AbiLETIP (ORCPT ); Mon, 5 Dec 2022 14:08:15 -0500 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2826DDF33; Mon, 5 Dec 2022 11:08:14 -0800 (PST) Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_relay_lmtp) via UNIX with SMTP (IdeaSmtpServer 5.1.0) id 517f8ee01c49655d; Mon, 5 Dec 2022 20:08:12 +0100 Received: from kreacher.localnet (unknown [213.134.188.181]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by v370.home.net.pl (Postfix) with ESMTPSA id C38072801EA0; Mon, 5 Dec 2022 20:08:11 +0100 (CET) Authentication-Results: v370.home.net.pl; dmarc=none (p=none dis=none) header.from=rjwysocki.net Authentication-Results: v370.home.net.pl; spf=fail smtp.mailfrom=rjwysocki.net From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Linux PM , Zhang Rui , Srinivas Pandruvada Subject: [PATCH v1 5/5] ACPI: processor: perflib: Adjust acpi_processor_notify_smm() return value Date: Mon, 05 Dec 2022 20:08:00 +0100 Message-ID: <21694351.EfDdHjke4D@kreacher> In-Reply-To: <1836012.tdWV9SEqCh@kreacher> References: <1836012.tdWV9SEqCh@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-CLIENT-IP: 213.134.188.181 X-CLIENT-HOSTNAME: 213.134.188.181 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrudeggdduvdduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepvdffueeitdfgvddtudegueejtdffteetgeefkeffvdeftddttdeuhfegfedvjefhnecukfhppedvudefrddufeegrddukeekrddukedunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvddufedrudefgedrudekkedrudekuddphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedpnhgspghrtghpthhtohephedprhgtphhtthhopehlihhnuhigqdgrtghpihesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhpmhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehruhhirdiihhgrnhhgsehinhhtvghlrdgtohhmpdhrtghpthht ohepshhrihhnihhvrghsrdhprghnughruhhvrggurgeslhhinhhugidrihhnthgvlhdrtghomh X-DCC--Metrics: v370.home.net.pl 1024; Body=5 Fuz1=5 Fuz2=5 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rafael J. Wysocki Avoid returning a confusing error code from acpi_processor_notify_smm() if it is called for the second time in the case when SMM notification regarding P-state control is not supported. Signed-off-by: Rafael J. Wysocki --- drivers/acpi/processor_perflib.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) Index: linux-pm/drivers/acpi/processor_perflib.c =================================================================== --- linux-pm.orig/drivers/acpi/processor_perflib.c +++ linux-pm/drivers/acpi/processor_perflib.c @@ -475,10 +475,12 @@ int acpi_processor_notify_smm(struct mod result = acpi_processor_pstate_control(); if (result <= 0) { - if (!result) + if (result) { + is_done = result; + } else { pr_debug("No SMI port or pstate_control\n"); - - is_done = -EIO; + is_done = 1; + } goto out_put; }