All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: <oe-kbuild-all@lists.linux.dev>, Guenter Roeck <linux@roeck-us.net>
Subject: [groeck-staging:hwmon 7/14] drivers/hwmon/hwmon.c:789:19: error: implicit declaration of function 'is_hwmon_device'; did you mean 'to_hwmon_device'?
Date: Sun, 23 Aug 2026 20:31:34 +0800	[thread overview]
Message-ID: <202608221934.fUKdfrxV-lkp@intel.com> (raw)

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: alpha-defconfig (https://download.01.org/0day-ci/archive/20260822/202608221934.fUKdfrxV-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260822/202608221934.fUKdfrxV-lkp@intel.com/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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202608221934.fUKdfrxV-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from arch/alpha/include/asm/bug.h:23,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:13,
                    from include/asm-generic/current.h:6,
                    from ./arch/alpha/include/generated/asm/current.h:1,
                    from include/linux/sched.h:12,
                    from include/linux/ratelimit.h:6,
                    from include/linux/dev_printk.h:16,
                    from include/linux/device.h:15,
                    from drivers/hwmon/hwmon.c:13:
   drivers/hwmon/hwmon.c: In function 'hwmon_notify_event':
>> drivers/hwmon/hwmon.c:789:19: error: implicit declaration of function 'is_hwmon_device'; did you mean 'to_hwmon_device'? [-Wimplicit-function-declaration]
     789 |         if (WARN(!is_hwmon_device(dev), "%s is not a hardware monitoring device\n",
         |                   ^~~~~~~~~~~~~~~
   include/asm-generic/bug.h:164:32: note: in definition of macro 'WARN'
     164 |         int __ret_warn_on = !!(condition);                              \
         |                                ^~~~~~~~~


vim +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

             reply	other threads:[~2026-08-23 12:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-23 12:31 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-08-23 12:46 [groeck-staging:hwmon 7/14] drivers/hwmon/hwmon.c:789:19: error: implicit declaration of function 'is_hwmon_device'; did you mean 'to_hwmon_device'? kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202608221934.fUKdfrxV-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=linux@roeck-us.net \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.