linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Eric DeVolder <eric.devolder@oracle.com>
To: kernel test robot <lkp@intel.com>
Cc: oe-kbuild-all@lists.linux.dev,
	Linux Memory Management List <linux-mm@kvack.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Sourabh Jain <sourabhjain@linux.ibm.com>
Subject: Re: [linux-next:master 10295/10848] arch/x86/kernel/crash.c:232:12: warning: 'prepare_elf_headers' defined but not used
Date: Mon, 21 Aug 2023 13:02:03 -0500	[thread overview]
Message-ID: <b0c0c449-1201-f325-a4a0-43e3dc79a015@oracle.com> (raw)
In-Reply-To: <202308220012.gipltORx-lkp@intel.com>



On 8/21/23 12:01, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   47d9bb711707d15b19fad18c8e2b4b027a264a3a
> commit: f59d77dc3eea31329e70dbc9ba6fea9faa24829f [10295/10848] x86/crash: add x86 crash hotplug support
> config: x86_64-randconfig-r024-20230821 (https://download.01.org/0day-ci/archive/20230822/202308220012.gipltORx-lkp@intel.com/config)
> compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
> reproduce: (https://download.01.org/0day-ci/archive/20230822/202308220012.gipltORx-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/202308220012.gipltORx-lkp@intel.com/
> 
> All warnings (new ones prefixed by >>):
> 
>>> arch/x86/kernel/crash.c:232:12: warning: 'prepare_elf_headers' defined but not used [-Wunused-function]
>       232 | static int prepare_elf_headers(struct kimage *image, void **addr,
>           |            ^~~~~~~~~~~~~~~~~~~
> 
> 

This has been fixed in a separate patch. See the thread:

https://lore.kernel.org/lkml/2dac3bf6-dc57-4e60-ba82-f3eab73e1d5c@oracle.com/

Thanks!
eric

> vim +/prepare_elf_headers +232 arch/x86/kernel/crash.c
> 
> dd5f726076cc763 Vivek Goyal     2014-08-08  230
> dd5f726076cc763 Vivek Goyal     2014-08-08  231  /* Prepare elf headers. Return addr and size */
> dd5f726076cc763 Vivek Goyal     2014-08-08 @232  static int prepare_elf_headers(struct kimage *image, void **addr,
> f59d77dc3eea313 Eric DeVolder   2023-08-14  233  					unsigned long *sz, unsigned long *nr_mem_ranges)
> dd5f726076cc763 Vivek Goyal     2014-08-08  234  {
> 8d5f894a3108ac7 AKASHI Takahiro 2018-04-13  235  	struct crash_mem *cmem;
> 7c321eb2b843bf2 Lianbo Jiang    2019-11-08  236  	int ret;
> dd5f726076cc763 Vivek Goyal     2014-08-08  237
> 8d5f894a3108ac7 AKASHI Takahiro 2018-04-13  238  	cmem = fill_up_crash_elf_data();
> 8d5f894a3108ac7 AKASHI Takahiro 2018-04-13  239  	if (!cmem)
> dd5f726076cc763 Vivek Goyal     2014-08-08  240  		return -ENOMEM;
> dd5f726076cc763 Vivek Goyal     2014-08-08  241
> 9eff303725da653 Borislav Petkov 2019-11-14  242  	ret = walk_system_ram_res(0, -1, cmem, prepare_elf64_ram_headers_callback);
> cbe6601617302b0 AKASHI Takahiro 2018-04-13  243  	if (ret)
> cbe6601617302b0 AKASHI Takahiro 2018-04-13  244  		goto out;
> cbe6601617302b0 AKASHI Takahiro 2018-04-13  245
> cbe6601617302b0 AKASHI Takahiro 2018-04-13  246  	/* Exclude unwanted mem ranges */
> 8d5f894a3108ac7 AKASHI Takahiro 2018-04-13  247  	ret = elf_header_exclude_ranges(cmem);
> cbe6601617302b0 AKASHI Takahiro 2018-04-13  248  	if (ret)
> cbe6601617302b0 AKASHI Takahiro 2018-04-13  249  		goto out;
> cbe6601617302b0 AKASHI Takahiro 2018-04-13  250
> f59d77dc3eea313 Eric DeVolder   2023-08-14  251  	/* Return the computed number of memory ranges, for hotplug usage */
> f59d77dc3eea313 Eric DeVolder   2023-08-14  252  	*nr_mem_ranges = cmem->nr_ranges;
> f59d77dc3eea313 Eric DeVolder   2023-08-14  253
> dd5f726076cc763 Vivek Goyal     2014-08-08  254  	/* By default prepare 64bit headers */
> 9eff303725da653 Borislav Petkov 2019-11-14  255  	ret =  crash_prepare_elf64_headers(cmem, IS_ENABLED(CONFIG_X86_64), addr, sz);
> cbe6601617302b0 AKASHI Takahiro 2018-04-13  256
> cbe6601617302b0 AKASHI Takahiro 2018-04-13  257  out:
> 8d5f894a3108ac7 AKASHI Takahiro 2018-04-13  258  	vfree(cmem);
> dd5f726076cc763 Vivek Goyal     2014-08-08  259  	return ret;
> dd5f726076cc763 Vivek Goyal     2014-08-08  260  }
> f59d77dc3eea313 Eric DeVolder   2023-08-14  261  #endif
> dd5f726076cc763 Vivek Goyal     2014-08-08  262
> 
> :::::: The code at line 232 was first introduced by commit
> :::::: dd5f726076cc7639d9713b334c8c133f77c6757a kexec: support for kexec on panic using new system call
> 
> :::::: TO: Vivek Goyal <vgoyal@redhat.com>
> :::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
> 


      reply	other threads:[~2023-08-21 18:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-21 17:01 kernel test robot
2023-08-21 18:02 ` Eric DeVolder [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=b0c0c449-1201-f325-a4a0-43e3dc79a015@oracle.com \
    --to=eric.devolder@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=sourabhjain@linux.ibm.com \
    /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