Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1442411 > unrolled thread

Re: [PATCH v3 1/4] mfd: mxs-lradc: Add support for mxs-lradc MFD

Started byLee Jones <lee.jones@linaro.org>
First post2016-07-13 14:50 +0200
Last post2016-07-14 18:10 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v3 1/4] mfd: mxs-lradc: Add support for mxs-lradc MFD Lee Jones <lee.jones@linaro.org> - 2016-07-13 14:50 +0200
    Re: [PATCH v3 1/4] mfd: mxs-lradc: Add support for mxs-lradc MFD Marek Vasut <marex@denx.de> - 2016-07-14 18:10 +0200

#1442411 — Re: [PATCH v3 1/4] mfd: mxs-lradc: Add support for mxs-lradc MFD

FromLee Jones <lee.jones@linaro.org>
Date2016-07-13 14:50 +0200
SubjectRe: [PATCH v3 1/4] mfd: mxs-lradc: Add support for mxs-lradc MFD
Message-ID<rUrLY-38m-29@gated-at.bofh.it>
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@linaro.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

[toc] | [next] | [standalone]


#1443558

FromMarek Vasut <marex@denx.de>
Date2016-07-14 18:10 +0200
Message-ID<rURn4-3qz-17@gated-at.bofh.it>
In reply to#1442411
On 07/13/2016 02:49 PM, Lee Jones wrote:
> 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@linaro.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.
>
It'd be nice if you explained in detail why not. Otherwise this is just 
empty splat.

-- 
Best regards,
Marek Vasut

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web