lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aLgcLju74eF5V78-@smile.fi.intel.com>
Date: Wed, 3 Sep 2025 13:45:02 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
	linux-kernel@...r.kernel.org
Cc: Peter Tyser <ptyser@...-inc.com>, Lee Jones <lee@...nel.org>
Subject: Re: [PATCH v1 2/2] mfd: lpc_ich: Convert to use resource_rebase()

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



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ