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: <20160713124935.GC11154@dell>
Date:	Wed, 13 Jul 2016 13:49:35 +0100
From:	Lee Jones <lee.jones@...aro.org>
To:	Harald Geyer <harald@...ib.org>
Cc:	Ksenija Stanojević 
	<ksenija.stanojevic@...il.com>, linux-kernel@...r.kernel.org,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	linux-input@...r.kernel.org, Jonathan Cameron <jic23@...nel.org>,
	Hartmut Knaack <knaack.h@....de>,
	Lars-Peter Clausen <lars@...afoo.de>,
	Peter Meerwald-Stadler <pmeerw@...erw.net>,
	Marek Vašut <marex@...x.de>,
	linux-iio@...r.kernel.org, Stefan Wahren <stefan.wahren@...e.com>,
	Fabio Estevam <fabio.estevam@...escale.com>
Subject: Re: [PATCH v3 1/4] mfd: mxs-lradc: Add support for mxs-lradc MFD

On Fri, 01 Jul 2016, Harald Geyer wrote:

> Hi Ksenija!
> 
> Ksenija Stanojević writes:
> > On Tue, Jun 28, 2016 at 6:28 PM, Lee Jones <lee.jones@...aro.org> wrote:
> > >> +static int mxs_lradc_add_device(struct platform_device *pdev,
> > >> +                             struct mxs_lradc *lradc, char *name, int i)
> > >> +{
> > >> +     struct mfd_cell *cell;
> > >> +
> > >> +     cell = &lradc->cells[i];
> > >> +     cell->name = name;
> > >> +     cell->platform_data = lradc;
> > >> +     cell->pdata_size = sizeof(*lradc);
> > >> +
> > >> +     return devm_mfd_add_devices(&pdev->dev, -1, cell, 1, NULL, 0, NULL);
> > >> +}
> > >
> > > Please don't roll your own API.
> > >
> > > Use 'struct mfd_cell' like everyone else does.
> > 
> > It has been suggested in previous reviews to use separate function to
> > register mfd device, and to make mfd_cell allocate dynamically because
> > struc mxs-lradc is allocated dynamically.
> > But I can revrse changes and make mfd_cells allocate staticaly
> > wthout separate function.
> 
> I think making mfd_cells members of struct mxs-lradc will address all
> review comments.

No, please don't do that either.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ