[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202512251820.e0ZKwuCc-lkp@intel.com>
Date: Thu, 25 Dec 2025 18:16:34 +0800
From: kernel test robot <lkp@...el.com>
To: Shivendra Pratap <shivendra.pratap@....qualcomm.com>,
Lorenzo Pieralisi <lpieralisi@...nel.org>,
Arnd Bergmann <arnd@...db.de>,
Bjorn Andersson <andersson@...nel.org>,
Sebastian Reichel <sre@...nel.org>, Rob Herring <robh@...nel.org>,
Sudeep Holla <sudeep.holla@....com>,
Souvik Chakravarty <Souvik.Chakravarty@....com>,
Krzysztof Kozlowski <krzk@...nel.org>,
Andy Yan <andy.yan@...k-chips.com>,
Bartosz Golaszewski <brgl@...nel.org>
Cc: oe-kbuild-all@...ts.linux.dev,
Florian Fainelli <florian.fainelli@...adcom.com>,
Dmitry Baryshkov <lumag@...nel.org>,
Mukesh Ojha <mukesh.ojha@....qualcomm.com>,
Andre Draszik <andre.draszik@...aro.org>,
Kathiravan Thirumoorthy <kathiravan.thirumoorthy@....qualcomm.com>,
linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-arm-msm@...r.kernel.org,
Shivendra Pratap <shivendra.pratap@....qualcomm.com>,
Srinivas Kandagatla <srini@...nel.org>
Subject: Re: [PATCH v18 01/10] power: reset: reboot-mode: Remove devres based
allocations
Hi Shivendra,
kernel test robot noticed the following build errors:
[auto build test ERROR on cc3aa43b44bdb43dfbac0fcb51c56594a11338a8]
url: https://github.com/intel-lab-lkp/linux/commits/Shivendra-Pratap/power-reset-reboot-mode-Remove-devres-based-allocations/20251224-011508
base: cc3aa43b44bdb43dfbac0fcb51c56594a11338a8
patch link: https://lore.kernel.org/r/20251223-arm-psci-system_reset2-vendor-reboots-v18-1-32fa9e76efc3%40oss.qualcomm.com
patch subject: [PATCH v18 01/10] power: reset: reboot-mode: Remove devres based allocations
config: powerpc64-randconfig-r072-20251225 (https://download.01.org/0day-ci/archive/20251225/202512251820.e0ZKwuCc-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 4ef602d446057dabf5f61fb221669ecbeda49279)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251225/202512251820.e0ZKwuCc-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202512251820.e0ZKwuCc-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/power/reset/reboot-mode.c:94:10: error: call to undeclared function 'kzalloc'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
94 | info = kzalloc(sizeof(*info), GFP_KERNEL);
| ^
>> drivers/power/reset/reboot-mode.c:94:8: error: incompatible integer to pointer conversion assigning to 'struct mode_info *' from 'int' [-Wint-conversion]
94 | info = kzalloc(sizeof(*info), GFP_KERNEL);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/power/reset/reboot-mode.c:120:2: error: call to undeclared function 'kfree'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
120 | kfree(info);
| ^
drivers/power/reset/reboot-mode.c:145:3: error: call to undeclared function 'kfree'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
145 | kfree(info);
| ^
4 errors generated.
vim +/kzalloc +94 drivers/power/reset/reboot-mode.c
66
67 /**
68 * reboot_mode_register - register a reboot mode driver
69 * @reboot: reboot mode driver
70 *
71 * Returns: 0 on success or a negative error code on failure.
72 */
73 int reboot_mode_register(struct reboot_mode_driver *reboot)
74 {
75 struct mode_info *info;
76 struct mode_info *next;
77 struct property *prop;
78 struct device_node *np = reboot->dev->of_node;
79 size_t len = strlen(PREFIX);
80 u32 magic;
81 int ret;
82
83 INIT_LIST_HEAD(&reboot->head);
84
85 for_each_property_of_node(np, prop) {
86 if (strncmp(prop->name, PREFIX, len))
87 continue;
88
89 if (of_property_read_u32(np, prop->name, &magic)) {
90 pr_err("reboot mode %s without magic number\n", prop->name);
91 continue;
92 }
93
> 94 info = kzalloc(sizeof(*info), GFP_KERNEL);
95 if (!info) {
96 ret = -ENOMEM;
97 goto error;
98 }
99
100 info->mode = kstrdup_const(prop->name + len, GFP_KERNEL);
101 if (!info->mode) {
102 ret = -ENOMEM;
103 goto error;
104 } else if (info->mode[0] == '\0') {
105 kfree_const(info->mode);
106 ret = -EINVAL;
107 pr_err("invalid mode name(%s): too short!\n", prop->name);
108 goto error;
109 }
110
111 list_add_tail(&info->list, &reboot->head);
112 }
113
114 reboot->reboot_notifier.notifier_call = reboot_mode_notify;
115 register_reboot_notifier(&reboot->reboot_notifier);
116
117 return 0;
118
119 error:
> 120 kfree(info);
121 list_for_each_entry_safe(info, next, &reboot->head, list) {
122 list_del(&info->list);
123 kfree_const(info->mode);
124 kfree(info);
125 }
126
127 return ret;
128 }
129 EXPORT_SYMBOL_GPL(reboot_mode_register);
130
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists