tree:
https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-mergewindow
head: 4aa908fe4704ef9c09a6b2c19b4b49855a3d6055
commit: 010e765b406f8e08685ea5b687c63a5ea234719a [25/31] i2c: riic: Add RZ/G2L support
config: x86_64-randconfig-b001-20210620 (attached as .config)
compiler: clang version 13.0.0 (
https://github.com/llvm/llvm-project
e1adf90826a57b674eee79b071fb46c1f5683cd0)
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
#
https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git/commit/?id=...
git remote add wsa
https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git
git fetch --no-tags wsa i2c/for-mergewindow
git checkout 010e765b406f8e08685ea5b687c63a5ea234719a
# 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/i2c/busses/i2c-riic.c:424:9: warning: cast to smaller
integer type 'enum riic_type' from 'const void *'
[-Wvoid-pointer-to-enum-cast]
type = (enum
riic_type)of_device_get_match_data(&pdev->dev);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
vim +424 drivers/i2c/busses/i2c-riic.c
398
399 static int riic_i2c_probe(struct platform_device *pdev)
400 {
401 struct riic_dev *riic;
402 struct i2c_adapter *adap;
403 struct resource *res;
404 struct i2c_timings i2c_t;
405 struct reset_control *rstc;
406 int i, ret;
407 enum riic_type type;
408
409 riic = devm_kzalloc(&pdev->dev, sizeof(*riic), GFP_KERNEL);
410 if (!riic)
411 return -ENOMEM;
412
413 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
414 riic->base = devm_ioremap_resource(&pdev->dev, res);
415 if (IS_ERR(riic->base))
416 return PTR_ERR(riic->base);
417
418 riic->clk = devm_clk_get(&pdev->dev, NULL);
419 if (IS_ERR(riic->clk)) {
420 dev_err(&pdev->dev, "missing controller clock");
421 return PTR_ERR(riic->clk);
422 }
423
424 type = (enum
riic_type)of_device_get_match_data(&pdev->dev);
425 if (type ==
RIIC_RZ_G2L) {
426 rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);
427 if (IS_ERR(rstc)) {
428 dev_err(&pdev->dev, "Error: missing reset ctrl\n");
429 return PTR_ERR(rstc);
430 }
431
432 reset_control_deassert(rstc);
433 }
434
435 for (i = 0; i < ARRAY_SIZE(riic_irqs); i++) {
436 res = platform_get_resource(pdev, IORESOURCE_IRQ, riic_irqs[i].res_num);
437 if (!res)
438 return -ENODEV;
439
440 ret = devm_request_irq(&pdev->dev, res->start, riic_irqs[i].isr,
441 0, riic_irqs[i].name, riic);
442 if (ret) {
443 dev_err(&pdev->dev, "failed to request irq %s\n",
riic_irqs[i].name);
444 return ret;
445 }
446 }
447
448 adap = &riic->adapter;
449 i2c_set_adapdata(adap, riic);
450 strlcpy(adap->name, "Renesas RIIC adapter", sizeof(adap->name));
451 adap->owner = THIS_MODULE;
452 adap->algo = &riic_algo;
453 adap->dev.parent = &pdev->dev;
454 adap->dev.of_node = pdev->dev.of_node;
455
456 init_completion(&riic->msg_done);
457
458 i2c_parse_fw_timings(&pdev->dev, &i2c_t, true);
459
460 pm_runtime_enable(&pdev->dev);
461
462 ret = riic_init_hw(riic, &i2c_t);
463 if (ret)
464 goto out;
465
466 ret = i2c_add_adapter(adap);
467 if (ret)
468 goto out;
469
470 platform_set_drvdata(pdev, riic);
471
472 dev_info(&pdev->dev, "registered with %dHz bus speed\n",
473 i2c_t.bus_freq_hz);
474 return 0;
475
476 out:
477 pm_runtime_disable(&pdev->dev);
478 return ret;
479 }
480
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org