Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp710297pxf; Wed, 31 Mar 2021 14:10:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxSVEiRgjDHzEEAhNlvYh8vEVsLqsw0ITFNPNIsDqtBbXPuOJKEEAw/hJGloPG80LyIwo19 X-Received: by 2002:aa7:c903:: with SMTP id b3mr6184555edt.156.1617225029758; Wed, 31 Mar 2021 14:10:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617225029; cv=none; d=google.com; s=arc-20160816; b=1Bs3iIlgcqUuqEvPEPB60LVnLcWgPFyUwLJSy9zsgZ6G0pUK8GLYVs+FKrpQauyvdH AONEaU0uloVpcY7mwzRvo7462u+xphH7Qh6S6ccedHMTRb9rXuqZ8MqLHuZnKaa7QGXK wOzWH3btoRLOHw5uOGn8mcF/ciZe0y2ksV1glLEowW/SQXhQKCZIdzfKQTaksVVC+y+Q NbhcLdNBlGkjP/1bWDM3t4L662Jem4X/BvjXkSpvhl/jGSVLIlWomdx/7j0Ng/yleOHT ZG2D9eqHMjEdGKPJDkbYn14Gcwt2WbaH2GX9Hkdp06+YHeeHN3g12bGXXTfK9O4rgLz4 VrBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=w29xRtkoXFvqA84f2PJQOPfweBu+ytB2CHVSaDYGeyU=; b=sg6ZT8StlLtayv6BcG8tz5UY7vgST4LONKKWTlOKm+2M1s8dxQxYYtJcC2jYobfDl/ BW6bNCKD1R8p3aJ3TtclFqZ5vAQwN352FHGB2N5xXigWxoHCw5OrefvewBeW+kIgQgvn 0JvcgXSp0dcQZX/MO7ZW/SXNhmFnoR/DSU6kxbNNbfAEOyRpteDtbDme3I/5rYff9AP8 fD+DCag5ddQ4cQC5ubu1jATVLExedCl7NMZIe0E9sPyWtDWBI66Kk1Wnkz0FTsRk7ZV7 jgarYZRMkA9mUn7YSuOJ+yqMYvGprnSbfo+pZh/t8OT8mJsby2/1NAV591QVaqdyK9HZ /9Mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=B0F1phdg; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ss27si2584145ejb.322.2021.03.31.14.10.07; Wed, 31 Mar 2021 14:10:29 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=B0F1phdg; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232634AbhCaVI4 (ORCPT + 99 others); Wed, 31 Mar 2021 17:08:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:53378 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232207AbhCaVIr (ORCPT ); Wed, 31 Mar 2021 17:08:47 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7C54561056; Wed, 31 Mar 2021 21:08:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617224926; bh=YCB+fX2HMscEE/1zf6bDbsOvsLoFXezcqPV+qdKPTKA=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=B0F1phdgR2YSmzO5+/n6msLT2yJhy0ACKFiND7siEwJDmGwygr4JTCLabo3cnaoHE x50dLB8lMDXFXwm3g6pCPCvUhER58aquGK9BVhvJC4bAbipjD3ZyNd2FHSE+63EsDu iALnOdq3x6PzT3n5LPxy6a9NrT6E5KtIbfEje1IqABLIxxPGoG67fNymVR3vVbbKH0 jTIpUWhGu9CQN2dkhQRP1hG0zw4NWsuPdXGhXYWarSk3YPBmWvxnKiUtjd69hsWp9L 3BTeYwbVdKFlXJHADpFJSmvGPuzrhyEwKFptpt5pfPQ6E8hcKoEzZq1qtSkz/5rNuK swt5gjnHtXOeQ== Date: Wed, 31 Mar 2021 16:08:45 -0500 From: Bjorn Helgaas To: "Rafael J. Wysocki" Cc: Linux PCI , Linux ACPI , LKML , Mika Westerberg , David Box , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= Subject: Re: [PATCH] PCI: ACPI: PM: Fix debug message in acpi_pci_set_power_state() Message-ID: <20210331210845.GA1422864@bjorn-Precision-5520> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4319486.LvFx2qVVIh@kreacher> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 25, 2021 at 07:57:51PM +0100, Rafael J. Wysocki wrote: > 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 Applied with Krzysztof's reviewed-by to pci/pm for v5.13, thanks! Let me know if you have nearby or related changes that you'd rather take via your tree. > --- > 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; > } > > >