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: <OS0PR01MB5922A08379222B0DF6D0323286E7A@OS0PR01MB5922.jpnprd01.prod.outlook.com>
Date:   Tue, 29 Aug 2023 18:02:51 +0000
From:   Biju Das <biju.das.jz@...renesas.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
CC:     Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
        Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>,
        "alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v2] ASoC: ak4642: Simplify probe()

Hi Andy,

> Subject: Re: [PATCH v2] ASoC: ak4642: Simplify probe()
> 
> On Mon, Aug 28, 2023 at 07:00:03PM +0100, Biju Das wrote:
> > Simpilfy probe() by replacing of_device_get_match_data() and id lookup
> > for retrieving match data by i2c_get_match_data() and replace
> > dev_err()->dev_err_probe().
> 
> ...
> 
> > -	if (np) {
> > -		const struct of_device_id *of_id;
> > -
> 
> > +	if (dev_fwnode(dev)) {
> 
> Why do we need this at all?
It is replacement for np.

> 
> >  		mcko = ak4642_of_parse_mcko(dev);
> >  		if (IS_ERR(mcko))
> >  			mcko = NULL;
> 
> This can suffice on its own, right?
> 
> Can be done in a separate change as a precursor to this one.

Agreed.

Cheers,
Biju
> 
> > -
> > -		of_id = of_match_device(ak4642_of_match, dev);
> > -		if (of_id)
> > -			drvdata = of_id->data;
> > -	} else {
> > -		const struct i2c_device_id *id =
> > -			i2c_match_id(ak4642_i2c_id, i2c);
> > -		drvdata = (const struct ak4642_drvdata *)id->driver_data;
> >  	}
> 
> --
> With Best Regards,
> Andy Shevchenko
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ