tree:
https://git.kernel.org/pub/scm/linux/kernel/git/kbingham/rcar.git gmsl/dev
head: 73e3ee66deb28072d44a06d4996854442f049d23
commit: 58ed6203d791f921181ae16427b60c208b2ce26d [21/24] DNI: max9286 of_ref_read debug
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (
https://github.com/llvm/llvm-project
02946de3802d3bc65bc9f2eb9b8d4969b5a7add8)
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 58ed6203d791f921181ae16427b60c208b2ce26d
# 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/media/i2c/max9286.c:1478:13: warning: data argument not
used by format string [-Wformat-extra-args]
__LINE__,
of_ref_read(client->dev.of_node));
^
include/linux/dev_printk.h:104:32: note: expanded from macro 'dev_err'
_dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
~~~ ^
drivers/media/i2c/max9286.c:1485:13: warning: data argument not used by format string
[-Wformat-extra-args]
__LINE__, of_ref_read(client->dev.of_node));
^
include/linux/dev_printk.h:104:32: note: expanded from macro 'dev_err'
_dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
~~~ ^
drivers/media/i2c/max9286.c:1516:13: warning: data argument not used by format string
[-Wformat-extra-args]
__LINE__, of_ref_read(client->dev.of_node));
^
include/linux/dev_printk.h:104:32: note: expanded from macro 'dev_err'
_dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
~~~ ^
3 warnings generated.
vim +1478 drivers/media/i2c/max9286.c
1409
1410 static int max9286_probe(struct i2c_client *client)
1411 {
1412 struct max9286_priv *priv;
1413 int ret;
1414
1415 priv = devm_kzalloc(&client->dev, sizeof(*priv), GFP_KERNEL);
1416 if (!priv)
1417 return -ENOMEM;
1418
1419 mutex_init(&priv->mutex);
1420
1421 priv->client = client;
1422 i2c_set_clientdata(client, priv);
1423
1424 priv->gpiod_pwdn = devm_gpiod_get_optional(&client->dev,
"enable",
1425 GPIOD_OUT_HIGH);
1426 if (IS_ERR(priv->gpiod_pwdn))
1427 return PTR_ERR(priv->gpiod_pwdn);
1428
1429 gpiod_set_consumer_name(priv->gpiod_pwdn, "max9286-pwdn");
1430 gpiod_set_value_cansleep(priv->gpiod_pwdn, 1);
1431
1432 /* Wait at least 4ms before the I2C lines latch to the address */
1433 if (priv->gpiod_pwdn)
1434 usleep_range(4000, 5000);
1435
1436 /*
1437 * We can have multiple MAX9286 instances on the same physical I2C
1438 * bus, and I2C children behind ports of separate MAX9286 instances
1439 * having the same I2C address. As the MAX9286 starts by default with
1440 * all ports enabled, we need to disable all ports on all MAX9286
1441 * instances before proceeding to further initialize the devices and
1442 * instantiate children.
1443 *
1444 * Start by just disabling all channels on the current device. Then,
1445 * if all other MAX9286 on the parent bus have been probed, proceed
1446 * to initialize them all, including the current one.
1447 */
1448 max9286_i2c_mux_close(priv);
1449
1450 /*
1451 * The MAX9286 initialises with auto-acknowledge enabled by default.
1452 * This means that if multiple MAX9286 devices are connected to an I2C
1453 * bus, another MAX9286 could ack I2C transfers meant for a device on
1454 * the other side of the GMSL links for this MAX9286 (such as a
1455 * MAX9271). To prevent that disable auto-acknowledge early on; it
1456 * will be enabled later as needed.
1457 */
1458 max9286_configure_i2c(priv, false);
1459
1460 ret = max9286_register_gpio(priv);
1461 if (ret)
1462 goto err_powerdown;
1463
1464 priv->regulator = devm_regulator_get(&client->dev, "poc");
1465 if (IS_ERR(priv->regulator)) {
1466 if (PTR_ERR(priv->regulator) != -EPROBE_DEFER)
1467 dev_err(&client->dev,
1468 "Unable to get PoC regulator (%ld)\n",
1469 PTR_ERR(priv->regulator));
1470 else
1471 dev_err(&client->dev, "Regulator not yet available
-EPROBE_DEFER...\n");
1472
1473 ret = PTR_ERR(priv->regulator);
1474 goto err_powerdown;
1475 }
1476
1477 dev_err(&client->dev, "A) of_node pre parse_dt %d.\n",
1478 __LINE__, of_ref_read(client->dev.of_node));
1479
1480 ret = max9286_parse_dt(priv);
1481 if (ret)
1482 goto err_powerdown;
1483
1484 dev_err(&client->dev, "B) of_node post parse_dt %d.\n",
1485 __LINE__, of_ref_read(client->dev.of_node));
1486
1487 /* Add any userspace support before we return early. */
1488 max9286_debugfs_init(priv);
1489
1490 dev_err(&client->dev, "Pre-init");
1491
1492 ret = device_for_each_child(client->dev.parent, &client->dev,
1493 max9286_is_bound);
1494 if (ret)
1495 return 0;
1496
1497 dev_dbg(&client->dev,
1498 "All max9286 probed: start initialization sequence\n");
1499 ret = device_for_each_child(client->dev.parent, NULL,
1500 max9286_init);
1501 if (ret < 0)
1502 goto err_cleanup_dt;
1503
1504 /* Leave the mux channels disabled until they are selected. */
1505 max9286_i2c_mux_close(priv);
1506
1507 return 0;
1508
1509 err_cleanup_dt:
1510 max9286_cleanup_dt(priv);
1511 max9286_debugfs_remove(priv);
1512 err_powerdown:
1513 gpiod_set_value_cansleep(priv->gpiod_pwdn, 0);
1514
1515 dev_err(&client->dev, "C) of_node post parse_dt %d.\n",
1516 __LINE__, of_ref_read(client->dev.of_node));
1517
1518 return ret;
1519 }
1520
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org