linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Douglas Anderson <dianders@chromium.org>
Cc: oe-kbuild-all@lists.linux.dev,
	Linux Memory Management List <linux-mm@kvack.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: [linux-next:master 6492/7272] kernel/watchdog.c:111:12: warning: 'hardlockup_all_cpu_backtrace_proc_handler' defined but not used
Date: Fri, 4 Aug 2023 15:18:21 +0800	[thread overview]
Message-ID: <202308041501.2T8kM1gb-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   bdffb18b5dd8071cd25685b966f380a30b1fadaa
commit: 838b3b76220d5b1bc53e4186d8936c5ec6810bf0 [6492/7272] watchdog/hardlockup: avoid large stack frames in watchdog_hardlockup_check()
config: x86_64-randconfig-x012-20230731 (https://download.01.org/0day-ci/archive/20230804/202308041501.2T8kM1gb-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230804/202308041501.2T8kM1gb-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/202308041501.2T8kM1gb-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> kernel/watchdog.c:111:12: warning: 'hardlockup_all_cpu_backtrace_proc_handler' defined but not used [-Wunused-function]
     111 | static int hardlockup_all_cpu_backtrace_proc_handler(struct ctl_table *table, int write,
         |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/hardlockup_all_cpu_backtrace_proc_handler +111 kernel/watchdog.c

   110	
 > 111	static int hardlockup_all_cpu_backtrace_proc_handler(struct ctl_table *table, int write,
   112			  void *buffer, size_t *lenp, loff_t *ppos)
   113	{
   114		int ret;
   115	
   116		ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos);
   117	
   118		/*
   119		 * Only allocate memory for the backtrace mask if userspace actually
   120		 * wants to trace all CPUs since this can take up 1K of space on a
   121		 * system with CONFIG_NR_CPUS=8192.
   122		 */
   123		if (sysctl_hardlockup_all_cpu_backtrace && !hardlockup_backtrace_mask) {
   124			hardlockup_backtrace_mask =
   125				   kzalloc(sizeof(*hardlockup_backtrace_mask), GFP_KERNEL);
   126		} else if (!sysctl_hardlockup_all_cpu_backtrace && hardlockup_backtrace_mask) {
   127			kfree(hardlockup_backtrace_mask);
   128			hardlockup_backtrace_mask = NULL;
   129		}
   130	
   131		return ret;
   132	}
   133	

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


             reply	other threads:[~2023-08-04  7:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-04  7:18 kernel test robot [this message]
2023-08-04 14:09 ` Doug Anderson

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=202308041501.2T8kM1gb-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=dianders@chromium.org \
    --cc=linux-mm@kvack.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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