From: Andrew Morton <akpm@linux-foundation.org>
To: kernel test robot <lkp@intel.com>
Cc: Maninder Singh <maninder1.s@samsung.com>,
kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Johannes Weiner <hannes@cmpxchg.org>,
Vaneet Narang <v.narang@samsung.com>,
Linux Memory Management List <linux-mm@kvack.org>,
Petr Mladek <pmladek@suse.com>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
Steven Rostedt <rostedt@goodmis.org>,
John Ogness <john.ogness@linutronix.de>
Subject: Re: [hnaz-mm:master 272/379] lib/vsprintf.c:991:13: warning: variable 'modbuildid' set but not used
Date: Tue, 1 Mar 2022 10:24:48 -0800 [thread overview]
Message-ID: <20220301102448.ff9bf910213d705842a2dd45@linux-foundation.org> (raw)
In-Reply-To: <202203012040.uFWGm3My-lkp@intel.com>
On Tue, 1 Mar 2022 20:11:04 +0800 kernel test robot <lkp@intel.com> wrote:
> tree: https://github.com/hnaz/linux-mm master
> head: a46912c14343fd3269cc133494988af90b377d9f
> commit: b314f622e664eb263ea03ef7f4580e37146f123f [272/379] kallsyms: enhance %pS/s/b printing when KALLSYSMS is disabled
> config: arm-eseries_pxa_defconfig (https://download.01.org/0day-ci/archive/20220301/202203012040.uFWGm3My-lkp@intel.com/config)
> compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
> reproduce (this is a W=1 build):
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # https://github.com/hnaz/linux-mm/commit/b314f622e664eb263ea03ef7f4580e37146f123f
> git remote add hnaz-mm https://github.com/hnaz/linux-mm
> git fetch --no-tags hnaz-mm master
> git checkout b314f622e664eb263ea03ef7f4580e37146f123f
> # save the config file to linux build tree
> mkdir build_dir
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All warnings (new ones prefixed by >>):
>
> lib/vsprintf.c: In function 'sprint_module_info':
> >> lib/vsprintf.c:991:13: warning: variable 'modbuildid' set but not used [-Wunused-but-set-variable]
> 991 | int modbuildid = 0;
> | ^~~~~~~~~~
Do we care about this? [-Wunused-but-set-variable isn't normally set.
Under what circumstances does it get set in your setup?
I did this:
--- a/lib/vsprintf.c~kallsyms-enhance-%ps-s-b-printing-when-kallsysms-is-disabled-fix
+++ a/lib/vsprintf.c
@@ -988,7 +988,7 @@ static int sprint_module_info(char *buf,
unsigned long base;
int ret = 0;
const char *modname;
- int modbuildid = 0;
+ int modbuildid __maybe_unused = 0;
int len;
#if IS_ENABLED(CONFIG_STACKTRACE_BUILD_ID)
const unsigned char *buildid = NULL;
_
> lib/vsprintf.c: In function 'va_format':
> lib/vsprintf.c:1759:9: warning: function 'va_format' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
> 1759 | buf += vsnprintf(buf, end > buf ? end - buf : 0, va_fmt->fmt, va);
> | ^~~
I wonder what this means.
next prev parent reply other threads:[~2022-03-01 18:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-01 12:11 kernel test robot
2022-03-01 18:24 ` Andrew Morton [this message]
2022-03-01 19:22 ` Matthew Wilcox
2022-03-02 9:52 ` John Ogness
2022-03-02 11:52 ` Petr Mladek
2022-03-02 9:56 ` Petr Mladek
2022-03-02 12:07 ` Petr Mladek
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=20220301102448.ff9bf910213d705842a2dd45@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=john.ogness@linutronix.de \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
--cc=maninder1.s@samsung.com \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=senozhatsky@chromium.org \
--cc=v.narang@samsung.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