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: <CAKohpo=PMQanmVyo22HoqoXT2e3DUU8coPS85wDPDZjyFsRunQ@mail.gmail.com>
Date:	Tue, 20 Nov 2012 15:35:42 +0530
From:	Viresh Kumar <viresh.kumar@...aro.org>
To:	Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc:	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	Russell King <linux@....linux.org.uk>,
	Mike Turquette <mturquette@...com>
Subject: Re: [PATCH 3/3] CLK: add more managed APIs

On 20 November 2012 14:52, Dmitry Torokhov <dmitry.torokhov@...il.com> wrote:
> When converting a driver to managed resources it is desirable to be able to
> manage all resources in the same fashion. This change allows managing clocks
> in the same way we manage all otehr resources.

s/otehr/other

> This adds the following managed APIs:
>
> - devm_clk_prepare()/devm_clk_unprepare();
> - devm_clk_enable()/devm_clk_disable();
> - devm_clk_preapre_enable()/devm_clk_diable_unprepare().
>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@...il.com>
> ---
>  drivers/clk/clk-devres.c |  91 +++++++++++++++++++++++++++++++---------
>  include/linux/clk.h      | 105 +++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 177 insertions(+), 19 deletions(-)
>
> diff --git a/drivers/clk/clk-devres.c b/drivers/clk/clk-devres.c
> index 8f57154..2703fa9 100644
> --- a/drivers/clk/clk-devres.c
> +++ b/drivers/clk/clk-devres.c
> @@ -9,6 +9,33 @@
>  #include <linux/export.h>
>  #include <linux/gfp.h>
>
> +static int devm_clk_match(struct device *dev, void *res, void *data)
> +{
> +       struct clk **c = res;
> +       if (!c || !*c) {
> +               WARN_ON(!c || !*c);

I know, you just moved this routine higher in the file. But above two
lines look duplicated. Can we just use WARN(); here?

> +               return 0;
> +       }
> +       return *c == data;
> +}
> +
> +
> +static int devm_clk_create_devres(struct device *dev,
> +                                 struct clk *clk,
> +                                 void (*release)(struct device *, void *))

This didn't came in two lines?

> +{

Apart from that, looks fine.

Reviewed-by: Viresh Kumar <viresh.kumar@...aro.org>
--
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