Re: [PATCH v2 1/2] clk: intel: Add CGU clock driver for a new SoC

From: Nathan Chancellor
Date: Tue Dec 24 2019 - 00:30:09 EST


On Fri, Dec 20, 2019 at 11:31:07AM +0800, Rahul Tanwar wrote:
> From: rtanwar <rahul.tanwar@xxxxxxxxx>
>
> Clock Generation Unit(CGU) is a new clock controller IP of a forthcoming
> Intel network processor SoC. It provides programming interfaces to control
> & configure all CPU & peripheral clocks. Add common clock framework based
> clock controller driver for CGU.
>
> Signed-off-by: Rahul Tanwar <rahul.tanwar@xxxxxxxxxxxxxxx>

Hi Rahul,

The 0day bot reported this warning with clang with your patch, mind
taking a look at it since it seems like you will need to do a v2 based
on other comments?

It seems like the check either needs to be something different or the
check should just be removed.

Cheers,
Nathan

On Mon, Dec 23, 2019 at 04:48:54PM +0800, kbuild test robot wrote:
> CC: kbuild-all@xxxxxxxxxxxx
> In-Reply-To: <ee8a8a0f0c882e22361895b2663870c8037c422f.1576811332.git.rahul.tanwar@xxxxxxxxxxxxxxx>
> References: <ee8a8a0f0c882e22361895b2663870c8037c422f.1576811332.git.rahul.tanwar@xxxxxxxxxxxxxxx>
> TO: Rahul Tanwar <rahul.tanwar@xxxxxxxxxxxxxxx>
> CC: mturquette@xxxxxxxxxxxx, sboyd@xxxxxxxxxx, robh+dt@xxxxxxxxxx, mark.rutland@xxxxxxx
> CC: linux-clk@xxxxxxxxxxxxxxx, devicetree@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, andriy.shevchenko@xxxxxxxxx, yixin.zhu@xxxxxxxxxxxxxxx, qi-ming.wu@xxxxxxxxx, rtanwar <rahul.tanwar@xxxxxxxxx>, Rahul Tanwar <rahul.tanwar@xxxxxxxxxxxxxxx>
>
> Hi Rahul,
>
> Thank you for the patch! Perhaps something to improve:
>
> [auto build test WARNING on clk/clk-next]
> [also build test WARNING on robh/for-next v5.5-rc3 next-20191220]
> [if your patch is applied to the wrong git tree, please drop us a note to help
> improve the system. BTW, we also suggest to use '--base' option to specify the
> base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
>
> url: https://github.com/0day-ci/linux/commits/Rahul-Tanwar/clk-intel-Add-a-new-driver-for-a-new-clock-controller-IP/20191223-110300
> base: https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-next
> config: x86_64-allyesconfig (attached as .config)
> compiler: clang version 10.0.0 (git://gitmirror/llvm_project 891e25b02d760d0de18c7d46947913b3166047e7)
> reproduce:
> # save the attached .config to linux build tree
> make ARCH=x86_64
>
> If you fix the issue, kindly add following tag
> Reported-by: kbuild test robot <lkp@xxxxxxxxx>
>
> All warnings (new ones prefixed by >>):
>
> >> drivers/clk/x86/clk-cgu.c:50:20: warning: address of array 'ctx->clk_data.hws' will always evaluate to 'true' [-Wpointer-bool-conversion]
> if (ctx->clk_data.hws)
> ~~ ~~~~~~~~~~~~~~^~~
> 1 warning generated.
>
> vim +50 drivers/clk/x86/clk-cgu.c
>
> 46
> 47 void lgm_clk_add_lookup(struct lgm_clk_provider *ctx,
> 48 struct clk_hw *hw, unsigned int id)
> 49 {
> > 50 if (ctx->clk_data.hws)
> 51 ctx->clk_data.hws[id] = hw;
> 52 }
> 53
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology Center
> https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx Intel Corporation