Re: [RFC 28/32] PCI: make quirk using inw() depend on HAS_IOPORT

Niklas Schnelle
2021-12-28T15:27:20Z

On Mon, 2021-12-27 at 16:33 -0600, Bjorn Helgaas wrote:
> On Mon, Dec 27, 2021 at 05:43:13PM +0100, Niklas Schnelle wrote:
> > In the future inw()/outw() and friends will not be compiled on
> > architectures without I/O port support.
>
> This commit log actually doesn't say what the patch does.
>
> I'm pretty sure this particular quirk is x86 specific and could
> probably be moved to arch/x86/pci/fixup.c, where the #ifdef probably
> wouldn't be needed.

Will look into it, that does sound like a nicer solution. Thanks!

>
> If we keep it in drivers/pci, please update the subject line to make
> it more specific and match the convention, e.g.,
>
> PCI: Compile quirk_tigerpoint_bm_sts() only when HAS_IOPORT set

Ah yeah I was going back and forth between matching this within the
series vs matching the subsystem. I guess going with the subsystem is
mote important long term.

>
> BTW, git complains about some whitespace errors in other patches:
>
> Applying: char: impi, tpm: depend on HAS_IOPORT
> .git/rebase-apply/patch:92: trailing whitespace.
> If you have a TPM security chip from Atmel say Yes and it
> .git/rebase-apply/patch:93: trailing whitespace.
> will be accessible from within Linux. To compile this driver
> warning: 2 lines add whitespace errors.
> Applying: video: handle HAS_IOPORT dependencies
> .git/rebase-apply/patch:23: trailing whitespace.
>
> warning: 1 line adds whitespace errors.

That is very strange. I did run checkpatch before. There are a few
warnings not to touch obsolete code unnecessarily and a check about
using udelay() (pre-existing) plus two missing blank lines in pci-
quirks.h that I ignored because it matches the sorounding style.

I did notice that lore fails to render the subject lines for some of
the patches. But I just tried fetching the patches with b4 on top of
v5.16-rc7 and the resulting tree passes "./scripts/checkpatch.pl --git
v5.16-rc7..HEAD" and has an empty diff to my branch. What tool did you
use to check?

>
> > Co-developed-by: Arnd Bergmann <arnd@kernel.org>
> > Signed-off-by: Arnd Bergmann <arnd@kernel.org>
> > Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
> > ---
---8<---