lkml.org 
[lkml]   [2021]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH v1 1/3] i2c: mux: gpio: Replace custom acpi_get_local_address()
    +Cc: Rafael

    On Thu, Nov 18, 2021 at 12:24 PM Peter Rosin <peda@axentia.se> wrote:
    > On 2021-11-15 16:41, Andy Shevchenko wrote:

    ...

    > > - *adr = adr64;
    > > - if (*adr != adr64) {
    > > - dev_err(dev, "Address out of range\n");
    > > - return -ERANGE;
    > > - }
    >
    > In the conversion, I read it as if we lose this overflow check.

    It depends from which angle you look at this. We relaxed requirements.

    > Why is that
    > not a problem?

    The idea behind the acpi_get_local_address() is to provide a unified
    way between DT and ACPI for the same value. In either case we take
    only a 32-bit value. We might nevertheless add that check to the API.
    Rafael, what do you think?

    P.S. Just realized that in ACPI the higher part of the address may be
    used as flags by some interfaces (SoundWire is one of them), this is
    not applicable to I²C muxes right now, but who knows... So I prefer a
    relaxed version and, if necessary, documentation should be
    amended/updated.


    --
    With Best Regards,
    Andy Shevchenko

    \
     
     \ /
      Last update: 2021-11-18 11:34    [W:6.303 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site