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] [day] [month] [year] [list]
Message-ID: <6707575.DvuYhMxLoT@g550jk>
Date:   Wed, 26 Jan 2022 23:40:36 +0100
From:   Luca Weiss <luca@...tu.xyz>
To:     Bartosz Dudziak <bartosz.dudziak@...jp.pl>,
        ~postmarketos/upstreaming@...ts.sr.ht
Cc:     Andy Gross <agross@...nel.org>,
        Michael Turquette <mturquette@...libre.com>,
        Stephen Boyd <sboyd@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Jeffrey Hugo <jhugo@...eaurora.org>,
        Taniya Das <tdas@...eaurora.org>,
        linux-arm-msm@...r.kernel.org, linux-clk@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        ~postmarketos/upstreaming@...ts.sr.ht,
        Bjorn Andersson <bjorn.andersson@...aro.org>
Subject: Re: [PATCH 2/2] clk: qcom: Add MSM8226 Multimedia Clock Controller support

Hi Bartosz,

are you planning to work on this? If not I can pick it up and make a v2.
Please let me know!

Regards
Luca

On Montag, 6. Dezember 2021 17:12:20 CET Bjorn Andersson wrote:
> On Fri 12 Nov 19:58 CST 2021, Bartosz Dudziak wrote:
> > diff --git a/drivers/clk/qcom/mmcc-msm8974.c
> > b/drivers/clk/qcom/mmcc-msm8974.c
> [..]
> 
> >  static int mmcc_msm8974_probe(struct platform_device *pdev)
> >  {
> >  
> >  	struct regmap *regmap;
> > 
> > +	const struct of_device_id *match;
> > +
> > +	match = of_match_device(mmcc_msm8974_match_table, &pdev->dev);
> 
> Could you please use of_device_get_match_data() instead?
> 
> > +	if (!match)
> 
> As a general suggestion; I don't see how we would end up here with
> !match, but if we somehow do it would be during development and you
> would have an easier time debugging this by hitting a NULL pointer
> dereference with a callstack, than tracking down why your clocks are
> missing...
> 
> Thanks,
> Bjorn
> 
> > +		return -ENODEV;
> > 
> > -	regmap = qcom_cc_map(pdev, &mmcc_msm8974_desc);
> > +	regmap = qcom_cc_map(pdev, match->data);
> > 
> >  	if (IS_ERR(regmap))
> >  	
> >  		return PTR_ERR(regmap);
> > 
> > -	clk_pll_configure_sr_hpm_lp(&mmpll1, regmap, &mmpll1_config, true);
> > -	clk_pll_configure_sr_hpm_lp(&mmpll3, regmap, &mmpll3_config, false);
> > +	if (match->data == &mmcc_msm8974_desc) {
> > +		clk_pll_configure_sr_hpm_lp(&mmpll1, regmap, 
&mmpll1_config, true);
> > +		clk_pll_configure_sr_hpm_lp(&mmpll3, regmap, 
&mmpll3_config, false);
> > +	} else {
> > +		msm8226_clock_override();
> > +	}
> > 
> > -	return qcom_cc_really_probe(pdev, &mmcc_msm8974_desc, regmap);
> > +	return qcom_cc_really_probe(pdev, match->data, regmap);
> > 
> >  }
> >  
> >  static struct platform_driver mmcc_msm8974_driver = {




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ