Re: [PATCH 1/6] Clocklib: add generic framework for managingclocks.

From: Andrew Morton
Date: Mon Apr 07 2008 - 18:57:15 EST


On Thu, 3 Apr 2008 17:23:29 +0400
Dmitry Baryshkov <dbaryshkov@xxxxxxxxx> wrote:

> Provide a generic framework that platform may choose
> to support clocks api. In particular this provides
> platform-independant struct clk definition, a full
> implementation of clocks api and a set of functions
> for registering and unregistering clocks in a safe way.
>
> +static void __maybe_unused clks_unregister(struct clk **clks, size_t num)
> +static int __must_check __maybe_unused clks_register(struct clk **clks, size_t num)
> +static void __maybe_unused clk_free_functions(
> + struct clk_function *funcs,
> + int num)
> +static int __must_check __maybe_unused clk_alloc_functions(
> + struct clk_function *funcs,
> + int num)

What are all these __maybe_unused markers doing here?

> ...
>
> +int __must_check clk_alloc_function(const char *parent, struct clk *clk);

This should be `static int'. I'm surprised the compiler doesn't get
upset.

> + for (i = num - 1; i >= 0; i--) {
> + clk_unregister(&funcs[i].clk);
> + }
>
> ...
>
> + if (rc) {
> + kfree(clk);
> + }

There are a few coding-style glitches in here. Please run
scripts/checkpatch.pl and consider its reportage.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/