All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: block/holder.c:10:72: warning: Parameter 'bdev' can be declared with const [constParameter]
Date: Sun, 03 Apr 2022 03:44:52 +0800	[thread overview]
Message-ID: <202204030348.htSSUVTN-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2146 bytes --]

CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Christoph Hellwig <hch@lst.de>
CC: Jens Axboe <axboe@kernel.dk>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   88e6c0207623874922712e162e25d9dafd39661e
commit: 0dbcfe247f22a6d73302dfa691c48b3c14d31c4c block: look up holders by bdev
date:   8 months ago
:::::: branch date: 17 hours ago
:::::: commit date: 8 months ago
compiler: nios2-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

>> block/holder.c:10:72: warning: Parameter 'bdev' can be declared with const [constParameter]
   static struct bd_holder_disk *bd_find_holder_disk(struct block_device *bdev,
                                                                          ^

vim +/bdev +10 block/holder.c

c66fd019713e9c Christoph Hellwig 2021-08-04   9  
c66fd019713e9c Christoph Hellwig 2021-08-04 @10  static struct bd_holder_disk *bd_find_holder_disk(struct block_device *bdev,
c66fd019713e9c Christoph Hellwig 2021-08-04  11  						  struct gendisk *disk)
c66fd019713e9c Christoph Hellwig 2021-08-04  12  {
c66fd019713e9c Christoph Hellwig 2021-08-04  13  	struct bd_holder_disk *holder;
c66fd019713e9c Christoph Hellwig 2021-08-04  14  
0dbcfe247f22a6 Christoph Hellwig 2021-08-04  15  	list_for_each_entry(holder, &disk->slave_bdevs, list)
0dbcfe247f22a6 Christoph Hellwig 2021-08-04  16  		if (holder->bdev == bdev)
c66fd019713e9c Christoph Hellwig 2021-08-04  17  			return holder;
c66fd019713e9c Christoph Hellwig 2021-08-04  18  	return NULL;
c66fd019713e9c Christoph Hellwig 2021-08-04  19  }
c66fd019713e9c Christoph Hellwig 2021-08-04  20  

:::::: The code at line 10 was first introduced by commit
:::::: c66fd019713e9cf7d6f1243c378cd177d01fe18a block: make the block holder code optional

:::::: TO: Christoph Hellwig <hch@lst.de>
:::::: CC: Jens Axboe <axboe@kernel.dk>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

             reply	other threads:[~2022-04-02 19:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-02 19:44 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-07-13 18:30 block/holder.c:10:72: warning: Parameter 'bdev' can be declared with const [constParameter] kernel test robot
2022-04-15 15:23 kernel test robot
2022-04-02 14:40 kernel test robot

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=202204030348.htSSUVTN-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.