Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp981302pxb; Wed, 29 Sep 2021 14:05:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxj63Z8U+nILXTv9PMeh1vvMmp/SKg/0x9AqHSZmacVnZFSgiK0pMN5BTb8cNTaJbRG7i1F X-Received: by 2002:a62:8388:0:b0:44b:ae55:512 with SMTP id h130-20020a628388000000b0044bae550512mr762434pfe.40.1632949550445; Wed, 29 Sep 2021 14:05:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632949550; cv=none; d=google.com; s=arc-20160816; b=0ahjpYsCtkj4bIfXMBCamSO5GE+BLDirosPBz3jmCsYx7TJwELiMXYoXfxnMaesQ9e 4jIeAz1+IcvONYVLZU7+Cl487h9f8BykJZ2RJ7W0gFUyPMb6B0HYdqG4Vm3mcJvc9E81 Xc/SCXjX69/OqvEwh2PHaSmmM3m3tySxC+Wn7zC4X5heVqJ0P2h2FZHn3WK/tS4y85Od yb/0HnUVQBWlLnUjKUglpNcMX5sTQy26EOvzSSCewkXgIxNbKIR4HjHQeMwEVQP6s6Hg l8BxoD4jd93MXGOkUpROiePWqAI6lc/YhUGDB+yFlwnM0DLLv5MGqhpTfPwuqiL223OX BUjw== 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 :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Gi7jXwwUkzNVbx/n0xlW7V+s9PUQdFo7cveqERb4jnk=; b=yzTxapbcLNQJKMld7/8QQNkXjYPWsbkt0UHngX+Hi9lwNQf5C8IUpM5F5yKz5l6rq4 WD8FXep45hYprkgqoiWb473uoKJYhoPTh6jqz2iaeragLmYdgcNq0BJhnBXm4+bv3OEx KuQahxfRb4aIvrmHVXDJ/FTGMOxI9KJmXMxrf7IZbhmbN7j8Pgj0p+OxEQHh8J+4Zpac ruIfIzPi62aB5+1FC4Js8mowjjXS0PerNtqFjN3EEWqOPbNNeZumNFMb/q9t3+I9nzJl AN0k2ZEB4VRezQJ9axeY8O4S15m66cOARg5ugY6wY/wug/pQj4pTunTn3aGaOLN3pBZS ZvHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=btPVSf5x; 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 p7si955909pgk.575.2021.09.29.14.05.37; Wed, 29 Sep 2021 14:05:50 -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=btPVSf5x; 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 S1346415AbhI2TJx (ORCPT + 99 others); Wed, 29 Sep 2021 15:09:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:44822 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245276AbhI2TJt (ORCPT ); Wed, 29 Sep 2021 15:09:49 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9228B61506; Wed, 29 Sep 2021 19:08:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632942488; bh=V7P9Dpo+mgUjVW9uQztKl7TPFTOtCqIlyiXw//J0a4k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=btPVSf5x7vMYBcmJQXGjDQufdGB7+wjOy/1iDEdfKVnUipcgeBnw5JU7jBFyK00ix YZoR4thoCZKqiMIguMmT04BdtlIVeF0i3IsuPSPzK0aNLoWDjY/aDUwO2XO21kL+E0 5rholWmLqPj33VWKR3nhyfnjV7RNcquGdMWDstNsYDp+GSkqGFjfPgJmu6OKpd12sW akiKTy3ioJNpkN8aD1VAppF4Jbxa+qT5g5Vv+lRspuIdB2vVn9OO9sfVFcKQQmZJ5Z p0SfNbILnawfWuUYyqu/+385V8bJI7UH9Ph5R0uRpjsXig0t2etVtN9Ggsb1K8One2 dlXiBwC5dsmgA== Date: Wed, 29 Sep 2021 12:08:03 -0700 From: Nathan Chancellor To: "Rafael J. Wysocki" Cc: Linux PCI , Linux ACPI , LKML , Bjorn Helgaas , Andy Shevchenko , Mika Westerberg , llvm@lists.linux.dev Subject: Re: [PATCH v2 2/7] PCI: ACPI: PM: Do not use pci_platform_pm_ops for ACPI Message-ID: References: <1800633.tdWV9SEqCh@kreacher> <8879480.rMLUfLXkoz@kreacher> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8879480.rMLUfLXkoz@kreacher> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 20, 2021 at 09:17:08PM +0200, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > Using struct pci_platform_pm_ops for ACPI adds unnecessary > indirection to the interactions between the PCI core and ACPI PM, > which is also subject to retpolines. > > Moreover, it is not particularly clear from the current code that, > as far as PCI PM is concerned, "platform" really means just ACPI > except for the special casess when Intel MID PCI PM is used or when > ACPI support is disabled (through the kernel config or command line, > or because there are no usable ACPI tables on the system). > > To address the above, rework the PCI PM code to invoke ACPI PM > functions directly as needed and drop the acpi_pci_platform_pm > object that is not necessary any more. > > Accordingly, update some of the ACPI PM functions in question to do > extra checks in case the ACPI support is disabled (which previously > was taken care of by avoiding to set the pci_platform_ops pointer > in those cases). > > Signed-off-by: Rafael J. Wysocki This patch as commit 9896a58cdd59 ("PCI: ACPI: PM: Do not use pci_platform_pm_ops for ACPI") in -next causes the following build error when compiling x86_64 allmodconfig with clang: drivers/pci/pci-acpi.c:1125:7: error: variable 'adev' is uninitialized when used here [-Werror,-Wuninitialized] if (!adev || !acpi_device_power_manageable(adev)) ^~~~ drivers/pci/pci-acpi.c:1110:26: note: initialize the variable 'adev' to silence this warning struct acpi_device *adev; ^ = NULL 1 error generated. Should the adev assignment be moved up or is there a different fix necessary? Cheers, Nathan