Re: [PATCH] staging: nvec: Use kzalloc_obj instead of kzalloc
From: kernel test robot
Date: Sun Feb 15 2026 - 21:51:51 EST
Hi Samyak,
kernel test robot noticed the following build errors:
[auto build test ERROR on staging/staging-testing]
url: https://github.com/intel-lab-lkp/linux/commits/Samyak/staging-nvec-Use-kzalloc_obj-instead-of-kzalloc/20260215-203130
base: staging/staging-testing
patch link: https://lore.kernel.org/r/20260215122913.104064-1-samyak.bambole07%40gmail.com
patch subject: [PATCH] staging: nvec: Use kzalloc_obj instead of kzalloc
config: arm-defconfig (https://download.01.org/0day-ci/archive/20260216/202602161056.Elbb21hV-lkp@xxxxxxxxx/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project afd4df07ab0262482829d4410a6bae9f2809d37b)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260216/202602161056.Elbb21hV-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202602161056.Elbb21hV-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
>> drivers/staging/nvec/nvec_ps2.c:105:12: error: call to undeclared function 'kzalloc_obj'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
105 | ser_dev = kzalloc_obj(*ser_dev, GFP_KERNEL);
| ^
>> drivers/staging/nvec/nvec_ps2.c:105:10: error: incompatible integer to pointer conversion assigning to 'struct serio *' from 'int' [-Wint-conversion]
105 | ser_dev = kzalloc_obj(*ser_dev, GFP_KERNEL);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
vim +/kzalloc_obj +105 drivers/staging/nvec/nvec_ps2.c
99
100 static int nvec_mouse_probe(struct platform_device *pdev)
101 {
102 struct nvec_chip *nvec = dev_get_drvdata(pdev->dev.parent);
103 struct serio *ser_dev;
104
> 105 ser_dev = kzalloc_obj(*ser_dev, GFP_KERNEL);
106 if (!ser_dev)
107 return -ENOMEM;
108
109 ser_dev->id.type = SERIO_8042;
110 ser_dev->write = ps2_sendcommand;
111 ser_dev->start = ps2_startstreaming;
112 ser_dev->stop = ps2_stopstreaming;
113
114 strscpy(ser_dev->name, "nvec mouse", sizeof(ser_dev->name));
115 strscpy(ser_dev->phys, "nvec", sizeof(ser_dev->phys));
116
117 ps2_dev.ser_dev = ser_dev;
118 ps2_dev.notifier.notifier_call = nvec_ps2_notifier;
119 ps2_dev.nvec = nvec;
120 nvec_register_notifier(nvec, &ps2_dev.notifier, 0);
121
122 serio_register_port(ser_dev);
123
124 return 0;
125 }
126
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki