Re: [PATCH 1/1] x86: Use resource_set_{range,size}() helpers

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

 



On Wed, Apr 16, 2025 at 02:53:51PM +0300, Ilpo Järvinen wrote:
> On Wed, 16 Apr 2025, Andy Shevchenko wrote:
> > On Wed, Apr 16, 2025 at 01:13:18PM +0300, Ilpo Järvinen wrote:

> > > +			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?
> 
> I guess you meant DEFINE_RES() as that seems to allow giving custom flags.
> However, DEFINE_RES*() will overwrite ->name which seems something that 
> ought to not be done here.

Okay, I haven't checked the initial state of name field here, so then
DEFINE_RES_MEM_NAMED()?  Or don't we have one?

In any case I would rather see a one assignment for these cases than something
hidden behind proposed conversions.

> I found one other case from the same file though which is truly defines
> a resource from scratch.


-- 
With Best Regards,
Andy Shevchenko






[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux