linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Alexander Koskovich <AKoskovich@pm.me>,
	Sebastian Reichel <sre@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Alexander Koskovich <akoskovich@pm.me>
Subject: Re: [PATCH] power: reset: nvmem-reboot-mode: respect cell size for nvmem_cell_write
Date: Mon, 15 Dec 2025 02:31:26 +0800	[thread overview]
Message-ID: <202512150225.njZvGeNB-lkp@intel.com> (raw)
In-Reply-To: <20251214005903.2802724-1-akoskovich@pm.me>

Hi Alexander,

kernel test robot noticed the following build errors:

[auto build test ERROR on sre-power-supply/for-next]
[also build test ERROR on amd-pstate/linux-next amd-pstate/bleeding-edge linus/master v6.19-rc1 next-20251212]
[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/Alexander-Koskovich/power-reset-nvmem-reboot-mode-respect-cell-size-for-nvmem_cell_write/20251214-090110
base:   https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.git for-next
patch link:    https://lore.kernel.org/r/20251214005903.2802724-1-akoskovich%40pm.me
patch subject: [PATCH] power: reset: nvmem-reboot-mode: respect cell size for nvmem_cell_write
config: i386-randconfig-004-20251214 (https://download.01.org/0day-ci/archive/20251215/202512150225.njZvGeNB-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/20251215/202512150225.njZvGeNB-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/202512150225.njZvGeNB-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/power/reset/nvmem-reboot-mode.c:32:2: error: call to undeclared function 'kfree'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      32 |         kfree(buf);
         |         ^
   1 error generated.


vim +/kfree +32 drivers/power/reset/nvmem-reboot-mode.c

    18	
    19	static int nvmem_reboot_mode_write(struct reboot_mode_driver *reboot,
    20					    unsigned int magic)
    21	{
    22		struct nvmem_reboot_mode *nvmem_rbm;
    23		size_t buf_len;
    24		void *buf;
    25		int ret;
    26	
    27		nvmem_rbm = container_of(reboot, struct nvmem_reboot_mode, reboot);
    28	
    29		buf = nvmem_cell_read(nvmem_rbm->cell, &buf_len);
    30		if (IS_ERR(buf))
    31			return PTR_ERR(buf);
  > 32		kfree(buf);
    33	
    34		if (buf_len > sizeof(magic))
    35			return -EINVAL;
    36	
    37		ret = nvmem_cell_write(nvmem_rbm->cell, &magic, buf_len);
    38		if (ret < 0)
    39			dev_err(reboot->dev, "update reboot mode bits failed\n");
    40	
    41		return ret;
    42	}
    43	

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

      reply	other threads:[~2025-12-14 18:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-14  0:59 [PATCH] power: reset: nvmem-reboot-mode: respect cell size for nvmem_cell_write Alexander Koskovich
2025-12-14 18:31 ` kernel test robot [this message]

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=202512150225.njZvGeNB-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=AKoskovich@pm.me \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=sre@kernel.org \
    /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).