[groeck-staging:hwmon 7/14] drivers/hwmon/hwmon.c:789:12: error: call to undeclared function 'is_hwmon_device'; ISO C99 and later do not support implicit function declarations
kernel test robot <[email protected]>
| Newsgroups | dev.linux.lists.llvm,dev.linux.lists.oe-kbuild-all |
|---|---|
| Message-ID | <[email protected]> |
tree: https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon head: ece58c6620869b5d7f0e1305370df473367c085d commit: b6868a406c5b0bde10303f596fa95010ad68a456 [7/14] hwmon: Ensure that 'dev' passed to hwmon_notify_event() is a hwmon device config: arm64-randconfig-003-20260822 (https://download.01.org/0day-ci/archive/20260823/[email protected]/config) compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 935bfc708590c60147a79c7df145bb6e68b1d388) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260823/[email protected]/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <[email protected]> | Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ All errors (new ones prefixed by >>): >> drivers/hwmon/hwmon.c:789:12: error: call to undeclared function 'is_hwmon_device'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 789 | if (WARN(!is_hwmon_device(dev), "%s is not a hardware monitoring device\n", | ^ 1 error generated. vim +/is_hwmon_device +789 drivers/hwmon/hwmon.c 778 779 int hwmon_notify_event(struct device *dev, enum hwmon_sensor_types type, 780 u32 attr, int channel) 781 { 782 char event[MAX_SYSFS_ATTR_NAME_LENGTH + 5]; 783 char sattr[MAX_SYSFS_ATTR_NAME_LENGTH]; 784 char *envp[] = { event, NULL }; 785 const char * const *templates; 786 const char *template; 787 int base; 788 > 789 if (WARN(!is_hwmon_device(dev), "%s is not a hardware monitoring device\n", 790 dev_name(dev))) 791 return -EINVAL; 792 if (type >= ARRAY_SIZE(__templates)) 793 return -EINVAL; 794 if (attr >= __templates_size[type]) 795 return -EINVAL; 796 797 templates = __templates[type]; 798 template = templates[attr]; 799 800 base = hwmon_attr_base(type); 801 802 scnprintf(sattr, MAX_SYSFS_ATTR_NAME_LENGTH, template, base + channel); 803 scnprintf(event, sizeof(event), "NAME=%s", sattr); 804 sysfs_notify(&dev->kobj, NULL, sattr); 805 kobject_uevent_env(&dev->kobj, KOBJ_CHANGE, envp); 806 807 if (type == hwmon_temp) 808 hwmon_thermal_notify(dev, channel); 809 810 return 0; 811 } 812 EXPORT_SYMBOL_GPL(hwmon_notify_event); 813 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki