Re: [PATCH 5/7] PCI/PM: Make power management op coding style consistent

2019-10-16 Thread Dan Carpenter
On Mon, Oct 14, 2019 at 06:00:14PM -0500, Bjorn Helgaas wrote: > From: Bjorn Helgaas > > Some of the power management ops use this style: > > struct device_driver *drv = dev->driver; > if (drv && drv->pm && drv->pm->prepare(dev)) > drv->pm->prepare(dev); > > while others use this: > >

Re: [PATCH 5/7] PCI/PM: Make power management op coding style consistent

2019-10-15 Thread Rafael J. Wysocki
On Tuesday, October 15, 2019 1:00:14 AM CEST Bjorn Helgaas wrote: > From: Bjorn Helgaas > > Some of the power management ops use this style: > > struct device_driver *drv = dev->driver; > if (drv && drv->pm && drv->pm->prepare(dev)) > drv->pm->prepare(dev); > > while others use this: >

[PATCH 5/7] PCI/PM: Make power management op coding style consistent

2019-10-14 Thread Bjorn Helgaas
From: Bjorn Helgaas Some of the power management ops use this style: struct device_driver *drv = dev->driver; if (drv && drv->pm && drv->pm->prepare(dev)) drv->pm->prepare(dev); while others use this: const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; if (pm && pm-