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: <1477647408.24014.6.camel@mtksdaap41>
Date:   Fri, 28 Oct 2016 17:36:48 +0800
From:   James Liao <jamesjj.liao@...iatek.com>
To:     Matthias Brugger <matthias.bgg@...il.com>
CC:     Sascha Hauer <kernel@...gutronix.de>,
        Rob Herring <robh@...nel.org>, <srv_heupstream@...iatek.com>,
        <devicetree@...r.kernel.org>, Kevin Hilman <khilman@...nel.org>,
        <linux-kernel@...r.kernel.org>,
        <linux-mediatek@...ts.infradead.org>,
        <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v9 1/4] soc: mediatek: Refine scpsys to support multiple
 platform

Hi Matthias,

Sorry for late reply due to our email service.

On Tue, 2016-10-25 at 16:04 +0200, Matthias Brugger wrote:
> Hi James,
> 
> On 10/20/2016 10:56 AM, James Liao wrote:
> > -static int scpsys_probe(struct platform_device *pdev)
> > +static void init_clks(struct platform_device *pdev, struct clk *clk[CLK_MAX])
> 
> I prefer struct clk **clk.

Okay.

> > +{
> > +	int i;
> > +
> > +	for (i = CLK_NONE + 1; i < CLK_MAX; i++)
> > +		clk[i] = devm_clk_get(&pdev->dev, clk_names[i]);
> > +}
> > +
> > +static struct scp *init_scp(struct platform_device *pdev,
> > +			const struct scp_domain_data *scp_domain_data, int num)
> >  {
> >  	struct genpd_onecell_data *pd_data;
> >  	struct resource *res;
> > -	int i, j, ret;
> > +	int i, j;
> >  	struct scp *scp;
> > -	struct clk *clk[MT8173_CLK_MAX];
> > +	struct clk *clk[CLK_MAX];
> 
> should be *[CLK_MAX - 1] but I would prefer to define in the enum:
> CLK_MAX = CLK_VENC_LT,

After init_clks() the clk[] will have valid contents between
clk[1]..clk[CLK_MAX-1], so it's necessary to declare clk[] with CLK_MAX
elements.

> If you are ok with it, I can fix both of my comments when applying.

Yes. struct clk **clk can be applied directly. But I think clk[CLK_MAX]
should be kept in current implementation.


Best regards,

James


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ