[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080407155559.cf7e2d24.akpm@linux-foundation.org>
Date: Mon, 7 Apr 2008 15:55:59 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Dmitry Baryshkov <dbaryshkov@...il.com>
Cc: linux-kernel@...r.kernel.org, haavard.skinnemoen@...el.com,
rmk+lkml@....linux.org.uk, lethal@...ux-sh.org,
philipp.zabel@...il.com, pavel@....cz, tony@...mide.com,
paul@...an.com
Subject: Re: [PATCH 1/6] Clocklib: add generic framework for managing
clocks.
On Thu, 3 Apr 2008 17:23:29 +0400
Dmitry Baryshkov <dbaryshkov@...il.com> 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@...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