Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2253738pxb; Fri, 5 Mar 2021 10:48:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJwutRCQRaRxPxE1n1gHrXNQbCyizwxnnE0wa/JWN+CCIjp1S5E64qXYqnDHFFfAf7PYx2p2 X-Received: by 2002:a05:6402:27d4:: with SMTP id c20mr10597299ede.271.1614970115690; Fri, 05 Mar 2021 10:48:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614970115; cv=none; d=google.com; s=arc-20160816; b=E7KjoWHDlFw+MNp6/lcPfojMbi/mSGOJXqyNvsM6pgzXJBXR3f/AqR3QG/TpMua0T2 GZJ+NwzAIANLIq+vjYvKpjVEaxdmjGY3K2GJSXWIokn+fAUO7xbPEYBHxRBgKtJOCxV1 uIQEdMnUGy1DntuPItpw/4R5LIWVvc734oqxMMqE6VQreS1walMijSrnXvli2UYoQkJ8 ORvMWqaWkSEesS/UgAjbzYDwkcReMpShs7vVJj2jxFZGed6tELDp+RBCXrzGa90lHOKE GfE+2a7fLRdHWoP+8WCYo5Ji3QwCbFg0PkybEIy9IJGXV7j4mRkS6853fXiPG0S9zJqI HXcw== 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=ZwV/6Ocxlgw6eGS1/Ci3Ryi5HWVwJm8r/lab/VR70bQ=; b=orNdpahQOZrG0zPI+/tXFKn5gLpq2yFOiKwn795Q6Ng7WOlU0MNClTor2+622RQsXK v9AvpXUz8ar3Ig1lLCsjAhMsogGRT38PVpl9+qEpKCx4AE3O46parafAs+4gz6RqbwJY p8CLzsPmE4Eu39mDJiohMb6V/7y6vNgETv9kBtXE+62gtKIk80E9x1gcbe+TWyWQgwxQ xyVGdz7FdrdDw8Xbjc5r38+T/Ix73l78JQshfyh7oX8s8iUbLlPT5sJmTiNJMNdRnfvc gkXEyZJ03sYfQer0nnR65G8ROkRl8dphXSJRRIAshEsX4Q6N5LRefljsl1j7gtY9mpgE WvyA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a99si2047623edf.587.2021.03.05.10.48.12; Fri, 05 Mar 2021 10:48:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230177AbhCESpQ (ORCPT + 99 others); Fri, 5 Mar 2021 13:45:16 -0500 Received: from cloudserver094114.home.pl ([79.96.170.134]:45302 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230045AbhCESom (ORCPT ); Fri, 5 Mar 2021 13:44:42 -0500 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 0.83.537) id 1d37435550e664f6; Fri, 5 Mar 2021 19:44:40 +0100 Received: from kreacher.localnet (89-64-81-9.dynamic.chello.pl [89.64.81.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by v370.home.net.pl (Postfix) with ESMTPSA id 85A2B663EA1; Fri, 5 Mar 2021 19:44:38 +0100 (CET) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Linux PM , Zhang Rui , Jonathan Cameron , Lars-Peter Clausen , Peter Meerwald-Stadler , linux-iio@vger.kernel.org, Jean Delvare , Guenter Roeck , linux-hwmon@vger.kernel.org Subject: [PATCH v1 1/4] ACPI: processor: perflib: Eliminate redundant status check Date: Fri, 05 Mar 2021 19:40:36 +0100 Message-ID: <3231858.06thYagCLy@kreacher> In-Reply-To: <2775419.haJ69vZeI0@kreacher> References: <2775419.haJ69vZeI0@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduledruddtiedguddtjecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfjqffogffrnfdpggftiffpkfenuceurghilhhouhhtmecuudehtdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepgfelheffhfetffelhfelteejffetteetgfetkeejvdfhfeeftdeufeevgeevieevnecukfhppeekledrieegrdekuddrleenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepihhnvghtpeekledrieegrdekuddrledphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedprhgtphhtthhopehlihhnuhigqdgrtghpihesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhpmhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehruhhirdiihhgrnhhgsehinhhtvghlrdgtohhmpdhrtghpthhtohepjhhitgdvfeeskhgvrhhnvghlrdhorhhgpdhrtghp thhtoheplhgrrhhssehmvghtrghfohhordguvgdprhgtphhtthhopehpmhgvvghrfiesphhmvggvrhifrdhnvghtpdhrtghpthhtoheplhhinhhugidqihhiohesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehjuggvlhhvrghrvgesshhushgvrdgtohhmpdhrtghpthhtoheplhhinhhugiesrhhovggtkhdquhhsrdhnvghtpdhrtghpthhtoheplhhinhhugidqhhifmhhonhesvhhgvghrrdhkvghrnhgvlhdrohhrgh X-DCC--Metrics: v370.home.net.pl 1024; Body=11 Fuz1=11 Fuz2=11 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rafael J. Wysocki One of the "status != AE_NOT_FOUND" checks in acpi_processor_get_platform_limit() is redundant, so rearrange the code to eliminate it. No functional impact. Signed-off-by: Rafael J. Wysocki --- drivers/acpi/processor_perflib.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) Index: linux-pm/drivers/acpi/processor_perflib.c =================================================================== --- linux-pm.orig/drivers/acpi/processor_perflib.c +++ linux-pm/drivers/acpi/processor_perflib.c @@ -63,14 +63,15 @@ static int acpi_processor_get_platform_l * (e.g. 0 = states 0..n; 1 = states 1..n; etc. */ status = acpi_evaluate_integer(pr->handle, "_PPC", NULL, &ppc); - - if (status != AE_NOT_FOUND) + if (status != AE_NOT_FOUND) { acpi_processor_ppc_in_use = true; - if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { - acpi_handle_warn(pr->handle, "_PPC evaluation failed: %s\n", - acpi_format_exception(status)); - return -ENODEV; + if (ACPI_FAILURE(status)) { + acpi_handle_warn(pr->handle, + "_PPC evaluation failed: %s\n", + acpi_format_exception(status)); + return -ENODEV; + } } pr_debug("CPU %d: _PPC is %d - frequency %s limited\n", pr->id,