lkml.org 
[lkml]   [2021]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectlib/test_hmm.c:631:16: warning: variable 'page' set but not used
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 303392fd5c160822bf778270b28ec5ea50cab2b4
commit: b659baea75469f0c5bd26f18461dfcdc1bbbac82 mm: selftests for exclusive device memory
date: 2 days ago
config: x86_64-randconfig-a006-20210704 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project cb5de7c813f976dd458bd2a7f40702ba648bf650)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b659baea75469f0c5bd26f18461dfcdc1bbbac82
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout b659baea75469f0c5bd26f18461dfcdc1bbbac82
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64

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/test_hmm.c:631:16: warning: variable 'page' set but not used [-Wunused-but-set-variable]
struct page *page;
^
1 warning generated.


vim +/page +631 lib/test_hmm.c

623
624 static int dmirror_check_atomic(struct dmirror *dmirror, unsigned long start,
625 unsigned long end)
626 {
627 unsigned long pfn;
628
629 for (pfn = start >> PAGE_SHIFT; pfn < (end >> PAGE_SHIFT); pfn++) {
630 void *entry;
> 631 struct page *page;
632
633 entry = xa_load(&dmirror->pt, pfn);
634 page = xa_untag_pointer(entry);
635 if (xa_pointer_tag(entry) == DPT_XA_TAG_ATOMIC)
636 return -EPERM;
637 }
638
639 return 0;
640 }
641

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2021-07-04 01:57    [W:0.030 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site