From: Mike Snitzer <snitzer@kernel.org>
To: Matthew Sakai <msakai@redhat.com>
Cc: oe-kbuild-all@lists.linux.dev, dm-devel@lists.linux.dev,
"J. corwin Coburn" <corwin@hurlbutnet.net>,
John Wiele <jwiele@redhat.com>, kernel test robot <lkp@intel.com>
Subject: Re: [device-mapper-dm:dm-vdo-wip 55/90] drivers/md/dm-vdo/block-map.h:35:37: warning: 'UNMAPPED_BLOCK_MAP_ENTRY' defined but not used
Date: Thu, 2 Nov 2023 11:11:54 -0400 [thread overview]
Message-ID: <ZUO8OiRFhUNlC2rR@redhat.com> (raw)
In-Reply-To: <202311021353.WMMPQspU-lkp@intel.com>
[lkp: please update your scripts to use the new
dm-devel@lists.linux.dev when emailing dm-devel. The MAINTAINERS file
was updated so I don't know why you'd still be using the old
dm-devel@redhat.com address]
On Thu, Nov 02 2023 at 1:43P -0400,
kernel test robot <lkp@intel.com> wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git dm-vdo-wip
> head: d4e7d305aaa9738d9606f986ad8f2f01edbb14b3
> commit: 5a6d19abe1dc27648b64418df24ea0acef0f38d6 [55/90] dm vdo: enable configuration and building of dm-vdo
> config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20231102/202311021353.WMMPQspU-lkp@intel.com/config)
> compiler: alpha-linux-gcc (GCC) 13.2.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231102/202311021353.WMMPQspU-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/202311021353.WMMPQspU-lkp@intel.com/
>
> All warnings (new ones prefixed by >>):
>
> In file included from drivers/md/dm-vdo-target.c:16:
> >> drivers/md/dm-vdo/block-map.h:35:37: warning: 'UNMAPPED_BLOCK_MAP_ENTRY' defined but not used [-Wunused-const-variable=]
> 35 | static const struct block_map_entry UNMAPPED_BLOCK_MAP_ENTRY = {
> | ^~~~~~~~~~~~~~~~~~~~~~~~
> >> drivers/md/dm-vdo/block-map.h:34:38: warning: 'NO_PAGE' defined but not used [-Wunused-const-variable=]
> 34 | static const physical_block_number_t NO_PAGE = 0xFFFFFFFFFFFFFFFF;
> | ^~~~~~~
>
>
> vim +/UNMAPPED_BLOCK_MAP_ENTRY +35 drivers/md/dm-vdo/block-map.h
>
> fd98f3e3ccc645 Matthew Sakai 2023-10-26 33
> 15deeca3859a19 Matthew Sakai 2023-10-26 @34 static const physical_block_number_t NO_PAGE = 0xFFFFFFFFFFFFFFFF;
> 15deeca3859a19 Matthew Sakai 2023-10-26 @35 static const struct block_map_entry UNMAPPED_BLOCK_MAP_ENTRY = {
> 15deeca3859a19 Matthew Sakai 2023-10-26 36 .mapping_state = VDO_MAPPING_STATE_UNMAPPED & 0x0F,
> 15deeca3859a19 Matthew Sakai 2023-10-26 37 .pbn_high_nibble = 0,
> 15deeca3859a19 Matthew Sakai 2023-10-26 38 .pbn_low_word = __cpu_to_le32(VDO_ZERO_BLOCK & UINT_MAX),
> 15deeca3859a19 Matthew Sakai 2023-10-26 39 };
> 15deeca3859a19 Matthew Sakai 2023-10-26 40
>
> :::::: The code at line 35 was first introduced by commit
> :::::: 15deeca3859a19abfaadd333fb3df7a45087ab3e dm vdo: implement the block map page cache
>
> :::::: TO: Matthew Sakai <msakai@redhat.com>
> :::::: CC: Mike Snitzer <snitzer@kernel.org>
>
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki
>
UNMAPPED_BLOCK_MAP_ENTRY isn't defined until commit 15deeca3859a1 but
it is used by the earlier commit fd98f3e3ccc645. So it needs moving
to that earlier commit.
But that aside, the above warning is correctly complaining about the
definition of static variables that aren't ever used. We need to
define in block-map.c but declare them as extern in block-map.h
I've fixed this up in linux-dm.git's dm-vdo (and rebased dm-vdo-wip)
next prev parent reply other threads:[~2023-11-02 15:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-02 5:43 [device-mapper-dm:dm-vdo-wip 55/90] drivers/md/dm-vdo/block-map.h:35:37: warning: 'UNMAPPED_BLOCK_MAP_ENTRY' defined but not used kernel test robot
2023-11-02 15:11 ` Mike Snitzer [this message]
2023-11-03 1:51 ` Yujie Liu
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=ZUO8OiRFhUNlC2rR@redhat.com \
--to=snitzer@kernel.org \
--cc=corwin@hurlbutnet.net \
--cc=dm-devel@lists.linux.dev \
--cc=jwiele@redhat.com \
--cc=lkp@intel.com \
--cc=msakai@redhat.com \
--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 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.