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>] [day] [month] [year] [list]
Date:	Thu, 30 Jun 2016 17:08:16 +0800
From:	Peter Chen <hzpeterchen@...il.com>
To:	Stephen Boyd <stephen.boyd@...aro.org>
Cc:	linux-usb@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org,
	Andy Gross <andy.gross@...aro.org>,
	Bjorn Andersson <bjorn.andersson@...aro.org>,
	Neil Armstrong <narmstrong@...libre.com>,
	Arnd Bergmann <arnd@...db.de>, Felipe Balbi <balbi@...nel.org>,
	Peter Chen <peter.chen@....com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH 17/21] usb: chipidea: msm: Make platform data driver
 local instead of global

On Wed, Jun 29, 2016 at 12:17:12PM -0700, Stephen Boyd wrote:
> Quoting Peter Chen (2016-06-29 04:29:25)
> > On Sun, Jun 26, 2016 at 12:28:34AM -0700, Stephen Boyd wrote:
> > > @@ -204,7 +201,7 @@ static int ci_hdrc_msm_probe(struct platform_device *pdev)
> > >       of_node_put(ulpi_node);
> > >  
> > >       plat_ci = ci_hdrc_add_device(&pdev->dev, pdev->resource,
> > > -                                  pdev->num_resources, &ci_hdrc_msm_platdata);
> > > +                                  pdev->num_resources, &ci->pdata);
> > >       if (IS_ERR(plat_ci)) {
> > >               dev_err(&pdev->dev, "ci_hdrc_add_device failed!\n");
> > >               ret = PTR_ERR(plat_ci);
> > 
> > You can do something like ci_hdrc_usb2.c, it looks simpler. 
> > 
> 
> Do what exactly? I'd rather not do a structure copy because that wastes
> some memory for a structure that is just a template. We add some more
> code here to assign values directly, but that is smaller size wise than
> the large platdata structure that only has a few values set in it.

But you add one struct ci_hdrc_platform_data pdata entry at struct
ci_hdrc_msm which needs to allocate the memory too. Anyway, it is not a 
big problem.

Acked-by: Peter Chen <peter.chen@....com>

-- 

Best Regards,
Peter Chen

Powered by blists - more mailing lists