* [ljones-mfd:for-mfd-next 56/58] drivers/mfd/mfd-core.c:147:17: error: implicit declaration of function 'of_read_number'
@ 2020-07-16 23:08 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-07-16 23:08 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2823 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git for-mfd-next
head: ae387961ae94021c2322c59e069e7476fb7702f7
commit: 70d48975c152997bea1c715de3382ef854c288ed [56/58] mfd: core: Make a best effort attempt to match devices with the correct of_nodes
config: x86_64-rhel (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
git checkout 70d48975c152997bea1c715de3382ef854c288ed
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/mfd/mfd-core.c: In function 'mfd_match_of_node_to_dev':
>> drivers/mfd/mfd-core.c:147:17: error: implicit declaration of function 'of_read_number' [-Werror=implicit-function-declaration]
147 | of_node_addr = of_read_number(reg, of_n_addr_cells(np));
| ^~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/of_read_number +147 drivers/mfd/mfd-core.c
119
120 static int mfd_match_of_node_to_dev(struct platform_device *pdev,
121 struct device_node *np,
122 const struct mfd_cell *cell)
123 {
124 struct mfd_of_node_entry *of_entry;
125 const __be32 *reg;
126 u64 of_node_addr;
127
128 /* Skip devices 'disabled' by Device Tree */
129 if (!of_device_is_available(np))
130 return -ENODEV;
131
132 /* Skip if OF node has previously been allocated to a device */
133 list_for_each_entry(of_entry, &mfd_of_node_list, list)
134 if (of_entry->np == np)
135 return -EAGAIN;
136
137 if (!cell->use_of_reg)
138 /* No of_reg defined - allocate first free compatible match */
139 goto allocate_of_node;
140
141 /* We only care about each node's first defined address */
142 reg = of_get_address(np, 0, NULL, NULL);
143 if (!reg)
144 /* OF node does not contatin a 'reg' property to match to */
145 return -EAGAIN;
146
> 147 of_node_addr = of_read_number(reg, of_n_addr_cells(np));
148
149 if (cell->of_reg != of_node_addr)
150 /* No match */
151 return -EAGAIN;
152
153 allocate_of_node:
154 of_entry = kzalloc(sizeof(*of_entry), GFP_KERNEL);
155 if (!of_entry)
156 return -ENOMEM;
157
158 of_entry->dev = &pdev->dev;
159 of_entry->np = np;
160 list_add_tail(&of_entry->list, &mfd_of_node_list);
161
162 pdev->dev.of_node = np;
163 pdev->dev.fwnode = &np->fwnode;
164
165 return 0;
166 }
167
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 45452 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* [ljones-mfd:for-mfd-next 56/58] drivers/mfd/mfd-core.c:147:17: error: implicit declaration of function 'of_read_number'
@ 2020-07-17 1:17 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-07-17 1:17 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3109 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git for-mfd-next
head: ae387961ae94021c2322c59e069e7476fb7702f7
commit: 70d48975c152997bea1c715de3382ef854c288ed [56/58] mfd: core: Make a best effort attempt to match devices with the correct of_nodes
config: arm-randconfig-r025-20200716 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ed6b578040a85977026c93bf4188f996148f3218)
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
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
git checkout 70d48975c152997bea1c715de3382ef854c288ed
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/mfd/mfd-core.c:147:17: error: implicit declaration of function 'of_read_number' [-Werror,-Wimplicit-function-declaration]
of_node_addr = of_read_number(reg, of_n_addr_cells(np));
^
1 error generated.
vim +/of_read_number +147 drivers/mfd/mfd-core.c
119
120 static int mfd_match_of_node_to_dev(struct platform_device *pdev,
121 struct device_node *np,
122 const struct mfd_cell *cell)
123 {
124 struct mfd_of_node_entry *of_entry;
125 const __be32 *reg;
126 u64 of_node_addr;
127
128 /* Skip devices 'disabled' by Device Tree */
129 if (!of_device_is_available(np))
130 return -ENODEV;
131
132 /* Skip if OF node has previously been allocated to a device */
133 list_for_each_entry(of_entry, &mfd_of_node_list, list)
134 if (of_entry->np == np)
135 return -EAGAIN;
136
137 if (!cell->use_of_reg)
138 /* No of_reg defined - allocate first free compatible match */
139 goto allocate_of_node;
140
141 /* We only care about each node's first defined address */
142 reg = of_get_address(np, 0, NULL, NULL);
143 if (!reg)
144 /* OF node does not contatin a 'reg' property to match to */
145 return -EAGAIN;
146
> 147 of_node_addr = of_read_number(reg, of_n_addr_cells(np));
148
149 if (cell->of_reg != of_node_addr)
150 /* No match */
151 return -EAGAIN;
152
153 allocate_of_node:
154 of_entry = kzalloc(sizeof(*of_entry), GFP_KERNEL);
155 if (!of_entry)
156 return -ENOMEM;
157
158 of_entry->dev = &pdev->dev;
159 of_entry->np = np;
160 list_add_tail(&of_entry->list, &mfd_of_node_list);
161
162 pdev->dev.of_node = np;
163 pdev->dev.fwnode = &np->fwnode;
164
165 return 0;
166 }
167
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 30776 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-17 1:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-16 23:08 [ljones-mfd:for-mfd-next 56/58] drivers/mfd/mfd-core.c:147:17: error: implicit declaration of function 'of_read_number' kernel test robot
2020-07-17 1:17 kernel test robot
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.