Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2354875pxb; Mon, 20 Sep 2021 19:54:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8U3wNu63CzTP08cCsH6Cv3OMwQI9VVlyhb4ePzk94O6RlgxaV4ZpWaZjcf3oXkwvuCRHj X-Received: by 2002:a05:6638:b10:: with SMTP id a16mr22652283jab.149.1632192893184; Mon, 20 Sep 2021 19:54:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632192893; cv=none; d=google.com; s=arc-20160816; b=qNLRT+kXI01MkotlR4jY0oG5Pta43ZJiJfBw0dLYuvy4s7I9aoehlp/qSXbwiZBqBc YWNtSgiaXL34eFj32GGhyN6xsiTyUNKp1fW/IaIkuj+cwUaRWmvZLVftzaTL+aYOF49q niOiw9cZqv585+XgZSu4R253Ol+4RM6tKIF5zXE8JFd4crPW2sZX7KMjzBzqi2g2029f D3Ef8ccxkRGW2tI7uQ/HoZVBNpdvEz6KEricTGTlz/ossDiy+LyySKyR+0RTptQpIS+J qzd6TvdZTYDwLlrFZPyN18PRo9CyVkXQt82iV0ILNwVdN3134BnK1WLuAk5d76xKWawu fmUQ== 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=IFtCyZ+GGKIKfdwCGPw3URKQJZNuXX7ySw9MXf+deRA=; b=bp/KD26Tz5wWG7MkJ/A3rN7523loCz2W4rcpzSBQGyeh/XFi7hOMhTkJgrmrDijdN5 epcNE0+QI5tvdJjR1/8ew6x9fGCpqLzhUg4GReuplpXfaAOzZ88Y4hXZ2F2dKzsG08wp WGQWYBtkQz+8oBxSECPJ8UZZA3boqRkl4FwysPFHOIJWx2pQBy1T9R4jjhUzzD9tW7zD EcYz/CAvic/xrLsswdtd6T9/fUxfDb6/JiQRzQ47w4sFGbB7HJGcxAZZEHbva58OFPLx aqmx+UZRuNwvwW1IhdMcdNE2Rcr1z9UUPCDfwcUdwi84hcrFSLm1c97B6vvOPbGdLtWv Znrw== 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 67si8861296ioc.91.2021.09.20.19.54.41; Mon, 20 Sep 2021 19:54:53 -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 S1345728AbhITTVf (ORCPT + 99 others); Mon, 20 Sep 2021 15:21:35 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:46776 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230482AbhITTTe (ORCPT ); Mon, 20 Sep 2021 15:19:34 -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 3.0.0) id 148719d5bcbe4d5d; Mon, 20 Sep 2021 21:18:05 +0200 Received: from kreacher.localnet (unknown [213.134.187.25]) (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 8454666A65F; Mon, 20 Sep 2021 21:18:03 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux PCI Cc: Linux ACPI , LKML , Bjorn Helgaas , Andy Shevchenko , Mika Westerberg Subject: [PATCH v2 7/7] PCI: PM: Simplify acpi_pci_power_manageable() Date: Mon, 20 Sep 2021 21:17:39 +0200 Message-ID: <2024035.bB369e8A3T@kreacher> In-Reply-To: <1800633.tdWV9SEqCh@kreacher> References: <1800633.tdWV9SEqCh@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-CLIENT-IP: 213.134.187.25 X-CLIENT-HOSTNAME: 213.134.187.25 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvtddrudeivddgudefgecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfjqffogffrnfdpggftiffpkfenuceurghilhhouhhtmecuudehtdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepvdejlefghfeiudektdelkeekvddugfeghffggeejgfeukeejleevgffgvdeluddtnecukfhppedvudefrddufeegrddukeejrddvheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrddukeejrddvhedphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedprhgtphhtthhopehlihhnuhigqdhptghisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohephhgvlhhgrggrsheskhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprghnughrihihrdhshhgvvhgt hhgvnhhkoheslhhinhhugidrihhnthgvlhdrtghomhdprhgtphhtthhopehmihhkrgdrfigvshhtvghrsggvrhhgsehlihhnuhigrdhinhhtvghlrdgtohhm 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 Make acpi_pci_power_manageable() more straightforward. Signed-off-by: Rafael J. Wysocki --- New patch in v2. --- drivers/pci/pci-acpi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) Index: linux-pm/drivers/pci/pci-acpi.c =================================================================== --- linux-pm.orig/drivers/pci/pci-acpi.c +++ linux-pm/drivers/pci/pci-acpi.c @@ -969,9 +969,7 @@ bool acpi_pci_power_manageable(struct pc { struct acpi_device *adev = ACPI_COMPANION(&dev->dev); - if (!adev) - return false; - return acpi_device_power_manageable(adev); + return adev && acpi_device_power_manageable(adev); } bool acpi_pci_bridge_d3(struct pci_dev *dev)