[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130117.070327.1625310713330263780.hdoyu@nvidia.com>
Date: Thu, 17 Jan 2013 06:03:27 +0100
From: Hiroshi Doyu <hdoyu@...dia.com>
To: "swarren@...dotorg.org" <swarren@...dotorg.org>
CC: Prashant Gaikwad <pgaikwad@...dia.com>,
"mturquette@...aro.org" <mturquette@...aro.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 2/9] clk: tegra: Add tegra specific clocks
Stephen Warren <swarren@...dotorg.org> wrote @ Wed, 16 Jan 2013 21:11:24 +0100:
> >> +static int clk_frac_div_set_rate(struct clk_hw *hw, unsigned long rate,
> >> + unsigned long parent_rate)
> >> +{
> >> + struct tegra_clk_frac_div *divider = to_clk_frac_div(hw);
> >> + int div;
> >> + unsigned long flags = 0;
> >
> > nit, is "flags" not needed to initialize here?
>
> It avoids a compiler warning; the compiler doesn't that the if condition
> that guards the path that uses flags is the same condition as the path
> that initializes it. Or, it may be related to the fact that
> spin_lock_irqsave() writes to the value through a pointer parameter, and
> the compiler doesn't know it's an out-only parameter.
It might be better to append the special comment /* GCC */[1] on that line.
[1] https://lwn.net/Articles/529954/
--
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