From: Dominik Brodowski <linux@dominikbrodowski.net>
To: "Krzysztof Wilczyński" <kw@linux.com>
Cc: "Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Mickaël Salaün" <mic@digikod.net>,
"Mika Westerberg" <mika.westerberg@linux.intel.com>,
"Michael Ellerman" <mpe@ellerman.id.au>,
"Arnd Bergmann" <arnd@arndb.de>,
"Bjorn Helgaas" <helgaas@kernel.org>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
"Juergen Gross" <jgross@suse.com>,
linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, sparclinux@vger.kernel.org,
linux-pci@vger.kernel.org, xen-devel@lists.xenproject.org,
"Miguel Ojeda" <ojeda@kernel.org>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Ivan Kokshaysky" <ink@jurassic.park.msu.ru>,
"Matt Turner" <mattst88@gmail.com>,
"Russell King" <linux@armlinux.org.uk>,
"Thomas Bogendoerfer" <tsbogend@alpha.franken.de>,
"Nicholas Piggin" <npiggin@gmail.com>,
"Christophe Leroy" <christophe.leroy@csgroup.eu>,
"David S. Miller" <davem@davemloft.net>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Stefano Stabellini" <sstabellini@kernel.org>,
"Oleksandr Tyshchenko" <oleksandr_tyshchenko@epam.com>
Subject: Re: [PATCH v2 4/4] pcmcia: Convert to use pci_bus_for_each_resource_p()
Date: Thu, 3 Nov 2022 19:38:07 +0100 [thread overview]
Message-ID: <Y2QKjzL+nH6Zabg7@owl.dominikbrodowski.net> (raw)
In-Reply-To: <Y2QImB0OLakzz1+F@rocinante>
Am Fri, Nov 04, 2022 at 03:29:44AM +0900 schrieb Krzysztof Wilczyński:
> Hello,
>
> [...]
> > > > -
> > > > - for (i = 0; i < PCI_BRIDGE_RESOURCE_NUM; i++) {
> > > > - res = s->cb_dev->bus->resource[i];
> > > > -#else
> > > > - pci_bus_for_each_resource(s->cb_dev->bus, res, i) {
> > > > #endif
> > > > +
> > > > + pci_bus_for_each_resource_p(s->cb_dev->bus, res) {
> > > > if (!res)
> > > > continue;
> > >
> > > Doesn't this remove the proper iterator for X86? Even if that is the right
> > > thing to do, it needs an explict explanation.
> >
> > I dunno what was in 2010, but reading code now I have found no differences in
> > the logic on how resources are being iterated in these two pieces of code.
>
> This code is over a decade old (13 years old to be precise) and there was
> something odd between Bjorn's and Jesse's patches, as per:
>
> 89a74ecccd1f ("PCI: add pci_bus_for_each_resource(), remove direct bus->resource[] refs")
> cf26e8dc4194 ("pcmcia: do not autoadd root PCI bus resources")
>
> > But fine, I will add a line to a commit message about this change.
>
> I wouldn't, personally. The change you are proposing is self-explanatory
> and somewhat in-line with what is there already - unless I am also reading
> the current implementation wrong.
>
> That said, Dominik is the maintainer of PCMCIA driver, so his is the last
> word, so to speak. :)
>
> > Considering this is done, can you issue your conditional tag so I will
> > incorporate it in v3?
>
> No need, really. Again, unless Dominik thinks otherwise.
Ah, thanks for the correction. Then v2 is perfectly fine.
Thanks,
Dominik
next prev parent reply other threads:[~2022-11-03 18:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-03 16:46 [PATCH v2 0/4] PCI: Add pci_dev_for_each_resource() helper and refactor bus one Andy Shevchenko
2022-11-03 16:46 ` [PATCH v2 1/4] PCI: Introduce pci_dev_for_each_resource() Andy Shevchenko
2022-11-03 16:46 ` [PATCH v2 2/4] PCI: Split pci_bus_for_each_resource_p() out of pci_bus_for_each_resource() Andy Shevchenko
2022-11-03 16:46 ` [PATCH v2 3/4] EISA: Convert to use pci_bus_for_each_resource_p() Andy Shevchenko
2022-11-03 16:46 ` [PATCH v2 4/4] pcmcia: " Andy Shevchenko
2022-11-03 17:03 ` Dominik Brodowski
2022-11-03 17:12 ` Andy Shevchenko
2022-11-03 17:25 ` Dominik Brodowski
2022-11-03 18:01 ` Andy Shevchenko
2022-11-03 18:29 ` Krzysztof Wilczyński
2022-11-03 18:38 ` Dominik Brodowski [this message]
2022-11-03 19:01 ` Andy Shevchenko
2022-11-03 18:59 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y2QKjzL+nH6Zabg7@owl.dominikbrodowski.net \
--to=linux@dominikbrodowski.net \
--cc=andriy.shevchenko@linux.intel.com \
--cc=arnd@arndb.de \
--cc=bhelgaas@google.com \
--cc=christophe.leroy@csgroup.eu \
--cc=davem@davemloft.net \
--cc=helgaas@kernel.org \
--cc=ink@jurassic.park.msu.ru \
--cc=jgross@suse.com \
--cc=kw@linux.com \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mattst88@gmail.com \
--cc=mic@digikod.net \
--cc=mika.westerberg@linux.intel.com \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=ojeda@kernel.org \
--cc=oleksandr_tyshchenko@epam.com \
--cc=rafael.j.wysocki@intel.com \
--cc=richard.henderson@linaro.org \
--cc=sparclinux@vger.kernel.org \
--cc=sstabellini@kernel.org \
--cc=tsbogend@alpha.franken.de \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).