[GIT PULL] Please pull powerpc/linux.git powerpc-4.16-1 tag

Michael Ellerman mpe at ellerman.id.au
Wed Feb 7 00:39:53 AEDT 2018


Linus Torvalds <torvalds at linux-foundation.org> writes:
> Hmm. This adds a
>
>    static inline void pci_uevent_ers(struct pci_dev *pdev, ..
>
> to include/linux/pci.h.
>
> Why?
>
> You do realize that that header file is included by almost every
> driver out there. Why is that magical function *so* important that it
> needs to be an inline function, and those strings etc duplicated in
> every user?
>
> Yes, that header file is already full of random inline functions, but
> they are generally wrapper functions that don't really do anything,
> and in many cases ithey are also basically configurable to really do
> nothing at all so that the compiler can remove all trace of something
> that isn't enabled.
>
> This function, in contrast, is simply not that at all. I see literally
> _zero_ reason why it should be an inline in a really core file.
>
> It's not important.
>
> It's not performance critical.
>
> It's not even used by any core drivers.

All true.

> I pulled this, but honestly, this part was *GARBAGE*. I'm used to
> people always thinking that *their* code is so important that it needs
> to be front and center, but this is just ridiculous shit.

I disagree. This was just a relatively new contributor looking for somewhere to
put a function so that it could be shared between powerpc code and the PCI AER
code, and choosing the easy but wrong option.

None of us think this code is important, we're not trying to put it "front and
center", there just isn't an obvious home for this function in an existing .c
file that doesn't cause it to be built in when it's not needed.

And yeah I should have caught it in review, so I have no problem with you being
annoyed about *that*.

Anyway I'll talk to Bjorn and find a better place for it.

cheers


More information about the Linuxppc-dev mailing list