tree:
https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git for-mfd-next
head: c23452e6a319bc607b54a1cce9c74c9033565af3
commit: c509ed7e7d376a7bc3aeb17133c0d117a887916a [56/66] mfd: core: Make a best effort
attempt to match devices with the correct of_nodes
config: x86_64-randconfig-r025-20200719 (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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout c509ed7e7d376a7bc3aeb17133c0d117a887916a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
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/mfd/mfd-core.c:168:1: warning: non-void function does not
return a value [-Wreturn-type]
}
^
1 warning generated.
vim +168 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 #if IS_ENABLED(CONFIG_OF)
125 struct mfd_of_node_entry *of_entry;
126 const __be32 *reg;
127 u64 of_node_addr;
128
129 /* Skip devices 'disabled' by Device Tree */
130 if (!of_device_is_available(np))
131 return -ENODEV;
132
133 /* Skip if OF node has previously been allocated to a device */
134 list_for_each_entry(of_entry, &mfd_of_node_list, list)
135 if (of_entry->np == np)
136 return -EAGAIN;
137
138 if (!cell->use_of_reg)
139 /* No of_reg defined - allocate first free compatible match */
140 goto allocate_of_node;
141
142 /* We only care about each node's first defined address */
143 reg = of_get_address(np, 0, NULL, NULL);
144 if (!reg)
145 /* OF node does not contatin a 'reg' property to match to */
146 return -EAGAIN;
147
148 of_node_addr = of_read_number(reg, of_n_addr_cells(np));
149
150 if (cell->of_reg != of_node_addr)
151 /* No match */
152 return -EAGAIN;
153
154 allocate_of_node:
155 of_entry = kzalloc(sizeof(*of_entry), GFP_KERNEL);
156 if (!of_entry)
157 return -ENOMEM;
158
159 of_entry->dev = &pdev->dev;
160 of_entry->np = np;
161 list_add_tail(&of_entry->list, &mfd_of_node_list);
162
163 pdev->dev.of_node = np;
164 pdev->dev.fwnode = &np->fwnode;
165
166 return 0;
167 #endif
168 }
169
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org