From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Peter Tyser <ptyser@xes-inc.com>, Lee Jones <lee@kernel.org>
Subject: Re: [PATCH v1 2/2] mfd: lpc_ich: Convert to use resource_rebase()
Date: Wed, 3 Sep 2025 15:19:23 +0300 (EEST) [thread overview]
Message-ID: <c0a40afb-aff9-f68d-c9e5-179b90a61434@linux.intel.com> (raw)
In-Reply-To: <aLgcLju74eF5V78-@smile.fi.intel.com>
On Wed, 3 Sep 2025, Andy Shevchenko wrote:
> On Wed, Sep 03, 2025 at 10:12:29AM +0200, Andy Shevchenko wrote:
> > Simplify the resource handling by converting to use resource_rebase().
> > No functional change intended.
>
> ...
>
> > for (i = 0; i < info->nr_resources; i++) {
> > struct resource *mem = info->resources[i];
> > - resource_size_t offset = info->offsets[i];
> >
> > - /* Fill MEM resource */
> > - mem->start = base.start + offset;
> > - mem->end = base.start + offset + INTEL_GPIO_RESOURCE_SIZE - 1;
> > - mem->flags = base.flags;
> > + /* Rebase MEM resource */
> > + resource_rebase(mem, base.start);
> > }
>
> We may gain 3 LoC more by dropping temporary variable.
Yeah, drop that super-obvious comment as well. :-)
> But I will wait for the reviews in general before mocking up v2 of this.
>
>
--
i.
next prev parent reply other threads:[~2025-09-03 12:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-03 8:12 [PATCH v1 0/2] mfd: lpc_ich: Simplify GPIO resource handling Andy Shevchenko
2025-09-03 8:12 ` [PATCH v1 1/2] resource: Introduce resource_rebase() helper Andy Shevchenko
2025-09-03 12:29 ` Ilpo Järvinen
2025-09-03 15:20 ` Andy Shevchenko
2025-09-03 8:12 ` [PATCH v1 2/2] mfd: lpc_ich: Convert to use resource_rebase() Andy Shevchenko
2025-09-03 10:45 ` Andy Shevchenko
2025-09-03 12:19 ` Ilpo Järvinen [this message]
2025-09-04 8:08 ` [PATCH v1 0/2] mfd: lpc_ich: Simplify GPIO resource handling Andy Shevchenko
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=c0a40afb-aff9-f68d-c9e5-179b90a61434@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ptyser@xes-inc.com \
/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).