Hi Marek,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on clk/clk-next]
[also build test WARNING on v5.15 next-20211110]
[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/Marek-Vasut/dt-bindings-clk-Intr...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-next
config: nios2-defconfig (attached as .config)
compiler: nios2-linux-gcc (GCC) 11.2.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/0day-ci/linux/commit/6f73b7f399440eee282d746b1907e28f4...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Marek-Vasut/dt-bindings-clk-Introduce-critical-clocks-property/20211109-064424
git checkout 6f73b7f399440eee282d746b1907e28f45b81a14
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=nios2
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/clk/clk.c: In function '__clk_register':
> drivers/clk/clk.c:3852:9: warning: ISO C90 forbids mixed
declarations and code [-Wdeclaration-after-statement]
3852 | struct
of_phandle_args clkspec;
| ^~~~~~
vim +3852 drivers/clk/clk.c
3806
3807 static struct clk *
3808 __clk_register(struct device *dev, struct device_node *np, struct clk_hw *hw)
3809 {
3810 int ret;
3811 struct clk_core *core;
3812 const struct clk_init_data *init = hw->init;
3813
3814 /*
3815 * The init data is not supposed to be used outside of registration path.
3816 * Set it to NULL so that provider drivers can't use it either and so that
3817 * we catch use of hw->init early on in the core.
3818 */
3819 hw->init = NULL;
3820
3821 core = kzalloc(sizeof(*core), GFP_KERNEL);
3822 if (!core) {
3823 ret = -ENOMEM;
3824 goto fail_out;
3825 }
3826
3827 core->name = kstrdup_const(init->name, GFP_KERNEL);
3828 if (!core->name) {
3829 ret = -ENOMEM;
3830 goto fail_name;
3831 }
3832
3833 if (WARN_ON(!init->ops)) {
3834 ret = -EINVAL;
3835 goto fail_ops;
3836 }
3837 core->ops = init->ops;
3838
3839 if (dev && pm_runtime_enabled(dev))
3840 core->rpm_enabled = true;
3841 core->dev = dev;
3842 core->of_node = np;
3843 if (dev && dev->driver)
3844 core->owner = dev->driver->owner;
3845 core->hw = hw;
3846 core->flags = init->flags;
3847 core->num_parents = init->num_parents;
3848 core->min_rate = 0;
3849 core->max_rate = ULONG_MAX;
3850 hw->core = core;
3851
3852 struct of_phandle_args clkspec;
3853 u32 clksize,
clktotal;
3854 int i, index;
3855
3856 if (np && core->ops->match_clkspec &&
!of_property_read_u32(np, "#clock-cells", &clksize)) {
3857 if (clksize == 0) {
3858 if (of_property_read_bool(np, "critical-clocks"))
3859 core->flags |= CLK_IS_CRITICAL;
3860 clktotal = 0;
3861 } else {
3862 clkspec.np = np;
3863 clktotal = of_property_count_u32_elems(np, "critical-clocks");
3864 clktotal /= clksize;
3865 for (index = 0; index < clktotal; index++) {
3866 for (i = 0; i < clksize; i++) {
3867 ret = of_property_read_u32_index(np, "critical-clocks",
3868 (index * clksize) + i,
3869 &(clkspec.args[i]));
3870 }
3871 if (!core->ops->match_clkspec(hw, &clkspec))
3872 core->flags |= CLK_IS_CRITICAL;
3873 }
3874 }
3875 }
3876
3877 ret = clk_core_populate_parent_map(core, init);
3878 if (ret)
3879 goto fail_parents;
3880
3881 INIT_HLIST_HEAD(&core->clks);
3882
3883 /*
3884 * Don't call clk_hw_create_clk() here because that would pin the
3885 * provider module to itself and prevent it from ever being removed.
3886 */
3887 hw->clk = alloc_clk(core, NULL, NULL);
3888 if (IS_ERR(hw->clk)) {
3889 ret = PTR_ERR(hw->clk);
3890 goto fail_create_clk;
3891 }
3892
3893 clk_core_link_consumer(hw->core, hw->clk);
3894
3895 ret = __clk_core_init(core);
3896 if (!ret)
3897 return hw->clk;
3898
3899 clk_prepare_lock();
3900 clk_core_unlink_consumer(hw->clk);
3901 clk_prepare_unlock();
3902
3903 free_clk(hw->clk);
3904 hw->clk = NULL;
3905
3906 fail_create_clk:
3907 clk_core_free_parent_map(core);
3908 fail_parents:
3909 fail_ops:
3910 kfree_const(core->name);
3911 fail_name:
3912 kfree(core);
3913 fail_out:
3914 return ERR_PTR(ret);
3915 }
3916
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org