lkml.org 
[lkml]   [2008]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/6] Clocklib: add generic framework for managing clocks.
On Thu, 3 Apr 2008 17:23:29 +0400
Dmitry Baryshkov <dbaryshkov@gmail.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.



\
 
 \ /
  Last update: 2008-04-08 00:59    [W:0.132 / U:0.516 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site