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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250321114159.GJ1750245@google.com>
Date: Fri, 21 Mar 2025 11:41:59 +0000
From: Lee Jones <lee@...nel.org>
To: Colin Foster <colin.foster@...advantage.com>
Cc: Rasmus Villemoes <ravi@...vas.dk>, linux-kernel@...r.kernel.org,
	devicetree@...r.kernel.org,
	Felix Blix Everberg <felix.blix@...vas.dk>
Subject: Re: [PATCH 1/8] mfd: ocelot: refactor bus-specific regmap
 initialization

On Wed, 19 Mar 2025, Colin Foster wrote:

> On Wed, Mar 19, 2025 at 01:30:51PM +0100, Rasmus Villemoes wrote:
> > diff --git a/drivers/mfd/ocelot-core.c b/drivers/mfd/ocelot-core.c
> > index 41aff27088548..78b5fe15efdd2 100644
> > --- a/drivers/mfd/ocelot-core.c
> > +++ b/drivers/mfd/ocelot-core.c
> > @@ -200,10 +200,12 @@ static const struct mfd_cell vsc7512_devs[] = {
> >  static void ocelot_core_try_add_regmap(struct device *dev,
> >                                        const struct resource *res)
> >  {
> > +       struct ocelot_ddata *ddata = dev_get_drvdata(dev);
> > +
> >         if (dev_get_regmap(dev, res->name))
> >                 return;
> > 
> > -       ocelot_spi_init_regmap(dev, res);
> > +       ddata->init_regmap(dev, res);
> 
> I remember changing this from function pointers to the direct function
> call during initial development, per Lee's suggestion. I like it though,
> and I'm glad to see multiple users now.

Yeah, we're still not going to be putting call-backs into device data.

Either pass the differentiating config through to the core driver or
handle the differentiation inside the *-i2c.c / *-spi.c files.

-- 
Lee Jones [李琼斯]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ