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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180705060733.GH22377@vkoul-mobl>
Date:   Thu, 5 Jul 2018 11:37:33 +0530
From:   Vinod <vkoul@...nel.org>
To:     Timur Tabi <timur@...nel.org>
Cc:     linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        Matt Mackall <mpm@...enic.com>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        Arnd Bergmann <arnd@...db.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-arm-msm@...r.kernel.org, Stephen Boyd <swboyd@...omium.org>,
        Timur Tabi <timur@...eaurora.org>
Subject: Re: [PATCH v4 6/6] crypto: qcom: Add ACPI support

On 04-07-18, 09:46, Timur Tabi wrote:
> On 7/4/18 6:44 AM, Vinod Koul wrote:
> > +	if (has_acpi_companion(&pdev->dev)) {
> > +		rng->skip_init = 1;
> > +	} else {
> > +		rng->clk = devm_clk_get(&pdev->dev, "core");
> > +		if (IS_ERR(rng->clk))
> > +			return PTR_ERR(rng->clk);
> > +
> > +		rng->skip_init =
> > +			(unsigned long)of_device_get_match_data(&pdev->dev);
> > +	}
> 
> There is a device_get_match_data() function, if you want to be consistent
> between ACPI and DT.

Yes we can add driver data in ACPI ID as well so code can be:

        if (!has_acpi_companion(&pdev->dev)) {
                rng->clk = devm_clk_get(&pdev->dev, "core");
                if (IS_ERR(rng->clk))
                        return PTR_ERR(rng->clk);
        }
        rng->skip_init = device_get_match_data(&pdev->dev);

Looks much neater.

I will wait for feedback on other patches before updating this.

Meanwhile any word from testing on ACPI systems?

Thanks
-- 
~Vinod

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ