From: kernel test robot <lkp@intel.com>
To: "Mike Rapoport (Microsoft)" <rppt@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Mike Rapoport <rppt@kernel.org>
Subject: [rppt:mm_init/mem_init/v0.1 2/13] arch/um/kernel/physmem.c:27:41: warning: variable 'total_pages' set but not used
Date: Tue, 4 Mar 2025 22:41:59 +0800 [thread overview]
Message-ID: <202503042228.XJgKY4mi-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux.git mm_init/mem_init/v0.1
head: 55eb95380e481029d5e7b8b442b0fdfbe79a9d3e
commit: 6daa1f5d8ea5504c283f562a925f9b8b0d1602d2 [2/13] dev: arch, mm: set max_mapnr when allocating memory map
config: um-allnoconfig (https://download.01.org/0day-ci/archive/20250304/202503042228.XJgKY4mi-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250304/202503042228.XJgKY4mi-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/202503042228.XJgKY4mi-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> arch/um/kernel/physmem.c:27:41: warning: variable 'total_pages' set but not used [-Wunused-but-set-variable]
27 | unsigned long phys_pages, iomem_pages, total_pages;
| ^
1 warning generated.
vim +/total_pages +27 arch/um/kernel/physmem.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 24
cd05cbed42b731 Tiwei Bie 2024-09-16 25 void __init mem_total_pages(unsigned long physmem, unsigned long iomem)
^1da177e4c3f41 Linus Torvalds 2005-04-16 26 {
cd05cbed42b731 Tiwei Bie 2024-09-16 @27 unsigned long phys_pages, iomem_pages, total_pages;
^1da177e4c3f41 Linus Torvalds 2005-04-16 28
^1da177e4c3f41 Linus Torvalds 2005-04-16 29 phys_pages = physmem >> PAGE_SHIFT;
^1da177e4c3f41 Linus Torvalds 2005-04-16 30 iomem_pages = iomem >> PAGE_SHIFT;
^1da177e4c3f41 Linus Torvalds 2005-04-16 31
cd05cbed42b731 Tiwei Bie 2024-09-16 32 total_pages = phys_pages + iomem_pages;
^1da177e4c3f41 Linus Torvalds 2005-04-16 33 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 34
:::::: The code at line 27 was first introduced by commit
:::::: cd05cbed42b73168b0772b83bc24769fea3871bf um: Remove highmem leftovers
:::::: TO: Tiwei Bie <tiwei.btw@antgroup.com>
:::::: CC: Johannes Berg <johannes.berg@intel.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-03-04 14:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202503042228.XJgKY4mi-lkp@intel.com \
--to=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=rppt@kernel.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.