Re: [PATCH v2 2/3] acpi: allow building without CONFIG_HAS_IOPORT

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

 



On Fri, Oct 11, 2024 at 09:59:46AM +0000, Arnd Bergmann wrote:
> On Fri, Oct 11, 2024, at 09:53, Andy Shevchenko wrote:
> > On Fri, Oct 11, 2024 at 06:18:18AM +0000, Arnd Bergmann wrote:

...

> >> +	if (!IS_ENABLED(CONFIG_HAS_IOPORT)) {
> >> +		*value = BIT_MASK(width);
> >> +		return AE_NOT_IMPLEMENTED;
> >
> > Perhaps it has already been discussed, but why do we need to file value with
> > semi-garbage when we know it's invalid anyway?
> 
> It's not strictly necessary, just precaution for possible callers
> that use the resulting data without checking the error code.

Do you have any examples of that in the kernel?

> The all-ones data is what an x86 PC would see when an I/O
> port is read that is not connected to any device.

Yes, but it's not what your code does.

-- 
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