linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Coly Li <colyli@suse.de>
To: kbuild test robot <lkp@intel.com>,
	kbuild@01.org, Kent Overstreet <koverstreet@google.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
	linux-fsdevel@vger.kernel.org, kbuild-all@01.org
Subject: Re: [bcache:for-next 9/27] drivers/md/bcache/sysfs.c:271 __cached_dev_store() error: uninitialized symbol 'v'.
Date: Fri, 10 Aug 2018 17:56:07 +0800	[thread overview]
Message-ID: <b58fefe0-89fd-770a-4fd3-2b179b7d84b9@suse.de> (raw)
In-Reply-To: <20180810081918.aygl7ck7p4nsmsyf@mwanda>

On 2018/8/10 4:19 PM, kbuild test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/colyli/linux-bcache.git for-next
> head:   2b04674443471465b4bdc0e52b2355bb5e128078
> commit: 9c26e5fd96446919cc77c14a09ba9b6cf2320ab5 [9/27] bcache: set max writeback rate when I/O request is idle
> 
> smatch warnings:
> drivers/md/bcache/sysfs.c:271 __cached_dev_store() error: uninitialized symbol 'v'.
> 
> # https://git.kernel.org/pub/scm/linux/kernel/git/colyli/linux-bcache.git/commit/?id=9c26e5fd96446919cc77c14a09ba9b6cf2320ab5
> git remote add bcache https://git.kernel.org/pub/scm/linux/kernel/git/colyli/linux-bcache.git
> git remote update bcache
> git checkout 9c26e5fd96446919cc77c14a09ba9b6cf2320ab5
> vim +/v +271 drivers/md/bcache/sysfs.c
> 

Oh, here is a bug, thanks for pointing out this. Very helpful!

Coly Li

> cafe5635 Kent Overstreet     2013-03-23  257  
> cafe5635 Kent Overstreet     2013-03-23  258  	sysfs_strtoul(data_csum,	dc->disk.data_csum);
> cafe5635 Kent Overstreet     2013-03-23  259  	d_strtoul(verify);
> 5ceaaad7 Kent Overstreet     2013-09-10  260  	d_strtoul(bypass_torture_test);
> cafe5635 Kent Overstreet     2013-03-23  261  	d_strtoul(writeback_metadata);
> cafe5635 Kent Overstreet     2013-03-23  262  	d_strtoul(writeback_running);
> cafe5635 Kent Overstreet     2013-03-23  263  	d_strtoul(writeback_delay);
> 16749c23 Kent Overstreet     2013-11-11  264  
> cafe5635 Kent Overstreet     2013-03-23  265  	sysfs_strtoul_clamp(writeback_percent, dc->writeback_percent, 0, 40);
> cafe5635 Kent Overstreet     2013-03-23  266  
> 9c26e5fd Coly Li             2018-07-26  267  	if (attr == &sysfs_writeback_rate) {
> 9c26e5fd Coly Li             2018-07-26  268  		int v;
> 9c26e5fd Coly Li             2018-07-26  269  
> 9c26e5fd Coly Li             2018-07-26  270  		sysfs_strtoul_clamp(writeback_rate, v, 1, INT_MAX);
>                                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 9c26e5fd Coly Li             2018-07-26 @271  		atomic_long_set(&dc->writeback_rate.rate, v);
>                                                                                                   ^
> This code is impossible to reach, so Smatch isn't supposed to generate
> a warning...  It doesn't warn when I build it on my system...  Sometimes
> Smatch takes short cuts if the system is overloaded so that might be the
> reason for this warning.
> 
> Anyway, sysfs_strtoul_clamp() returns if "attr == &sysfs_writeback_rate".
> 

[snipped]
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
> 

      reply	other threads:[~2018-08-10 12:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-10  8:19 [bcache:for-next 9/27] drivers/md/bcache/sysfs.c:271 __cached_dev_store() error: uninitialized symbol 'v' kbuild test robot
2018-08-10  9:56 ` Coly Li [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=b58fefe0-89fd-770a-4fd3-2b179b7d84b9@suse.de \
    --to=colyli@suse.de \
    --cc=dan.carpenter@oracle.com \
    --cc=kbuild-all@01.org \
    --cc=kbuild@01.org \
    --cc=koverstreet@google.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=lkp@intel.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;
as well as URLs for NNTP newsgroup(s).