llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>, Bai Ping <ping.bai@nxp.com>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	Marco Felsch <m.felsch@pengutronix.de>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, Peng Fan <peng.fan@nxp.com>
Subject: Re: [PATCH v2 2/3] clocksource/drivers/imx-sysctr: drop use global variables
Date: Sun, 28 Jan 2024 08:15:22 +0800	[thread overview]
Message-ID: <202401280840.br5xJEeO-lkp@intel.com> (raw)
In-Reply-To: <20240125-imx-sysctr-v2-2-7332470cd7ae@nxp.com>

Hi Peng,

kernel test robot noticed the following build errors:

[auto build test ERROR on 01af33cc9894b4489fb68fa35c40e9fe85df63dc]

url:    https://github.com/intel-lab-lkp/linux/commits/Peng-Fan-OSS/dt-bindings-timer-nxp-sysctr-timer-support-i-MX95/20240125-191500
base:   01af33cc9894b4489fb68fa35c40e9fe85df63dc
patch link:    https://lore.kernel.org/r/20240125-imx-sysctr-v2-2-7332470cd7ae%40nxp.com
patch subject: [PATCH v2 2/3] clocksource/drivers/imx-sysctr: drop use global variables
config: i386-buildonly-randconfig-001-20240128 (https://download.01.org/0day-ci/archive/20240128/202401280840.br5xJEeO-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240128/202401280840.br5xJEeO-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/202401280840.br5xJEeO-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/clocksource/timer-imx-sysctr.c:135:9: error: call to undeclared function 'kzalloc'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     135 |         priv = kzalloc(sizeof(struct sysctr_private), GFP_KERNEL);
         |                ^
   drivers/clocksource/timer-imx-sysctr.c:135:9: note: did you mean 'vzalloc'?
   include/linux/vmalloc.h:141:14: note: 'vzalloc' declared here
     141 | extern void *vzalloc(unsigned long size) __alloc_size(1);
         |              ^
>> drivers/clocksource/timer-imx-sysctr.c:135:7: error: incompatible integer to pointer conversion assigning to 'struct sysctr_private *' from 'int' [-Wint-conversion]
     135 |         priv = kzalloc(sizeof(struct sysctr_private), GFP_KERNEL);
         |              ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/clocksource/timer-imx-sysctr.c:141:3: error: call to undeclared function 'kfree'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     141 |                 kfree(priv);
         |                 ^
   drivers/clocksource/timer-imx-sysctr.c:141:3: note: did you mean 'vfree'?
   include/linux/vmalloc.h:161:13: note: 'vfree' declared here
     161 | extern void vfree(const void *addr);
         |             ^
   3 errors generated.


vim +/kzalloc +135 drivers/clocksource/timer-imx-sysctr.c

   128	
   129	static int __init sysctr_timer_init(struct device_node *np)
   130	{
   131		struct sysctr_private *priv;
   132		void __iomem *base;
   133		int ret;
   134	
 > 135		priv = kzalloc(sizeof(struct sysctr_private), GFP_KERNEL);
   136		if (!priv)
   137			return -ENOMEM;
   138	
   139		ret = timer_of_init(np, &to_sysctr);
   140		if (ret) {
 > 141			kfree(priv);

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

           reply	other threads:[~2024-01-28  0:16 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20240125-imx-sysctr-v2-2-7332470cd7ae@nxp.com>]

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=202401280840.br5xJEeO-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=conor+dt@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=m.felsch@pengutronix.de \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=peng.fan@nxp.com \
    --cc=peng.fan@oss.nxp.com \
    --cc=ping.bai@nxp.com \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=tglx@linutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).