Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp700948pxf; Thu, 25 Mar 2021 11:59:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYi/5BJrc+8VMXuEV7Icd/pI+I2YdkvuaBYY48ddhEUvmyEMMnp3anKfEPXkkySiDIJ0ML X-Received: by 2002:a17:906:5e01:: with SMTP id n1mr11140305eju.359.1616698792098; Thu, 25 Mar 2021 11:59:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616698792; cv=none; d=google.com; s=arc-20160816; b=GzV5aucvydOgvZ2D2wF7Eil5xHoL9viOI7cbRIZ+4bt7VgBwbBbpdzeR5Ws4SJGrbQ xOrBfSaWtaKkM8aac8CYn1uihGOw/5DXjqz0/9u9ON/E6xjEvSPB8+lByrZEco5V26a9 0wY6xuSJLGjEAPn8NwCuevK5UPjPQgYIlZiw8HzjPZLU18mkd0g1jCkMVn4MqUlfzNfi p/ZA58w+dShJOWmahvfZOOr8uNrwXzUOj+I7uGpW7KfZSfEhlO7ABNLou+eAhKmnemZR nT5q0WF8FND88+EJ0Ph+duCFRUOesPTJdCa40cs1AT8VTUfg/u+I/2yuuwEmYXzwLuR5 CwhA== 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 :message-id:date:subject:cc:to:from; bh=plVut98iLiJndqfP4cLCC30+v2hKyjxo8WnsEg1Zszw=; b=UAx0Q5ATNMKL7keueZD8vvps6wo5/0YP1eY8jQE47AqMqnzEmsdBwxsG++EKmdLV6x YfpqhcIE4cP8MHA8HgrApLCVXwGB/g8rzrmmduDbbp/B6HPyYwgwsT+p1nSCmy1e2gYD xsHB6ZiXwHjF48wXMskYYeAep52PeCuXRfkbKOJqijeafR3KcCeBqLFG4qP5s4tAIUVG PXYIsvifmxnTJH7lXu9Bmy91wBwoe3x/B7xsleTOWJ4+H3OI8ry7mAalP3RjVDe0MufD rpKFQIM1OYSJ5k9b2/bQNASz/NEBSLRwqSESTub9H3mN3+A6JhlkMh4MBjr+uiMhRPA8 Fkiw== 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 r16si5102607edw.458.2021.03.25.11.59.29; Thu, 25 Mar 2021 11:59:52 -0700 (PDT) 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 S230137AbhCYS6X (ORCPT + 99 others); Thu, 25 Mar 2021 14:58:23 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:41086 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229616AbhCYS54 (ORCPT ); Thu, 25 Mar 2021 14:57:56 -0400 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 2.0.3) id f1a3733c08f179dd; Thu, 25 Mar 2021 19:57:54 +0100 Received: from kreacher.localnet (89-64-80-106.dynamic.chello.pl [89.64.80.106]) (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 D7782669104; Thu, 25 Mar 2021 19:57:52 +0100 (CET) From: "Rafael J. Wysocki" To: Linux PCI , Linux ACPI Cc: LKML , Bjorn Helgaas , Mika Westerberg , David Box Subject: [PATCH] PCI: ACPI: PM: Fix debug message in acpi_pci_set_power_state() Date: Thu, 25 Mar 2021 19:57:51 +0100 Message-ID: <4319486.LvFx2qVVIh@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduledrudehtddguddvvdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfjqffogffrnfdpggftiffpkfenuceurghilhhouhhtmecuudehtdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkfgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhephfegtdffjeehkeegleejveevtdeugfffieeijeduuddtkefgjedvheeujeejtedvnecukfhppeekledrieegrdektddruddtieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeekledrieegrdektddruddtiedphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedprhgtphhtthhopehlihhnuhigqdhptghisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohephhgvlhhgrggrsheskhgvrhhnvghlrdhorhhgpdhrtghpthhtohepmhhikhgrrdifvghsthgvrhgsvghrgheslhhi nhhugidrihhnthgvlhdrtghomhdprhgtphhtthhopegurghvihgurdgvrdgsohigsehlihhnuhigrdhinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=6 Fuz1=6 Fuz2=6 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rafael J. Wysocki If PCI_D3cold is passed to acpi_pci_set_power_state() as the second argument and there is no ACPI D3cold support for the given device, the debug message printed by that function will state that the device power state has been changed to D3cold, while in fact it will be D3hot, because acpi_device_set_power() falls back to D3hot automatically if D3cold is not supported without returning an error. To address this issue, modify the debug message in question to print the current power state of the target PCI device's ACPI companion instead of printing the target power state which may not reflect the real final power state of the device. Signed-off-by: Rafael J. Wysocki --- drivers/pci/pci-acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-pm/drivers/pci/pci-acpi.c =================================================================== --- linux-pm.orig/drivers/pci/pci-acpi.c +++ linux-pm/drivers/pci/pci-acpi.c @@ -1021,7 +1021,7 @@ static int acpi_pci_set_power_state(stru if (!error) pci_dbg(dev, "power state changed by ACPI to %s\n", - acpi_power_state_string(state_conv[state])); + acpi_power_state_string(adev->power.state)); return error; }