Re: [PATCH 1/1] rtc: pcf85063: add support for fixed clock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Alexander,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on abelloni/rtc-next]
[also build test WARNING on v5.15-rc5 next-20211013]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Alexander-Stein/rtc-pcf85063-add-support-for-fixed-clock/20211013-155115
base:   https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git rtc-next
config: x86_64-randconfig-s022-20211013 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://github.com/0day-ci/linux/commit/9f6ceaac6d87d4d5a2a35d209d3e630ff2bdeb4b
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Alexander-Stein/rtc-pcf85063-add-support-for-fixed-clock/20211013-155115
        git checkout 9f6ceaac6d87d4d5a2a35d209d3e630ff2bdeb4b
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>


sparse warnings: (new ones prefixed by >>)
>> drivers/rtc/rtc-pcf85063.c:492:24: sparse: sparse: Using plain integer as NULL pointer

vim +492 drivers/rtc/rtc-pcf85063.c

   476	
   477	static struct clk *pcf85063_clkout_register_clk(struct pcf85063 *pcf85063)
   478	{
   479		struct clk *clk;
   480		struct clk_init_data init;
   481		struct device_node *node = pcf85063->rtc->dev.parent->of_node;
   482		struct device_node *fixed_clock;
   483	
   484		fixed_clock = of_get_child_by_name(node, "clock");
   485		if (fixed_clock) {
   486			/*
   487			 * skip registering square wave clock when a fixed
   488			 * clock has been registered. The fixed clock is
   489			 * registered automatically when being referenced.
   490			 */
   491			of_node_put(fixed_clock);
 > 492			return 0;
   493		}
   494	
   495		init.name = "pcf85063-clkout";
   496		init.ops = &pcf85063_clkout_ops;
   497		init.flags = 0;
   498		init.parent_names = NULL;
   499		init.num_parents = 0;
   500		pcf85063->clkout_hw.init = &init;
   501	
   502		/* optional override of the clockname */
   503		of_property_read_string(node, "clock-output-names", &init.name);
   504	
   505		/* register the clock */
   506		clk = devm_clk_register(&pcf85063->rtc->dev, &pcf85063->clkout_hw);
   507	
   508		if (!IS_ERR(clk))
   509			of_clk_add_provider(node, of_clk_src_simple_get, clk);
   510	
   511		return clk;
   512	}
   513	#endif
   514	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux