Re: [PATCH v3 7/8] PCI: Make minimum bridge window alignment reference more obvious

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Tue, 7 May 2024, Mika Westerberg wrote:

> On Tue, May 07, 2024 at 01:25:22PM +0300, Ilpo Järvinen wrote:
> > Calculations related to bridge window size contain literal 20 that is
> > the minimum alignment for a bridge window. Make the code more obvious
> > by converting the literal 20 to __ffs(SZ_1MB).
> I think that's SZ_1M not SZ_1MB :)

Of course, that's the only place which is not checked by the compiler so 
it's the place where I type it wrong and forget to use backspace. :-)

> > Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx>
> Looks good, may be even add a #define for this but either way,

I considered that but I could not find a good name for the whole construct 
(with the __ffs() I mean). Perhaps PCI_BRIDGE_WINDOW_LSB could be an 
option but that feels somewhat clumsy to me.


[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux