Re: [PATCH v4 2/4] PCI: Convert pci.c to pci_power_t helpers

From: andriy.shevchenko@xxxxxxxxx

Date: Mon Nov 23 2026 - 05:12:58 EST


On Sat, Nov 21, 2026 at 01:12:33PM +0000, Habil Eren Türker wrote:
> Convert PCI core code to use the pci_power_t helper functions
> when accessing the Power Management Control/Status register.
>
> Keep comparisons between values already typed as pci_power_t
> as direct typed comparisons.
>
> Resolved Sparse warnings:
>
> - drivers/pci/pci.c : warning: incorrect type in assignment
> (different base types) (4 warnings)
>
> - drivers/pci/pci.c : warning: invalid assignment: |= (3 warnings)

...

> - state = pmcsr & PCI_PM_CTRL_STATE_MASK;
> + need_restore = !(pmcsr & PCI_PM_CTRL_NO_SOFT_RESET) &&
> + (pci_power_t_eq(pci_power_t_get(pmcsr), PCI_D3hot) ||
> + dev->current_state >= PCI_D3hot);

Broken indentation. They should start from the same column as '!' above.

...

The rest looks fine.

--
With Best Regards,
Andy Shevchenko