From: Greg Ungerer <gerg@linux-m68k.org>
To: Masahiro Yamada <yamada.masahiro@socionext.com>,
linux-m68k@vger.kernel.org
Cc: Stephen Boyd <sboyd@codeaurora.org>,
Ralf Baechle <ralf@linux-mips.org>,
Michael Turquette <mturquette@baylibre.com>,
Geert Uytterhoeven <geert@linux-m68k.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] m68k: let clk_disable() return immediately if clk is NULL
Date: Mon, 19 Sep 2016 10:08:17 +1000 [thread overview]
Message-ID: <1ce86362-df47-bbb4-3f44-1f65fb340aa3@linux-m68k.org> (raw)
In-Reply-To: <1474221674-21625-1-git-send-email-yamada.masahiro@socionext.com>
Hi Masahiro,
On 19/09/16 04:01, Masahiro Yamada wrote:
> In many of clk_disable() implementations, it is a no-op for a NULL
> pointer input, but this is one of the exceptions.
>
> Making it treewide consistent will allow clock consumers to call
> clk_disable() without NULL pointer check.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> Acked-by: Greg Ungerer <gerg@uclinux.org>
I will apply to my m68knommu git tree (for-next) branch.
Thanks
Greg
> ---
>
> Changes in v4:
> - Split into per-arch patches
>
> Changes in v3:
> - Return only when clk is NULL. Do not take care of error pointer.
>
> Changes in v2:
> - Rebase on Linux 4.6-rc1
>
> arch/m68k/coldfire/clk.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/arch/m68k/coldfire/clk.c b/arch/m68k/coldfire/clk.c
> index fddfdcc..1e3c7e9 100644
> --- a/arch/m68k/coldfire/clk.c
> +++ b/arch/m68k/coldfire/clk.c
> @@ -101,6 +101,10 @@ EXPORT_SYMBOL(clk_enable);
> void clk_disable(struct clk *clk)
> {
> unsigned long flags;
> +
> + if (!clk)
> + return;
> +
> spin_lock_irqsave(&clk_lock, flags);
> if ((--clk->enabled == 0) && clk->clk_ops)
> clk->clk_ops->disable(clk);
>
prev parent reply other threads:[~2016-09-19 0:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-18 18:01 Masahiro Yamada
2016-09-19 0:08 ` Greg Ungerer [this message]
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=1ce86362-df47-bbb4-3f44-1f65fb340aa3@linux-m68k.org \
--to=gerg@linux-m68k.org \
--cc=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=ralf@linux-mips.org \
--cc=sboyd@codeaurora.org \
--cc=yamada.masahiro@socionext.com \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®