From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 157EE182B7; Sat, 29 Nov 2025 08:57:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.10 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764406677; cv=none; b=QTnkSdkLOchKFgBtXJaDNiB78/jNCQCzlKa80KzPnHujr6JfVRcFW4RB+lDlGhg/SYbfn7j3HcqjNI2+EGl8tnA/8C/9/p1/DD6CiA2TEDUF9l01vkkU0syfJr34cvSWXT8fR5CLTOIYqOcgG7X8hYdIf3pr+yO76vzEmgdX3o8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764406677; c=relaxed/simple; bh=TkFwt+NoayeZwcPwJ0QqE30Eof0FzyjvFMr9tFdPfqA=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=iNemV/c/WPjkUU/KVzkkIidFqUlZw/WZm8Ew9n5R6eaUYNjoht8/6Qvg2hqhJVBeNum7JVFxxSgDrc0BnYskiKCGMiyEK4Hz37hxNnbLFMxR8b2H68rSrc+tBjRhVwDu2KGA9AtwDfSdHgWCIRwHSRv+FgSt00gejsVVGyPEUoo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=bISIjQbJ; arc=none smtp.client-ip=192.198.163.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="bISIjQbJ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1764406676; x=1795942676; h=date:from:to:cc:subject:message-id:mime-version; bh=TkFwt+NoayeZwcPwJ0QqE30Eof0FzyjvFMr9tFdPfqA=; b=bISIjQbJO0KC1dqq1oreT10HP4LUadJmLmrcWihm8Axy5xs9LX8gg5Md cSmtD1z27K0c8NFw0kfitW48R90vdM4Z9xS85Cm+nwxtEX2OFd9yXZXnu oeHFs3px2PuH9vCyZt3wp2oLPrRe2xC5fOVVwEaF9joTI6wn/bLoqCzEh 4GQXrGJva8a7JcmDcgB7hpMrjnVV6xl2XqXCfpPUZTQw8yxVOTuxdGNJN IXbhZY9jq7PlrA5Y+/Wz2iKtvOdJF2w+cBJzWZvPS92wgS1Mfw5E9uOVw it+OjpNnID93V/fRFNZvKrI/YlvbEsjp+NqOCG5o1I3/awHvO05Oy3aZp w==; X-CSE-ConnectionGUID: LjhZVfHVTYS3JQawiod9Ng== X-CSE-MsgGUID: GQ0/I5z1TziK70SdmLM1KQ== X-IronPort-AV: E=McAfee;i="6800,10657,11627"; a="77770662" X-IronPort-AV: E=Sophos;i="6.20,236,1758610800"; d="scan'208";a="77770662" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Nov 2025 00:57:55 -0800 X-CSE-ConnectionGUID: Jpbzt58eTd6NHs8GxVgadQ== X-CSE-MsgGUID: +xNjbcm3TNmXvTrPRKjxCA== X-ExtLoop1: 1 Received: from lkp-server01.sh.intel.com (HELO 4664bbef4914) ([10.239.97.150]) by fmviesa003.fm.intel.com with ESMTP; 29 Nov 2025 00:57:54 -0800 Received: from kbuild by 4664bbef4914 with local (Exim 4.98.2) (envelope-from ) id 1vPGm8-0000000074b-0MXA; Sat, 29 Nov 2025 08:57:52 +0000 Date: Sat, 29 Nov 2025 16:56:53 +0800 From: kernel test robot To: Kuninori Morimoto Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev Subject: [morimoto:renesas-lts/v6.18-rc7-2025-11-28-x5h-ironhide-2 22/36] drivers/mailbox/mailbox.c:417:20: error: call to undeclared function 'kcalloc'; ISO C99 and later do not support implicit function declarations Message-ID: <202511291631.D2oTK19F-lkp@intel.com> Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline tree: https://github.com/morimoto/linux renesas-lts/v6.18-rc7-2025-11-28-x5h-ironhide-2 head: 3aa250dd3d8e5d5146a9d921c8a3e886ba782615 commit: ebcd486226fd6efe22805087273daf0fd77c417f [22/36] mailbox: add new {fw/of}_xlate_with_name() config: x86_64-kexec (https://download.01.org/0day-ci/archive/20251129/202511291631.D2oTK19F-lkp@intel.com/config) compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251129/202511291631.D2oTK19F-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 | Closes: https://lore.kernel.org/oe-kbuild-all/202511291631.D2oTK19F-lkp@intel.com/ All errors (new ones prefixed by >>): >> drivers/mailbox/mailbox.c:417:20: error: call to undeclared function 'kcalloc'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 417 | mbox_name_array = kcalloc(index + 1, sizeof(char*), GFP_KERNEL); | ^ >> drivers/mailbox/mailbox.c:417:18: error: incompatible integer to pointer conversion assigning to 'const char **' from 'int' [-Wint-conversion] 417 | mbox_name_array = kcalloc(index + 1, sizeof(char*), GFP_KERNEL); | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/mailbox/mailbox.c:459:2: error: call to undeclared function 'kfree'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 459 | kfree(mbox_name_array); | ^ 3 errors generated. vim +/kcalloc +417 drivers/mailbox/mailbox.c 367 368 /** 369 * mbox_request_channel - Request a mailbox channel. 370 * @cl: Identity of the client requesting the channel. 371 * @index: Index of mailbox specifier in 'mboxes' property. 372 * 373 * The Client specifies its requirements and capabilities while asking for 374 * a mailbox channel. It can't be called from atomic context. 375 * The channel is exclusively allocated and can't be used by another 376 * client before the owner calls mbox_free_channel. 377 * After assignment, any packet received on this channel will be 378 * handed over to the client via the 'rx_callback'. 379 * The framework holds reference to the client, so the mbox_client 380 * structure shouldn't be modified until the mbox_free_channel returns. 381 * 382 * Return: Pointer to the channel assigned to the client if successful. 383 * ERR_PTR for request failure. 384 */ 385 struct mbox_chan *mbox_request_channel(struct mbox_client *cl, int index) 386 { 387 struct fwnode_reference_args fwspec; 388 struct fwnode_handle *fwnode; 389 struct mbox_controller *mbox; 390 struct of_phandle_args spec; 391 struct mbox_chan *chan; 392 struct device *dev; 393 const char **mbox_name_array; 394 const char *mbox_name; 395 unsigned int i; 396 int ret; 397 398 dev = cl->dev; 399 if (!dev) { 400 pr_debug("No owner device\n"); 401 return ERR_PTR(-ENODEV); 402 } 403 404 fwnode = dev_fwnode(dev); 405 if (!fwnode) { 406 dev_dbg(dev, "No owner fwnode\n"); 407 return ERR_PTR(-ENODEV); 408 } 409 410 ret = fwnode_property_get_reference_args(fwnode, "mboxes", "#mbox-cells", 411 0, index, &fwspec); 412 if (ret) { 413 dev_err(dev, "%s: can't parse \"%s\" property\n", __func__, "mboxes"); 414 return ERR_PTR(ret); 415 } 416 > 417 mbox_name_array = kcalloc(index + 1, sizeof(char*), GFP_KERNEL); 418 if (!mbox_name_array) 419 return ERR_PTR(-ENOMEM); 420 421 mbox_name = NULL; 422 ret = fwnode_property_read_string_array(fwnode, "mbox-names", mbox_name_array, index + 1); 423 if (ret > 0) 424 mbox_name = mbox_name_array[index]; 425 426 spec.np = to_of_node(fwspec.fwnode); 427 spec.args_count = fwspec.nargs; 428 for (i = 0; i < spec.args_count; i++) 429 spec.args[i] = fwspec.args[i]; 430 431 scoped_guard(mutex, &con_mutex) { 432 chan = ERR_PTR(-EPROBE_DEFER); 433 list_for_each_entry(mbox, &mbox_cons, node) { 434 if (device_match_fwnode(mbox->dev, fwspec.fwnode)) { 435 if (mbox_name && mbox->fw_xlate_with_name) 436 chan = mbox->fw_xlate_with_name(mbox, &fwspec, mbox_name); 437 else if (mbox->fw_xlate) 438 chan = mbox->fw_xlate(mbox, &fwspec); 439 else if (mbox_name && mbox->of_xlate_with_name) 440 chan = mbox->of_xlate_with_name(mbox, &spec, mbox_name); 441 else if (mbox->of_xlate) 442 chan = mbox->of_xlate(mbox, &spec); 443 444 if (!IS_ERR(chan)) 445 break; 446 } 447 } 448 449 fwnode_handle_put(fwspec.fwnode); 450 451 if (IS_ERR(chan)) 452 goto end; 453 454 ret = __mbox_bind_client(chan, cl); 455 if (ret) 456 chan = ERR_PTR(ret); 457 } 458 end: > 459 kfree(mbox_name_array); 460 461 return chan; 462 } 463 EXPORT_SYMBOL_GPL(mbox_request_channel); 464 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki