[PATCH v3 4/4] clk: mediatek: Add drivers for MediaTek MT6735 main clock and reset drivers

kernel test robot lkp at intel.com
Sat Feb 25 04:05:55 PST 2023


Hi Yassine,

I love your patch! Perhaps something to improve:

[auto build test WARNING on clk/clk-next]
[also build test WARNING on robh/for-next krzk/for-next krzk-dt/for-next krzk-mem-ctrl/for-next linus/master pza/reset/next v6.2 next-20230225]
[cannot apply to pza/imx-drm/next]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Yassine-Oudjana/dt-bindings-clock-Add-MediaTek-MT6735-clock-bindings/20230225-174603
base:   https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-next
patch link:    https://lore.kernel.org/r/20230225094246.261697-5-y.oudjana%40protonmail.com
patch subject: [PATCH v3 4/4] clk: mediatek: Add drivers for MediaTek MT6735 main clock and reset drivers
config: sparc-allyesconfig (https://download.01.org/0day-ci/archive/20230225/202302251958.hFATZOVS-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/de4ed4bf78e894ade5d21d52861ee9e647d645a5
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Yassine-Oudjana/dt-bindings-clock-Add-MediaTek-MT6735-clock-bindings/20230225-174603
        git checkout de4ed4bf78e894ade5d21d52861ee9e647d645a5
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sparc olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sparc SHELL=/bin/bash drivers/clk/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp at intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202302251958.hFATZOVS-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/clk/mediatek/clk-mt6735-apmixedsys.c:80:5: warning: no previous prototype for 'clk_mt6735_apmixed_probe' [-Wmissing-prototypes]
      80 | int clk_mt6735_apmixed_probe(struct platform_device *pdev)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/clk/mediatek/clk-mt6735-apmixedsys.c:112:5: warning: no previous prototype for 'clk_mt6735_apmixed_remove' [-Wmissing-prototypes]
     112 | int clk_mt6735_apmixed_remove(struct platform_device *pdev)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~
--
>> drivers/clk/mediatek/clk-mt6735-topckgen.c:366:5: warning: no previous prototype for 'clk_mt6735_topckgen_probe' [-Wmissing-prototypes]
     366 | int clk_mt6735_topckgen_probe(struct platform_device *pdev)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/clk/mediatek/clk-mt6735-topckgen.c: In function 'clk_mt6735_topckgen_probe':
   drivers/clk/mediatek/clk-mt6735-topckgen.c:400:38: error: passing argument 1 of 'mtk_clk_register_muxes' from incompatible pointer type [-Werror=incompatible-pointer-types]
     400 |         ret = mtk_clk_register_muxes(topckgen_muxes, ARRAY_SIZE(topckgen_muxes),
         |                                      ^~~~~~~~~~~~~~
         |                                      |
         |                                      const struct mtk_mux *
   In file included from drivers/clk/mediatek/clk-mt6735-topckgen.c:10:
   drivers/clk/mediatek/clk-mux.h:86:43: note: expected 'struct device *' but argument is of type 'const struct mtk_mux *'
      86 | int mtk_clk_register_muxes(struct device *dev,
         |                            ~~~~~~~~~~~~~~~^~~
   In file included from include/linux/cpumask.h:10,
                    from include/linux/smp.h:13,
                    from include/linux/lockdep.h:14,
                    from include/linux/mutex.h:17,
                    from include/linux/kernfs.h:11,
                    from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/of.h:17,
                    from include/linux/clk-provider.h:9,
                    from drivers/clk/mediatek/clk-mt6735-topckgen.c:6:
>> include/linux/kernel.h:55:25: warning: passing argument 2 of 'mtk_clk_register_muxes' makes pointer from integer without a cast [-Wint-conversion]
      55 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                         |
         |                         long unsigned int
   drivers/clk/mediatek/clk-mt6735-topckgen.c:400:54: note: in expansion of macro 'ARRAY_SIZE'
     400 |         ret = mtk_clk_register_muxes(topckgen_muxes, ARRAY_SIZE(topckgen_muxes),
         |                                                      ^~~~~~~~~~
   drivers/clk/mediatek/clk-mux.h:87:50: note: expected 'const struct mtk_mux *' but argument is of type 'long unsigned int'
      87 |                            const struct mtk_mux *muxes,
         |                            ~~~~~~~~~~~~~~~~~~~~~~^~~~~
>> drivers/clk/mediatek/clk-mt6735-topckgen.c:401:47: warning: passing argument 3 of 'mtk_clk_register_muxes' makes integer from pointer without a cast [-Wint-conversion]
     401 |                                      pdev->dev.of_node, &mt6735_topckgen_lock,
         |                                      ~~~~~~~~~^~~~~~~~
         |                                               |
         |                                               struct device_node *
   drivers/clk/mediatek/clk-mux.h:88:32: note: expected 'int' but argument is of type 'struct device_node *'
      88 |                            int num, struct device_node *node,
         |                            ~~~~^~~
   drivers/clk/mediatek/clk-mt6735-topckgen.c:401:57: error: passing argument 4 of 'mtk_clk_register_muxes' from incompatible pointer type [-Werror=incompatible-pointer-types]
     401 |                                      pdev->dev.of_node, &mt6735_topckgen_lock,
         |                                                         ^~~~~~~~~~~~~~~~~~~~~
         |                                                         |
         |                                                         spinlock_t * {aka struct spinlock *}
   drivers/clk/mediatek/clk-mux.h:88:57: note: expected 'struct device_node *' but argument is of type 'spinlock_t *' {aka 'struct spinlock *'}
      88 |                            int num, struct device_node *node,
         |                                     ~~~~~~~~~~~~~~~~~~~~^~~~
   drivers/clk/mediatek/clk-mt6735-topckgen.c:402:38: error: passing argument 5 of 'mtk_clk_register_muxes' from incompatible pointer type [-Werror=incompatible-pointer-types]
     402 |                                      clk_data);
         |                                      ^~~~~~~~
         |                                      |
         |                                      struct clk_hw_onecell_data *
   drivers/clk/mediatek/clk-mux.h:89:40: note: expected 'spinlock_t *' {aka 'struct spinlock *'} but argument is of type 'struct clk_hw_onecell_data *'
      89 |                            spinlock_t *lock,
         |                            ~~~~~~~~~~~~^~~~
   drivers/clk/mediatek/clk-mt6735-topckgen.c:400:15: error: too few arguments to function 'mtk_clk_register_muxes'
     400 |         ret = mtk_clk_register_muxes(topckgen_muxes, ARRAY_SIZE(topckgen_muxes),
         |               ^~~~~~~~~~~~~~~~~~~~~~
   drivers/clk/mediatek/clk-mux.h:86:5: note: declared here
      86 | int mtk_clk_register_muxes(struct device *dev,
         |     ^~~~~~~~~~~~~~~~~~~~~~
   drivers/clk/mediatek/clk-mt6735-topckgen.c: At top level:
>> drivers/clk/mediatek/clk-mt6735-topckgen.c:417:5: warning: no previous prototype for 'clk_mt6735_topckgen_remove' [-Wmissing-prototypes]
     417 | int clk_mt6735_topckgen_remove(struct platform_device *pdev)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/clk_mt6735_apmixed_probe +80 drivers/clk/mediatek/clk-mt6735-apmixedsys.c

    79	
  > 80	int clk_mt6735_apmixed_probe(struct platform_device *pdev)
    81	{
    82		void __iomem *base;
    83		struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
    84		struct clk_hw_onecell_data *clk_data;
    85		int ret;
    86	
    87		base = devm_ioremap_resource(&pdev->dev, res);
    88		if (IS_ERR(base))
    89			return PTR_ERR(base);
    90	
    91		clk_data = mtk_alloc_clk_data(ARRAY_SIZE(apmixedsys_plls));
    92		if (!clk_data)
    93			return -ENOMEM;
    94		platform_set_drvdata(pdev, clk_data);
    95	
    96		ret = mtk_clk_register_plls(pdev->dev.of_node, apmixedsys_plls,
    97					   ARRAY_SIZE(apmixedsys_plls), clk_data);
    98		if (ret) {
    99			dev_err(&pdev->dev, "Failed to register PLLs: %d\n", ret);
   100			return ret;
   101		}
   102	
   103		ret = devm_of_clk_add_hw_provider(&pdev->dev, of_clk_hw_onecell_get,
   104						  clk_data);
   105		if (ret)
   106			dev_err(&pdev->dev,
   107				"Failed to register clock provider: %d\n", ret);
   108	
   109		return ret;
   110	}
   111	
 > 112	int clk_mt6735_apmixed_remove(struct platform_device *pdev)
   113	{
   114		struct clk_hw_onecell_data *clk_data = platform_get_drvdata(pdev);
   115	
   116		mtk_clk_unregister_plls(apmixedsys_plls, ARRAY_SIZE(apmixedsys_plls), clk_data);
   117		mtk_free_clk_data(clk_data);
   118	
   119		return 0;
   120	}
   121	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests



More information about the Linux-mediatek mailing list