On Wed, Apr 16, 2025 at 01:13:18PM +0300, Ilpo Järvinen wrote: > Convert open coded resource size calculations to use > resource_set_{range,size}() helpers. > > While at it, use SZ_* for size parameter which makes the intent of code > more obvious. ... > + resource_set_range(res, base, 1ULL << (segn_busn_bits + 20)); Then probably resource_set_range(res, base, BIT_ULL(segn_busn_bits) * SZ_1M); to follow the same "While at it"? ... > + resource_set_range(res, 0xC0000, SZ_128K); > res->flags = IORESOURCE_MEM | IORESOURCE_ROM_SHADOW | > IORESOURCE_PCI_FIXED; I'm wondering why not DEFINE_RES_MEM() in such cases? -- With Best Regards, Andy Shevchenko