linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Rosin <peda@axentia.se>
To: Andy Shevchenko <andy.shevchenko@gmail.com>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Wolfram Sang <wsa@the-dreams.de>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Evan Green <evgreen@chromium.org>,
	linux-i2c <linux-i2c@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Peter Korsgaard <peter.korsgaard@barco.com>
Subject: Re: [PATCH v1 1/3] i2c: mux: gpio: Replace custom acpi_get_local_address()
Date: Thu, 18 Nov 2021 12:24:55 +0100	[thread overview]
Message-ID: <fecc80b0-e24b-409d-5f60-82b899f0bdba@axentia.se> (raw)
In-Reply-To: <CAHp75VcF1TZ5hH42-D+0sRkYkN-A1r797LdHGMT93UO4Sp3wLQ@mail.gmail.com>

On 2021-11-18 11:33, Andy Shevchenko wrote:
> +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.

Splendid, just checking that you're on top of things. I don't think any
doc update is needed on the i2c-mux end, until flags in the upper bits
are introduced? So, looks good to me, thanks!

Acked-by: Peter Rosin <peda@axentia.se>

@Wolfram: You're finding this series in patchwork and will be picking it
up as usual, right? Thanks!

Cheers,
Peter

  reply	other threads:[~2021-11-18 11:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-15 15:41 [PATCH v1 1/3] i2c: mux: gpio: Replace custom acpi_get_local_address() Andy Shevchenko
2021-11-15 15:42 ` [PATCH v1 2/3] i2c: mux: gpio: Don't dereference fwnode from struct device Andy Shevchenko
2021-11-15 17:01   ` Evan Green
2021-11-18  9:48   ` Peter Rosin
2021-11-23 10:55   ` Wolfram Sang
2021-11-15 15:42 ` [PATCH v1 3/3] i2c: mux: gpio: Use array_size() helper Andy Shevchenko
2021-11-15 17:01   ` Evan Green
2021-11-18  9:49   ` Peter Rosin
2021-11-23 10:55   ` Wolfram Sang
2021-11-15 16:55 ` [PATCH v1 1/3] i2c: mux: gpio: Replace custom acpi_get_local_address() Evan Green
2021-11-18  9:36 ` Peter Rosin
2021-11-18 10:33   ` Andy Shevchenko
2021-11-18 11:24     ` Peter Rosin [this message]
2021-11-23 10:52       ` Wolfram Sang
2021-11-23 10:55 ` Wolfram Sang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fecc80b0-e24b-409d-5f60-82b899f0bdba@axentia.se \
    --to=peda@axentia.se \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=evgreen@chromium.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peter.korsgaard@barco.com \
    --cc=rafael@kernel.org \
    --cc=wsa@the-dreams.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).