Hi Andy, On Tue, Oct 25, 2022 at 04:23:27PM +0300, Andy Shevchenko wrote: > On Tue, Oct 25, 2022 at 03:36:06PM +0300, Mika Westerberg wrote: > > On Mon, Oct 24, 2022 at 02:25:12PM +0300, Mika Westerberg wrote: > > Just for the record in case this code will formally go out > > ... > > > + for (i = 0; i < PCI_ROM_RESOURCE; i++) { > > + const struct resource *dev_res = &dev->resource[i]; > > I believe this is a good candidate to have > > #define for_each_pci_dev_resource(dev, res) \ > for (unsigned int i = 0; \ > res = &(dev)->resource[i], i < PCI_ROM_RESOURCE; \ > i++) > > Since we have many places in the kernel with such a snippet. Sure makes sense, but I think that should be a separate patch series.