From: kernel test robot <lkp@intel.com>
To: Nehuen Lian Bova <nehuenlian.kernel@gmail.com>,
jikos@kernel.org, bentiss@kernel.org
Cc: oe-kbuild-all@lists.linux.dev, linux-input@vger.kernel.org,
linux-kernel@vger.kernel.org,
Nehuen Lian Bova <nehuenlian.kernel@gmail.com>
Subject: Re: [PATCH v2] HID: wacom: replace sprintf calls with safer alternatives
Date: Tue, 3 Nov 2026 13:32:25 +0800 [thread overview]
Message-ID: <202611031325.X7t40TAw-lkp@intel.com> (raw)
In-Reply-To: <20261101054830.291749-1-nehuenlian.kernel@gmail.com>
Hi Nehuen,
kernel test robot noticed the following build errors:
[auto build test ERROR on hid/for-next]
[also build test ERROR on linus/master v7.3 next-20261030]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Nehuen-Lian-Bova/HID-wacom-replace-sprintf-calls-with-safer-alternatives/20261101-024830
base: https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git for-next
patch link: https://lore.kernel.org/r/20261101054830.291749-1-nehuenlian.kernel%40gmail.com
patch subject: [PATCH v2] HID: wacom: replace sprintf calls with safer alternatives
config: parisc-randconfig-1001-20261103 (https://download.01.org/0day-ci/archive/20261103/202611031325.X7t40TAw-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 14.4.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261103/202611031325.X7t40TAw-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/202611031325.X7t40TAw-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/hid/wacom_sys.c: In function '__wacom_initialize_battery':
>> drivers/hid/wacom_sys.c:1842:37: error: passing argument 2 of 'snprintf' makes integer from pointer without a cast [-Wint-conversion]
1842 | snprintf(battery->bat_name, "wacom_battery_%ld", n);
| ^~~~~~~~~~~~~~~~~~~
| |
| char *
In file included from include/linux/kernel.h:32,
from include/linux/random.h:7,
from include/linux/nodemask.h:94,
from include/linux/numa.h:6,
from include/linux/cpumask.h:15,
from include/linux/smp.h:13,
from include/linux/interrupt_rc.h:18,
from include/linux/spinlock.h:60,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:7,
from include/linux/slab.h:17,
from include/linux/hid.h:19,
from drivers/hid/wacom_wac.h:7,
from drivers/hid/wacom_sys.c:6:
include/linux/sprintf.h:13:47: note: expected 'size_t' {aka 'unsigned int'} but argument is of type 'char *'
13 | __printf(3, 4) int snprintf(char *buf, size_t size, const char *fmt, ...);
| ~~~~~~~^~~~
>> drivers/hid/wacom_sys.c:1842:58: error: passing argument 3 of 'snprintf' makes pointer from integer without a cast [-Wint-conversion]
1842 | snprintf(battery->bat_name, "wacom_battery_%ld", n);
| ^
| |
| long unsigned int
include/linux/sprintf.h:13:65: note: expected 'const char *' but argument is of type 'long unsigned int'
13 | __printf(3, 4) int snprintf(char *buf, size_t size, const char *fmt, ...);
| ~~~~~~~~~~~~^~~
vim +/snprintf +1842 drivers/hid/wacom_sys.c
1820
1821 static int __wacom_initialize_battery(struct wacom *wacom,
1822 struct wacom_battery *battery)
1823 {
1824 static atomic_t battery_no = ATOMIC_INIT(0);
1825 struct device *dev = &wacom->hdev->dev;
1826 struct power_supply_config psy_cfg = { .drv_data = battery, };
1827 struct power_supply *ps_bat;
1828 struct power_supply_desc *bat_desc = &battery->bat_desc;
1829 unsigned long n;
1830 int error;
1831
1832 if (!devres_open_group(dev, bat_desc, GFP_KERNEL))
1833 return -ENOMEM;
1834
1835 battery->wacom = wacom;
1836
1837 n = atomic_inc_return(&battery_no) - 1;
1838
1839 bat_desc->properties = wacom_battery_props;
1840 bat_desc->num_properties = ARRAY_SIZE(wacom_battery_props);
1841 bat_desc->get_property = wacom_battery_get_property;
> 1842 snprintf(battery->bat_name, "wacom_battery_%ld", n);
1843 bat_desc->name = battery->bat_name;
1844 bat_desc->type = POWER_SUPPLY_TYPE_BATTERY;
1845 bat_desc->use_for_apm = 0;
1846
1847 ps_bat = devm_power_supply_register(dev, bat_desc, &psy_cfg);
1848 if (IS_ERR(ps_bat)) {
1849 error = PTR_ERR(ps_bat);
1850 goto err;
1851 }
1852
1853 power_supply_powers(ps_bat, &wacom->hdev->dev);
1854
1855 battery->battery = ps_bat;
1856
1857 devres_close_group(dev, bat_desc);
1858 return 0;
1859
1860 err:
1861 devres_release_group(dev, bat_desc);
1862 return error;
1863 }
1864
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2026-11-03 5:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-01 1:14 [PATCH] HID: wacom: replace sprintf calls with sysfs_emit calls in wacom_sys.c Nehuen Lian Bova
2026-11-01 1:19 ` sashiko-bot
2026-11-01 5:48 ` [PATCH v2] HID: wacom: replace sprintf calls with safer alternatives Nehuen Lian Bova
2026-11-01 5:53 ` sashiko-bot
2026-11-01 7:18 ` [PATCH v3] HID: wacom: replace sprintf calls with safer alternatives in wacom_sys.c Nehuen Lian Bova
2026-11-02 19:40 ` Jason Gerecke
2026-11-08 1:23 ` Nehuen Lian Bova
2026-11-03 5:32 ` kernel test robot [this message]
2026-11-03 9:25 ` [PATCH v2] HID: wacom: replace sprintf calls with safer alternatives kernel test robot
2026-11-03 10:56 ` 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=202611031325.X7t40TAw-lkp@intel.com \
--to=lkp@intel.com \
--cc=bentiss@kernel.org \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nehuenlian.kernel@gmail.com \
--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.