[PATCH] clk: visconti: Remove pointless NULL check in visconti_pll_add_lookup()

nobuhiro1.iwamatsu at toshiba.co.jp nobuhiro1.iwamatsu at toshiba.co.jp
Mon Jan 10 16:38:29 PST 2022


Hi Nathan,

Thanks for your patch.

> -----Original Message-----
> From: Nathan Chancellor <nathan at kernel.org>
> Sent: Saturday, January 8, 2022 3:33 AM
> To: Michael Turquette <mturquette at baylibre.com>; Stephen Boyd
> <sboyd at kernel.org>; iwamatsu nobuhiro(岩松 信洋 □SWC◯ACT)
> <nobuhiro1.iwamatsu at toshiba.co.jp>
> Cc: Nick Desaulniers <ndesaulniers at google.com>; linux-clk at vger.kernel.org;
> linux-arm-kernel at lists.infradead.org; linux-kernel at vger.kernel.org;
> llvm at lists.linux.dev; Nathan Chancellor <nathan at kernel.org>; kernel test
> robot <lkp at intel.com>
> Subject: [PATCH] clk: visconti: Remove pointless NULL check in
> visconti_pll_add_lookup()
> 
> Clang warns:
> 
> drivers/clk/visconti/pll.c:292:20: warning: address of array 'ctx->clk_data.hws'
> will always evaluate to 'true' [-Wpointer-bool-conversion]
>         if (ctx->clk_data.hws && id)
>             ~~~~~~~~~~~~~~^~~ ~~
> 1 warning generated.
> 
> This array cannot be NULL if ctx is not NULL, which is allocated in
> visconti_init_pll(), so just remove the check, which matches other clk drivers.
> 
> Fixes: b4cbe606dc36 ("clk: visconti: Add support common clock driver and
> reset driver")
> Link: https://github.com/ClangBuiltLinux/linux/issues/1564
> Reported-by: kernel test robot <lkp at intel.com>
> Signed-off-by: Nathan Chancellor <nathan at kernel.org>
> ---
>  drivers/clk/visconti/pll.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu at toshiba.co.jp>

Best regards,
  Nobuhiro





More information about the linux-arm-kernel mailing list