Re: [PATCH v1 2/5] firmware: thead: Add AON firmware protocol driver
From: kernel test robot
Date: Thu Mar 06 2025 - 02:09:13 EST
Hi Michal,
kernel test robot noticed the following build errors:
[auto build test ERROR on robh/for-next]
[also build test ERROR on linus/master v6.14-rc5 next-20250305]
[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/Michal-Wilczynski/dt-bindings-firmware-thead-th1520-Add-support-for-firmware-node/20250303-230224
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
patch link: https://lore.kernel.org/r/20250303145901.446791-3-m.wilczynski%40samsung.com
patch subject: [PATCH v1 2/5] firmware: thead: Add AON firmware protocol driver
config: hexagon-allyesconfig (https://download.01.org/0day-ci/archive/20250306/202503061453.DvzBlKdM-lkp@xxxxxxxxx/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250306/202503061453.DvzBlKdM-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/202503061453.DvzBlKdM-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
>> drivers/firmware/thead,th1520-aon.c:206:13: error: call to undeclared function 'kzalloc'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
206 | aon_chan = kzalloc(sizeof(*aon_chan), GFP_KERNEL);
| ^
>> drivers/firmware/thead,th1520-aon.c:206:11: error: incompatible integer to pointer conversion assigning to 'struct th1520_aon_chan *' from 'int' [-Wint-conversion]
206 | aon_chan = kzalloc(sizeof(*aon_chan), GFP_KERNEL);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/firmware/thead,th1520-aon.c:219:3: error: call to undeclared function 'kfree'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
219 | kfree(aon_chan);
| ^
drivers/firmware/thead,th1520-aon.c:241:2: error: call to undeclared function 'kfree'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
241 | kfree(aon_chan);
| ^
4 errors generated.
vim +206 drivers/firmware/thead,th1520-aon.c
185
186 /**
187 * th1520_aon_init() - Initialize TH1520 AON firmware protocol interface
188 * @dev: Device pointer for the AON subsystem
189 *
190 * This function initializes the TH1520 AON firmware protocol interface by:
191 * - Allocating and initializing the AON channel structure
192 * - Setting up the mailbox client
193 * - Requesting the AON mailbox channel
194 * - Initializing synchronization primitives
195 *
196 * Return:
197 * * Valid pointer to th1520_aon_chan structure on success
198 * * ERR_PTR(-ENOMEM) if memory allocation fails
199 * * ERR_PTR() with other negative error codes from mailbox operations
200 */
201 struct th1520_aon_chan *th1520_aon_init(struct device *dev)
202 {
203 struct th1520_aon_chan *aon_chan;
204 struct mbox_client *cl;
205
> 206 aon_chan = kzalloc(sizeof(*aon_chan), GFP_KERNEL);
207 if (!aon_chan)
208 return ERR_PTR(-ENOMEM);
209
210 cl = &aon_chan->cl;
211 cl->dev = dev;
212 cl->tx_block = true;
213 cl->tx_tout = MAX_TX_TIMEOUT;
214 cl->rx_callback = th1520_aon_rx_callback;
215
216 aon_chan->ch = mbox_request_channel_byname(cl, "aon");
217 if (IS_ERR(aon_chan->ch)) {
218 dev_err(dev, "Failed to request aon mbox chan\n");
> 219 kfree(aon_chan);
220 return ERR_CAST(aon_chan->ch);
221 }
222
223 mutex_init(&aon_chan->transaction_lock);
224 init_completion(&aon_chan->done);
225
226 return aon_chan;
227 }
228 EXPORT_SYMBOL_GPL(th1520_aon_init);
229
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki