From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932216AbdJWTGK (ORCPT ); Mon, 23 Oct 2017 15:06:10 -0400 Received: from mail-it0-f68.google.com ([209.85.214.68]:54652 "EHLO mail-it0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751822AbdJWTGG (ORCPT ); Mon, 23 Oct 2017 15:06:06 -0400 X-Google-Smtp-Source: ABhQp+QPaEMsAnihnqRvAMpL+WC4fjUhCY88cZQUAn+h3Mi/WO4HvOUPlLjBOEX5/VGCUjVGuIjjGaV+J45O4sbtfy8= MIME-Version: 1.0 In-Reply-To: <2094189.3ZuY7TBjup@aspire.rjw.lan> References: <3806130.B2KCK0tvef@aspire.rjw.lan> <2094189.3ZuY7TBjup@aspire.rjw.lan> From: Ulf Hansson Date: Mon, 23 Oct 2017 21:06:05 +0200 Message-ID: Subject: Re: [PATCH 05/12] PCI / PM: Drop unnecessary invocations of pcibios_pm_ops callbacks To: "Rafael J. Wysocki" Cc: Linux PM , Bjorn Helgaas , Alan Stern , Greg Kroah-Hartman , LKML , Linux ACPI , Linux PCI , Linux Documentation , Mika Westerberg , Andy Shevchenko , Kevin Hilman , Wolfram Sang , "linux-i2c@vger.kernel.org" , Lee Jones Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16 October 2017 at 03:29, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > The only user of non-empty pcibios_pm_ops is s390 and it only uses > "noirq" callbacks, so drop the invocations of the other pcibios_pm_ops > callbacks from the PCI PM code. > > That will allow subsequent changes to be somewhat simpler. > > Signed-off-by: Rafael J. Wysocki Reviewed-by: Ulf Hansson > --- > drivers/pci/pci-driver.c | 18 ------------------ > 1 file changed, 18 deletions(-) > > Index: linux-pm/drivers/pci/pci-driver.c > =================================================================== > --- linux-pm.orig/drivers/pci/pci-driver.c > +++ linux-pm/drivers/pci/pci-driver.c > @@ -918,9 +918,6 @@ static int pci_pm_freeze(struct device * > return error; > } > > - if (pcibios_pm_ops.freeze) > - return pcibios_pm_ops.freeze(dev); > - > return 0; > } > > @@ -982,12 +979,6 @@ static int pci_pm_thaw(struct device *de > const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; > int error = 0; > > - if (pcibios_pm_ops.thaw) { > - error = pcibios_pm_ops.thaw(dev); > - if (error) > - return error; > - } > - > if (pci_has_legacy_pm_support(pci_dev)) > return pci_legacy_resume(dev); > > @@ -1032,9 +1023,6 @@ static int pci_pm_poweroff(struct device > Fixup: > pci_fixup_device(pci_fixup_suspend, pci_dev); > > - if (pcibios_pm_ops.poweroff) > - return pcibios_pm_ops.poweroff(dev); > - > return 0; > } > > @@ -1107,12 +1095,6 @@ static int pci_pm_restore(struct device > const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; > int error = 0; > > - if (pcibios_pm_ops.restore) { > - error = pcibios_pm_ops.restore(dev); > - if (error) > - return error; > - } > - > /* > * This is necessary for the hibernation error path in which restore is > * called without restoring the standard config registers of the device. > >