Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1646223

Re: [PATCH] drm: remove NULL pointer check for clk_disable_unprepare

From Rob Clark <robdclark@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH] drm: remove NULL pointer check for clk_disable_unprepare
Date 2017-05-21 01:50 +0200
Message-ID <tJmie-88P-3@gated-at.bofh.it> (permalink)
References <tJgZb-4S9-17@gated-at.bofh.it> <tJhVg-5rT-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sat, May 20, 2017 at 3:04 PM, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
> 2017-05-21 2:58 GMT+09:00 Masahiro Yamada <yamada.masahiro@socionext.com>:
>> After long term efforts of fixing non-common clock implementations,
>> clk_disable() is a no-op for a NULL pointer input, and this is now
>> tree-wide consistent.
>>
>> All clock consumers can safely call clk_disable(_unprepare) without
>> NULL pointer check.
>>
>> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>
>
> Sorry, I retract this patch.
>
> Krzysztof pointed out
> cleanups only for clk_disable_unprepare() will lose the code symmetry.
>
> NULL pointer checks for clk_prepare_enable() should be
> removed to keep the code symmetrical.
>
> This is possible for common-clock framework because
> clk_prepare_enable() is also a no-op for a NULL clk input.
> But it is not necessarily true for non-common clock implementations.

At least for drm/msm, upstream I think we can assume CCF.. I still
need to check for possible downstream kernels to which someone might
want to backport drm/msm.

It might be an idea to split this up per-driver, since at least for
some drivers it might be safe to assume CCF (or non-CCF clk driver
that behaves the same)

BR,
-R

>
> --
> Best Regards
> Masahiro Yamada

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] drm: remove NULL pointer check for clk_disable_unprepare Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-05-20 20:10 +0200
  Re: [PATCH] drm: remove NULL pointer check for clk_disable_unprepare Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-05-20 21:10 +0200
    Re: [PATCH] drm: remove NULL pointer check for clk_disable_unprepare Rob Clark <robdclark@gmail.com> - 2017-05-21 01:50 +0200

csiph-web