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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z63B2dxEd0g1ppra@smile.fi.intel.com>
Date: Thu, 13 Feb 2025 11:56:41 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Sebastian Reichel <sebastian.reichel@...labora.com>
Cc: Bence Csókás <csokas.bence@...lan.hu>,
	Wolfram Sang <wsa+renesas@...g-engineering.com>,
	linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-pm@...r.kernel.org, Samuel Holland <samuel@...lland.org>
Subject: Re: [PATCH v1 1/2] power: ip5xxx_power: Make use of
 i2c_get_match_data()

On Wed, Feb 12, 2025 at 06:07:19PM +0100, Sebastian Reichel wrote:
> On Wed, Feb 12, 2025 at 06:46:23PM +0200, Andy Shevchenko wrote:
> > Get matching data in one step by switching to use i2c_get_match_data().

...

> Acked-by: Sebastian Reichel <sebastian.reichel@...labora.com>

Thank you!

...

> >  static int ip5xxx_power_probe(struct i2c_client *client)
> >  {
> > -	const struct ip5xxx_regfield_config *fields = &ip51xx_fields;
> > +	const struct ip5xxx_regfield_config *fields;
> >  	struct power_supply_config psy_cfg = {};
> >  	struct device *dev = &client->dev;

> >  	const struct of_device_id *of_id;

Seems I forgot to drop this (unused) variable.

> > @@ -843,9 +843,7 @@ static int ip5xxx_power_probe(struct i2c_client *client)
> >  	if (IS_ERR(ip5xxx->regmap))
> >  		return PTR_ERR(ip5xxx->regmap);
> >  
> > -	of_id = i2c_of_match_device(dev->driver->of_match_table, client);
> > -	if (of_id)
> > -		fields = (const struct ip5xxx_regfield_config *)of_id->data;
> > +	fields = i2c_get_match_data(client) ?: &ip51xx_fields;

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ