tree:
https://github.com/shenki/linux dev-5.9
head: bcbbec6c5409bc690adf4808d4ae36031f997c2e
commit: ba26e8149e65cbefb51063ce4cdde5989f7c0d08 [117/144] fsi: occ: Add support for P10
config: x86_64-randconfig-a005-20201119 (attached as .config)
compiler: clang version 12.0.0 (
https://github.com/llvm/llvm-project
b2613fb2f0f53691dd0211895afbb9413457fca7)
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://github.com/shenki/linux/commit/ba26e8149e65cbefb51063ce4cdde5989f...
git remote add shenki
https://github.com/shenki/linux
git fetch --no-tags shenki dev-5.9
git checkout ba26e8149e65cbefb51063ce4cdde5989f7c0d08
# 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/fsi/fsi-occ.c:570:17: warning: cast to smaller integer
type 'enum versions' from 'const void *' [-Wvoid-pointer-to-enum-cast]
occ->version = (enum versions)md;
^~~~~~~~~~~~~~~~~
1 warning generated.
vim +570 drivers/fsi/fsi-occ.c
552
553 static int occ_probe(struct platform_device *pdev)
554 {
555 int rc;
556 u32 reg;
557 struct occ *occ;
558 struct platform_device *hwmon_dev;
559 struct device *dev = &pdev->dev;
560 const void *md = of_device_get_match_data(dev);
561 struct platform_device_info hwmon_dev_info = {
562 .parent = dev,
563 .name = "occ-hwmon",
564 };
565
566 occ = devm_kzalloc(dev, sizeof(*occ), GFP_KERNEL);
567 if (!occ)
568 return -ENOMEM;
569
570 occ->version = (enum versions)md;
571 occ->dev =
dev;
572 occ->sbefifo = dev->parent;
573 mutex_init(&occ->occ_lock);
574
575 if (dev->of_node) {
576 rc = of_property_read_u32(dev->of_node, "reg", ®);
577 if (!rc) {
578 /* make sure we don't have a duplicate from dts */
579 occ->idx = ida_simple_get(&occ_ida, reg, reg + 1,
580 GFP_KERNEL);
581 if (occ->idx < 0)
582 occ->idx = ida_simple_get(&occ_ida, 1, INT_MAX,
583 GFP_KERNEL);
584 } else {
585 occ->idx = ida_simple_get(&occ_ida, 1, INT_MAX,
586 GFP_KERNEL);
587 }
588 } else {
589 occ->idx = ida_simple_get(&occ_ida, 1, INT_MAX, GFP_KERNEL);
590 }
591
592 platform_set_drvdata(pdev, occ);
593
594 snprintf(occ->name, sizeof(occ->name), "occ%d", occ->idx);
595 occ->mdev.fops = &occ_fops;
596 occ->mdev.minor = MISC_DYNAMIC_MINOR;
597 occ->mdev.name = occ->name;
598 occ->mdev.parent = dev;
599
600 rc = misc_register(&occ->mdev);
601 if (rc) {
602 dev_err(dev, "failed to register miscdevice: %d\n", rc);
603 ida_simple_remove(&occ_ida, occ->idx);
604 return rc;
605 }
606
607 hwmon_dev_info.id = occ->idx;
608 hwmon_dev = platform_device_register_full(&hwmon_dev_info);
609 if (!hwmon_dev)
610 dev_warn(dev, "failed to create hwmon device\n");
611
612 return 0;
613 }
614
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org