tree: https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git gpio-test head: 53be931d133999d54ca1f0869ffb0aed731a0289 commit: 6bd0d18045802306e7986d47d43843d3ed388d4f [7950/7967] PCI: mvebu: switch to using gpiod API config: arm-defconfig (https://download.01.org/0day-ci/archive/20220922/202209221435.MEm88ThW-lkp@xxxxxxxxx/config) compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 791a7ae1ba3efd6bca96338e10ffde557ba83920) 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 # https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git/commit/?id=6bd0d18045802306e7986d47d43843d3ed388d4f git remote add dtor-input https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git git fetch --no-tags dtor-input gpio-test git checkout 6bd0d18045802306e7986d47d43843d3ed388d4f # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@xxxxxxxxx> All errors (new ones prefixed by >>): drivers/pci/controller/pci-mvebu.c:1100:2: error: call to undeclared function 'chained_irq_enter'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] chained_irq_enter(chip, desc); ^ drivers/pci/controller/pci-mvebu.c:1115:2: error: call to undeclared function 'chained_irq_exit'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] chained_irq_exit(chip, desc); ^ >> drivers/pci/controller/pci-mvebu.c:1344:30: error: too few arguments to function call, expected 2, have 1 devm_kfree(port->reset_name); ~~~~~~~~~~ ^ include/linux/device.h:226:6: note: 'devm_kfree' declared here void devm_kfree(struct device *dev, const void *p); ^ 3 errors generated. vim +1344 drivers/pci/controller/pci-mvebu.c 1258 1259 static int mvebu_pcie_parse_port(struct mvebu_pcie *pcie, 1260 struct mvebu_pcie_port *port, struct device_node *child) 1261 { 1262 struct device *dev = &pcie->pdev->dev; 1263 u32 slot_power_limit; 1264 int ret; 1265 u32 num_lanes; 1266 1267 port->pcie = pcie; 1268 1269 if (of_property_read_u32(child, "marvell,pcie-port", &port->port)) { 1270 dev_warn(dev, "ignoring %pOF, missing pcie-port property\n", 1271 child); 1272 goto skip; 1273 } 1274 1275 if (of_property_read_u32(child, "marvell,pcie-lane", &port->lane)) 1276 port->lane = 0; 1277 1278 if (!of_property_read_u32(child, "num-lanes", &num_lanes) && num_lanes == 4) 1279 port->is_x4 = true; 1280 1281 port->name = devm_kasprintf(dev, GFP_KERNEL, "pcie%d.%d", port->port, 1282 port->lane); 1283 if (!port->name) { 1284 ret = -ENOMEM; 1285 goto err; 1286 } 1287 1288 port->devfn = of_pci_get_devfn(child); 1289 if (port->devfn < 0) 1290 goto skip; 1291 if (PCI_FUNC(port->devfn) != 0) { 1292 dev_err(dev, "%s: invalid function number, must be zero\n", 1293 port->name); 1294 goto skip; 1295 } 1296 1297 ret = mvebu_get_tgt_attr(dev->of_node, port->devfn, IORESOURCE_MEM, 1298 &port->mem_target, &port->mem_attr); 1299 if (ret < 0) { 1300 dev_err(dev, "%s: cannot get tgt/attr for mem window\n", 1301 port->name); 1302 goto skip; 1303 } 1304 1305 if (resource_size(&pcie->io) != 0) { 1306 mvebu_get_tgt_attr(dev->of_node, port->devfn, IORESOURCE_IO, 1307 &port->io_target, &port->io_attr); 1308 } else { 1309 port->io_target = -1; 1310 port->io_attr = -1; 1311 } 1312 1313 /* 1314 * Old DT bindings do not contain "intx" interrupt 1315 * so do not fail probing driver when interrupt does not exist. 1316 */ 1317 port->intx_irq = of_irq_get_byname(child, "intx"); 1318 if (port->intx_irq == -EPROBE_DEFER) { 1319 ret = port->intx_irq; 1320 goto err; 1321 } 1322 if (port->intx_irq <= 0) { 1323 dev_warn(dev, "%s: legacy INTx interrupts cannot be masked individually, " 1324 "%pOF does not contain intx interrupt\n", 1325 port->name, child); 1326 } 1327 1328 port->reset_name = devm_kasprintf(dev, GFP_KERNEL, "%s-reset", 1329 port->name); 1330 if (!port->reset_name) { 1331 ret = -ENOMEM; 1332 goto err; 1333 } 1334 1335 port->reset_gpio = devm_fwnode_gpiod_get(dev, of_fwnode_handle(child), 1336 "reset", GPIOD_OUT_HIGH, 1337 port->name); 1338 ret = PTR_ERR_OR_ZERO(port->reset_gpio); 1339 if (ret) { 1340 if (ret != -ENOENT) 1341 goto err; 1342 /* reset gpio is optional */ 1343 port->reset_gpio = NULL; > 1344 devm_kfree(port->reset_name); 1345 port->reset_name = NULL; 1346 } 1347 1348 slot_power_limit = of_pci_get_slot_power_limit(child, 1349 &port->slot_power_limit_value, 1350 &port->slot_power_limit_scale); 1351 if (slot_power_limit) 1352 dev_info(dev, "%s: Slot power limit %u.%uW\n", 1353 port->name, 1354 slot_power_limit / 1000, 1355 (slot_power_limit / 100) % 10); 1356 1357 port->clk = of_clk_get_by_name(child, NULL); 1358 if (IS_ERR(port->clk)) { 1359 dev_err(dev, "%s: cannot get clock\n", port->name); 1360 goto skip; 1361 } 1362 1363 ret = devm_add_action(dev, mvebu_pcie_port_clk_put, port); 1364 if (ret < 0) { 1365 clk_put(port->clk); 1366 goto err; 1367 } 1368 1369 return 1; 1370 1371 skip: 1372 ret = 0; 1373 1374 /* In the case of skipping, we need to free these */ 1375 devm_kfree(dev, port->reset_name); 1376 port->reset_name = NULL; 1377 devm_kfree(dev, port->name); 1378 port->name = NULL; 1379 1380 err: 1381 return ret; 1382 } 1383 -- 0-DAY CI Kernel Test Service https://01.org/lkp