From: Leonard Crestez <leonard.crestez@nxp.com> To: Stephen Boyd <sboyd@kernel.org>, Geert Uytterhoeven <geert@linux-m68k.org> Cc: Michael Turquette <mturquette@baylibre.com>, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 2/2] clk: Assert prepare_lock in clk_core_get_boundaries Date: Tue, 2 Jul 2019 16:27:10 +0300 [thread overview] Message-ID: <29453ee8e820457d87a8faf9d496390e59c6826f.1562073871.git.leonard.crestez@nxp.com> (raw) In-Reply-To: <68e96af2df96512300604d797ade2088d7e6e496.1562073871.git.leonard.crestez@nxp.com> In-Reply-To: <68e96af2df96512300604d797ade2088d7e6e496.1562073871.git.leonard.crestez@nxp.com> This function iterates the clk consumer list on clk_core so it must be called under prepare_lock. This is already done by all callers but add a lockdep assert to check anyway. Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com> --- drivers/clk/clk.c | 2 ++ 1 file changed, 2 insertions(+) I wouldn't mind if this is dropped as unnecessary. diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index e4e224982ae3..b1c79a58d734 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -591,10 +591,12 @@ static void clk_core_get_boundaries(struct clk_core *core, unsigned long *min_rate, unsigned long *max_rate) { struct clk *clk_user; + lockdep_assert_held(&prepare_lock); + *min_rate = core->min_rate; *max_rate = core->max_rate; hlist_for_each_entry(clk_user, &core->clks, clks_node) *min_rate = max(*min_rate, clk_user->min_rate); -- 2.17.1
WARNING: multiple messages have this Message-ID (diff)
From: Leonard Crestez <leonard.crestez@nxp.com> To: Stephen Boyd <sboyd@kernel.org>, Geert Uytterhoeven <geert@linux-m68k.org> Cc: Michael Turquette <mturquette@baylibre.com>, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 2/2] clk: Assert prepare_lock in clk_core_get_boundaries Date: Tue, 2 Jul 2019 16:27:10 +0300 [thread overview] Message-ID: <29453ee8e820457d87a8faf9d496390e59c6826f.1562073871.git.leonard.crestez@nxp.com> (raw) In-Reply-To: <68e96af2df96512300604d797ade2088d7e6e496.1562073871.git.leonard.crestez@nxp.com> In-Reply-To: <68e96af2df96512300604d797ade2088d7e6e496.1562073871.git.leonard.crestez@nxp.com> This function iterates the clk consumer list on clk_core so it must be called under prepare_lock. This is already done by all callers but add a lockdep assert to check anyway. Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com> --- drivers/clk/clk.c | 2 ++ 1 file changed, 2 insertions(+) I wouldn't mind if this is dropped as unnecessary. diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index e4e224982ae3..b1c79a58d734 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -591,10 +591,12 @@ static void clk_core_get_boundaries(struct clk_core *core, unsigned long *min_rate, unsigned long *max_rate) { struct clk *clk_user; + lockdep_assert_held(&prepare_lock); + *min_rate = core->min_rate; *max_rate = core->max_rate; hlist_for_each_entry(clk_user, &core->clks, clks_node) *min_rate = max(*min_rate, clk_user->min_rate); -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-07-02 13:27 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-07-02 13:27 [PATCH v3 1/2] clk: Add clk_min/max_rate entries in debugfs Leonard Crestez 2019-07-02 13:27 ` Leonard Crestez 2019-07-02 13:27 ` Leonard Crestez [this message] 2019-07-02 13:27 ` [PATCH v3 2/2] clk: Assert prepare_lock in clk_core_get_boundaries Leonard Crestez 2019-08-08 15:00 ` Stephen Boyd 2019-08-08 15:00 ` Stephen Boyd 2019-08-08 15:00 ` [PATCH v3 1/2] clk: Add clk_min/max_rate entries in debugfs Stephen Boyd 2019-08-08 15:00 ` Stephen Boyd 2019-08-08 16:46 ` Leonard Crestez 2019-08-08 16:46 ` Leonard Crestez 2019-08-08 19:46 ` Stephen Boyd 2019-08-08 19:46 ` Stephen Boyd
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=29453ee8e820457d87a8faf9d496390e59c6826f.1562073871.git.leonard.crestez@nxp.com \ --to=leonard.crestez@nxp.com \ --cc=geert@linux-m68k.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-clk@vger.kernel.org \ --cc=mturquette@baylibre.com \ --cc=sboyd@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.