From: kernel test robot <lkp@intel.com>
To: Rob Herring <robh@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [robh:dt/header-cleanups 22/94] drivers/clk/davinci/da8xx-cfgchip.c:750:10: error: call to undeclared function 'of_match_device'; ISO C99 and later do not support implicit function declarations
Date: Wed, 12 Jul 2023 17:51:08 +0800 [thread overview]
Message-ID: <202307121749.UJsG9yIn-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git dt/header-cleanups
head: 3fabe2c33fe8811c575713da027ca6bea22d7d5b
commit: f048df4b58626a11855e74453a9d4015ce4b3fa3 [22/94] clk: Explicitly include correct DT includes
config: arm-davinci_all_defconfig (https://download.01.org/0day-ci/archive/20230712/202307121749.UJsG9yIn-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce: (https://download.01.org/0day-ci/archive/20230712/202307121749.UJsG9yIn-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202307121749.UJsG9yIn-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/clk/davinci/da8xx-cfgchip.c:750:10: error: call to undeclared function 'of_match_device'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
750 | of_id = of_match_device(da8xx_cfgchip_of_match, dev);
| ^
drivers/clk/davinci/da8xx-cfgchip.c:750:10: note: did you mean 'of_match_node'?
include/linux/of.h:371:35: note: 'of_match_node' declared here
371 | extern const struct of_device_id *of_match_node(
| ^
>> drivers/clk/davinci/da8xx-cfgchip.c:750:8: error: incompatible integer to pointer conversion assigning to 'const struct of_device_id *' from 'int' [-Wint-conversion]
750 | of_id = of_match_device(da8xx_cfgchip_of_match, dev);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
--
>> drivers/clk/davinci/pll.c:897:10: error: call to undeclared function 'of_match_device'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
897 | of_id = of_match_device(davinci_pll_of_match, dev);
| ^
drivers/clk/davinci/pll.c:897:10: note: did you mean 'of_match_node'?
include/linux/of.h:371:35: note: 'of_match_node' declared here
371 | extern const struct of_device_id *of_match_node(
| ^
>> drivers/clk/davinci/pll.c:897:8: error: incompatible integer to pointer conversion assigning to 'const struct of_device_id *' from 'int' [-Wint-conversion]
897 | of_id = of_match_device(davinci_pll_of_match, dev);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/clk/davinci/pll.c:939:
In file included from include/linux/debugfs.h:15:
In file included from include/linux/fs.h:33:
In file included from include/linux/percpu-rwsem.h:7:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:97:11: warning: array index 3 is past the end of the array (that has type 'unsigned long[2]') [-Warray-bounds]
97 | return (set->sig[3] | set->sig[2] |
| ^ ~
arch/arm/include/asm/signal.h:17:2: note: array 'sig' declared here
17 | unsigned long sig[_NSIG_WORDS];
| ^
In file included from drivers/clk/davinci/pll.c:939:
In file included from include/linux/debugfs.h:15:
In file included from include/linux/fs.h:33:
In file included from include/linux/percpu-rwsem.h:7:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:97:25: warning: array index 2 is past the end of the array (that has type 'unsigned long[2]') [-Warray-bounds]
97 | return (set->sig[3] | set->sig[2] |
| ^ ~
arch/arm/include/asm/signal.h:17:2: note: array 'sig' declared here
17 | unsigned long sig[_NSIG_WORDS];
| ^
In file included from drivers/clk/davinci/pll.c:939:
In file included from include/linux/debugfs.h:15:
In file included from include/linux/fs.h:33:
In file included from include/linux/percpu-rwsem.h:7:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:113:11: warning: array index 3 is past the end of the array (that has type 'const unsigned long[2]') [-Warray-bounds]
113 | return (set1->sig[3] == set2->sig[3]) &&
| ^ ~
arch/arm/include/asm/signal.h:17:2: note: array 'sig' declared here
17 | unsigned long sig[_NSIG_WORDS];
| ^
In file included from drivers/clk/davinci/pll.c:939:
In file included from include/linux/debugfs.h:15:
In file included from include/linux/fs.h:33:
In file included from include/linux/percpu-rwsem.h:7:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:113:27: warning: array index 3 is past the end of the array (that has type 'const unsigned long[2]') [-Warray-bounds]
113 | return (set1->sig[3] == set2->sig[3]) &&
| ^ ~
arch/arm/include/asm/signal.h:17:2: note: array 'sig' declared here
17 | unsigned long sig[_NSIG_WORDS];
| ^
In file included from drivers/clk/davinci/pll.c:939:
In file included from include/linux/debugfs.h:15:
In file included from include/linux/fs.h:33:
In file included from include/linux/percpu-rwsem.h:7:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:114:5: warning: array index 2 is past the end of the array (that has type 'const unsigned long[2]') [-Warray-bounds]
114 | (set1->sig[2] == set2->sig[2]) &&
| ^ ~
arch/arm/include/asm/signal.h:17:2: note: array 'sig' declared here
17 | unsigned long sig[_NSIG_WORDS];
| ^
In file included from drivers/clk/davinci/pll.c:939:
In file included from include/linux/debugfs.h:15:
In file included from include/linux/fs.h:33:
In file included from include/linux/percpu-rwsem.h:7:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:114:21: warning: array index 2 is past the end of the array (that has type 'const unsigned long[2]') [-Warray-bounds]
114 | (set1->sig[2] == set2->sig[2]) &&
| ^ ~
arch/arm/include/asm/signal.h:17:2: note: array 'sig' declared here
17 | unsigned long sig[_NSIG_WORDS];
| ^
In file included from drivers/clk/davinci/pll.c:939:
In file included from include/linux/debugfs.h:15:
In file included from include/linux/fs.h:33:
In file included from include/linux/percpu-rwsem.h:7:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:156:1: warning: array index 3 is past the end of the array (that has type 'const unsigned long[2]') [-Warray-bounds]
156 | _SIG_SET_BINOP(sigorsets, _sig_or)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:137:8: note: expanded from macro '_SIG_SET_BINOP'
137 | a3 = a->sig[3]; a2 = a->sig[2]; \
| ^ ~
arch/arm/include/asm/signal.h:17:2: note: array 'sig' declared here
17 | unsigned long sig[_NSIG_WORDS];
| ^
In file included from drivers/clk/davinci/pll.c:939:
In file included from include/linux/debugfs.h:15:
In file included from include/linux/fs.h:33:
In file included from include/linux/percpu-rwsem.h:7:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:156:1: warning: array index 2 is past the end of the array (that has type 'const unsigned long[2]') [-Warray-bounds]
156 | _SIG_SET_BINOP(sigorsets, _sig_or)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/signal.h:137:24: note: expanded from macro '_SIG_SET_BINOP'
137 | a3 = a->sig[3]; a2 = a->sig[2]; \
--
>> drivers/clk/davinci/psc.c:523:10: error: call to undeclared function 'of_match_device'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
523 | of_id = of_match_device(davinci_psc_of_match, dev);
| ^
drivers/clk/davinci/psc.c:523:10: note: did you mean 'of_match_node'?
include/linux/of.h:371:35: note: 'of_match_node' declared here
371 | extern const struct of_device_id *of_match_node(
| ^
>> drivers/clk/davinci/psc.c:523:8: error: incompatible integer to pointer conversion assigning to 'const struct of_device_id *' from 'int' [-Wint-conversion]
523 | of_id = of_match_device(davinci_psc_of_match, dev);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for PINCTRL_SINGLE
Depends on [n]: PINCTRL [=n] && OF [=y] && HAS_IOMEM [=y]
Selected by [y]:
- ARCH_DAVINCI [=y] && ARCH_MULTI_V5 [=y] && CPU_LITTLE_ENDIAN [=y]
vim +/of_match_device +750 drivers/clk/davinci/da8xx-cfgchip.c
1e88a8d64f2212 David Lechner 2018-03-15 741
1e88a8d64f2212 David Lechner 2018-03-15 742 static int da8xx_cfgchip_probe(struct platform_device *pdev)
1e88a8d64f2212 David Lechner 2018-03-15 743 {
1e88a8d64f2212 David Lechner 2018-03-15 744 struct device *dev = &pdev->dev;
1e88a8d64f2212 David Lechner 2018-03-15 745 struct da8xx_cfgchip_clk_platform_data *pdata = dev->platform_data;
1e88a8d64f2212 David Lechner 2018-03-15 746 const struct of_device_id *of_id;
1e88a8d64f2212 David Lechner 2018-03-15 747 da8xx_cfgchip_init clk_init = NULL;
1e88a8d64f2212 David Lechner 2018-03-15 748 struct regmap *regmap = NULL;
1e88a8d64f2212 David Lechner 2018-03-15 749
1e88a8d64f2212 David Lechner 2018-03-15 @750 of_id = of_match_device(da8xx_cfgchip_of_match, dev);
1e88a8d64f2212 David Lechner 2018-03-15 751 if (of_id) {
1e88a8d64f2212 David Lechner 2018-03-15 752 struct device_node *parent;
1e88a8d64f2212 David Lechner 2018-03-15 753
1e88a8d64f2212 David Lechner 2018-03-15 754 clk_init = of_id->data;
1e88a8d64f2212 David Lechner 2018-03-15 755 parent = of_get_parent(dev->of_node);
1e88a8d64f2212 David Lechner 2018-03-15 756 regmap = syscon_node_to_regmap(parent);
1e88a8d64f2212 David Lechner 2018-03-15 757 of_node_put(parent);
1e88a8d64f2212 David Lechner 2018-03-15 758 } else if (pdev->id_entry && pdata) {
1e88a8d64f2212 David Lechner 2018-03-15 759 clk_init = (void *)pdev->id_entry->driver_data;
1e88a8d64f2212 David Lechner 2018-03-15 760 regmap = pdata->cfgchip;
1e88a8d64f2212 David Lechner 2018-03-15 761 }
1e88a8d64f2212 David Lechner 2018-03-15 762
1e88a8d64f2212 David Lechner 2018-03-15 763 if (!clk_init) {
1e88a8d64f2212 David Lechner 2018-03-15 764 dev_err(dev, "unable to find driver data\n");
1e88a8d64f2212 David Lechner 2018-03-15 765 return -EINVAL;
1e88a8d64f2212 David Lechner 2018-03-15 766 }
1e88a8d64f2212 David Lechner 2018-03-15 767
1e88a8d64f2212 David Lechner 2018-03-15 768 if (IS_ERR_OR_NULL(regmap)) {
1e88a8d64f2212 David Lechner 2018-03-15 769 dev_err(dev, "no regmap for CFGCHIP syscon\n");
1e88a8d64f2212 David Lechner 2018-03-15 770 return regmap ? PTR_ERR(regmap) : -ENOENT;
1e88a8d64f2212 David Lechner 2018-03-15 771 }
1e88a8d64f2212 David Lechner 2018-03-15 772
1e88a8d64f2212 David Lechner 2018-03-15 773 return clk_init(dev, regmap);
1e88a8d64f2212 David Lechner 2018-03-15 774 }
1e88a8d64f2212 David Lechner 2018-03-15 775
:::::: The code at line 750 was first introduced by commit
:::::: 1e88a8d64f221208801bb279ee7452df0b6d609f clk: davinci: New driver for TI DA8XX CFGCHIP clocks
:::::: TO: David Lechner <david@lechnology.com>
:::::: CC: Stephen Boyd <sboyd@kernel.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2023-07-12 9:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202307121749.UJsG9yIn-lkp@intel.com \
--to=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.