All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	linux-kernel@vger.kernel.org
Cc: 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 13:45:02 +0300	[thread overview]
Message-ID: <aLgcLju74eF5V78-@smile.fi.intel.com> (raw)
In-Reply-To: <20250903081414.1972179-3-andriy.shevchenko@linux.intel.com>

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.

But I will wait for the reviews in general before mocking up v2 of this.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2025-09-03 10:45 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 [this message]
2025-09-03 12:19     ` Ilpo Järvinen
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=aLgcLju74eF5V78-@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=ilpo.jarvinen@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.