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]
Message-ID: <CAKohpomFP5=eO7hFJyXQqM6_jOGT9gY+f3g3qqKgYwg5rgh3Ag@mail.gmail.com>
Date:	Thu, 16 Oct 2014 15:22:42 +0530
From:	Viresh Kumar <viresh.kumar@...aro.org>
To:	Kelvin Cheung <keguang.zhang@...il.com>
Cc:	"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	"Rafael J. Wysocki" <rjw@...ysocki.net>, linux-mips@...ux-mips.org,
	Ralf Baechle <ralf@...ux-mips.org>
Subject: Re: [PATCH 6/6] cpufreq: Loongson1: Add cpufreq driver for Loongson1B (UPDATED)

On 16 October 2014 15:00, Kelvin Cheung <keguang.zhang@...il.com> wrote:

Just to let u know, your mails are probably generated in html whereas they
should be in text mode.

> 2014-10-16 16:23 GMT+08:00 Viresh Kumar <viresh.kumar@...aro.org>:
>>
>> This is not how we send updated versions, GIT and other tools will commit
>> the "(UPDATED)" part while applying. What you were required to do was
>> something like:
>>
>> git format-patch A..B --subject-prefix="PATCH V2"
>
>
> I use 'updated' because only one patch in the patch set need to be updated.
> If you insist, I will regenerate this patch.

Even in that case you can do what I was saying. No, you don't need to resend
for that reason now. :)

>> On 15 October 2014 12:53, Kelvin Cheung <keguang.zhang@...il.com> wrote:
>> > +static int ls1x_cpufreq_remove(struct platform_device *pdev)
>> > +{
>> > +       cpufreq_unregister_notifier(&ls1x_cpufreq_notifier_block,
>> > +                                   CPUFREQ_TRANSITION_NOTIFIER);
>> > +       cpufreq_unregister_driver(&ls1x_cpufreq_driver);
>> > +       clk_put(ls1x_cpufreq.osc_clk);
>> > +       clk_put(ls1x_cpufreq.clk);
>> > +
>> > +       return 0;
>> > +}
>> > +
>> > +static int ls1x_cpufreq_probe(struct platform_device *pdev)
>> > +{
>> > +       struct plat_ls1x_cpufreq *pdata = pdev->dev.platform_data;
>> > +       struct clk *clk;
>> > +       int ret;
>> > +
>> > +       if (!pdata)
>> > +               return -EINVAL;
>> > +       if (!pdata->clk_name)
>> > +               return -EINVAL;
>> > +       if (!pdata->osc_clk_name)
>> > +               return -EINVAL;
>>
>> I didn't wanted you to do this, You could have done this:
>>
>>        if (!pdata || !pdata->clk_name || !pdata->osc_clk_name)
>>                return -EINVAL;
>>
>> So, just a || instead of && :)
>>
>> > +
>> > +       ls1x_cpufreq.dev = &pdev->dev;
>> > +
>> > +       clk = clk_get(NULL, pdata->clk_name);
>>
>> I believe we agreed for devm_clk_get(), isn't it ?
>
>
> In my case I think clk_get() is enough.

Obviously its enough but wouldn't it be better to use a infrastructure
which is somewhat better ?

> Moreover, most of cpufreq drivers use clk_get().

So what? Is that a good enough reason for adopting a good change?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ