* [shenki:dev-5.9 117/144] drivers/fsi/fsi-occ.c:570:17: warning: cast to smaller integer type 'enum versions' from 'const void
@ 2020-11-19 8:02 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-11-19 8:02 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3656 bytes --]
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/ba26e8149e65cbefb51063ce4cdde5989f7c0d08
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@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(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 32555 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-11-19 8:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-19 8:02 [shenki:dev-5.9 117/144] drivers/fsi/fsi-occ.c:570:17: warning: cast to smaller integer type 'enum versions' from 'const void kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.