Re: [PATCH] PCI: Unhide SMBus on Compaq Evo N620c

Jean Delvare
2005-09-07T18:11:47Z

Hi Dmitry, Lee, Rumen, all,

> > Should unlikely() be used for cases where the conditional will be
> > true iff a specific piece of hardware is present? Seems like we'd
> > always lose.
>
> I would say that we should definitely not use [un]likely for code that
> is executed once during boot.

I think that the point of using unlikely in pci/quirks is more political
than technical. PCI quirks are only needed because some manufacturers
don't play fair on purpose or are simply too bad to write a proper BIOS
init sequence. This shouldn't slow down the boot process for owners of
decent hardware that do not need such quirks, or at least should it slow
it down as little as possible. So it's only fair that the worst slowdown
happens when the quirks-needing hardware is actually found.

This consideration left apart, each test looking for a specific piece of
hardware, considered individually, is more likely to fail than succeed
on a random machine, so anyway the use of unlikely makes sense. Whether
or not we think it is worth the additional code is a different matter (I
do, but I know not everybody does.)

Thanks,
--
Jean Delvare