From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 22474C433F5 for ; Thu, 24 Feb 2022 07:51:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 92F6C8D0003; Thu, 24 Feb 2022 02:51:19 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8DEDF8D0001; Thu, 24 Feb 2022 02:51:19 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7CE3A8D0003; Thu, 24 Feb 2022 02:51:19 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.28]) by kanga.kvack.org (Postfix) with ESMTP id 59ED48D0001 for ; Thu, 24 Feb 2022 02:51:19 -0500 (EST) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 0ED2422EB0 for ; Thu, 24 Feb 2022 07:51:19 +0000 (UTC) X-FDA: 79176903078.04.5859A60 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by imf27.hostedemail.com (Postfix) with ESMTP id 2384340005 for ; Thu, 24 Feb 2022 07:51:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645689078; x=1677225078; h=date:from:to:cc:subject:message-id:mime-version; bh=lpwB4jTMjqj33BmYz/R9ot/IvUySAZs0rhNFDtnav4Q=; b=ENJtxZh2mLrx6C7JrBknuC57P5T/BWPfbNghEjgZprEHgFyIGJxPUpQx gMAVpxGJHmzaFzQwn0VJmuqRt4S7pzmDimEmNrDMJfIi1ndvYoF4ba4Ox pt2Hjm8mVLX58s1vHVAysG+l93UX9l+CuC8PFRcnnkUrl05opv0TPpH6p 1n8Q/NycFkSWwQyZEnm5mNwfTSYJH/e72Sc0yZWpfeH+vCr/B0/1ICvSx IYMjUglfZrj1OwwbAoyC3HpYsfPpm/dER/JVRAf8WUDm2C+F5FZAoU7gz 9KVfjDxX6oG5zuBo8LZInniasDPv3LNMOPL+hc8fsOAJ/AxTq2M4wdbWU w==; X-IronPort-AV: E=McAfee;i="6200,9189,10267"; a="252367688" X-IronPort-AV: E=Sophos;i="5.88,393,1635231600"; d="scan'208";a="252367688" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2022 23:51:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,393,1635231600"; d="scan'208";a="607335450" Received: from lkp-server01.sh.intel.com (HELO 788b1cd46f0d) ([10.239.97.150]) by fmsmga004.fm.intel.com with ESMTP; 23 Feb 2022 23:51:15 -0800 Received: from kbuild by 788b1cd46f0d with local (Exim 4.92) (envelope-from ) id 1nN8uA-0002s7-W2; Thu, 24 Feb 2022 07:51:14 +0000 Date: Thu, 24 Feb 2022 15:50:12 +0800 From: kernel test robot To: "Liam R. Howlett" Cc: kbuild-all@lists.01.org, Linux Memory Management List Subject: [linux-next:master 6850/7915] mm/nommu.c:554:32: warning: variable 'prev' set but not used Message-ID: <202202241525.pbzn4rHq-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=ENJtxZh2; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf27.hostedemail.com: domain of lkp@intel.com has no SPF policy when checking 192.55.52.115) smtp.mailfrom=lkp@intel.com X-Rspam-User: X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 2384340005 X-Stat-Signature: f618jh3frd4ui5gmaymxrd8kcgf8emtz X-HE-Tag: 1645689077-70925 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: d4a0ae62a277377de396850ed4b709b6bd9b7326 commit: b3d7ba3cdf23cae36715a695c7569f617e57d39d [6850/7915] mm: Remove the vma linked list config: h8300-buildonly-randconfig-r003-20220224 (https://download.01.org/0day-ci/archive/20220224/202202241525.pbzn4rHq-lkp@intel.com/config) compiler: h8300-linux-gcc (GCC) 11.2.0 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 # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=b3d7ba3cdf23cae36715a695c7569f617e57d39d git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout b3d7ba3cdf23cae36715a695c7569f617e57d39d # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=h8300 SHELL=/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): In file included from arch/h8300/include/asm/page.h:5, from arch/h8300/include/asm/thread_info.h:12, from include/linux/thread_info.h:60, from include/asm-generic/preempt.h:5, from ./arch/h8300/include/generated/asm/preempt.h:1, from include/linux/preempt.h:78, from include/linux/spinlock.h:55, from include/linux/mmzone.h:8, from include/linux/gfp.h:6, from include/linux/mm.h:10, from mm/nommu.c:20: mm/nommu.c: In function 'kobjsize': include/asm-generic/page.h:89:51: warning: ordered comparison of pointer with null pointer [-Wextra] 89 | #define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \ | ^~ mm/nommu.c:79:23: note: in expansion of macro 'virt_addr_valid' 79 | if (!objp || !virt_addr_valid(objp)) | ^~~~~~~~~~~~~~~ mm/nommu.c: In function 'add_vma_to_mm': >> mm/nommu.c:554:32: warning: variable 'prev' set but not used [-Wunused-but-set-variable] 554 | struct vm_area_struct *prev; | ^~~~ vim +/prev +554 mm/nommu.c ^1da177e4c3f41 Linus Torvalds 2005-04-16 544 3034097a5017dd David Howells 2006-09-27 545 /* 8feae13110d60c David Howells 2009-01-08 546 * add a VMA into a process's mm_struct in the appropriate place in the list 8feae13110d60c David Howells 2009-01-08 547 * and tree and add to the address space's page tree also if not an anonymous 8feae13110d60c David Howells 2009-01-08 548 * page c1e8d7c6a7a682 Michel Lespinasse 2020-06-08 549 * - should be called with mm->mmap_lock held writelocked 3034097a5017dd David Howells 2006-09-27 550 */ 8feae13110d60c David Howells 2009-01-08 551 static void add_vma_to_mm(struct mm_struct *mm, struct vm_area_struct *vma) ^1da177e4c3f41 Linus Torvalds 2005-04-16 552 { ^1da177e4c3f41 Linus Torvalds 2005-04-16 553 struct address_space *mapping; 4b662c6ba9aa9e Liam R. Howlett 2020-07-24 @554 struct vm_area_struct *prev; 4b662c6ba9aa9e Liam R. Howlett 2020-07-24 555 MA_STATE(mas, &mm->mm_mt, vma->vm_start, vma->vm_end); 8feae13110d60c David Howells 2009-01-08 556 8feae13110d60c David Howells 2009-01-08 557 BUG_ON(!vma->vm_region); 8feae13110d60c David Howells 2009-01-08 558 8feae13110d60c David Howells 2009-01-08 559 mm->map_count++; 8feae13110d60c David Howells 2009-01-08 560 vma->vm_mm = mm; ^1da177e4c3f41 Linus Torvalds 2005-04-16 561 ^1da177e4c3f41 Linus Torvalds 2005-04-16 562 /* add the VMA to the mapping */ ^1da177e4c3f41 Linus Torvalds 2005-04-16 563 if (vma->vm_file) { ^1da177e4c3f41 Linus Torvalds 2005-04-16 564 mapping = vma->vm_file->f_mapping; ^1da177e4c3f41 Linus Torvalds 2005-04-16 565 83cde9e8ba95d1 Davidlohr Bueso 2014-12-12 566 i_mmap_lock_write(mapping); ^1da177e4c3f41 Linus Torvalds 2005-04-16 567 flush_dcache_mmap_lock(mapping); 6b2dbba8b6ac4d Michel Lespinasse 2012-10-08 568 vma_interval_tree_insert(vma, &mapping->i_mmap); ^1da177e4c3f41 Linus Torvalds 2005-04-16 569 flush_dcache_mmap_unlock(mapping); 83cde9e8ba95d1 Davidlohr Bueso 2014-12-12 570 i_mmap_unlock_write(mapping); ^1da177e4c3f41 Linus Torvalds 2005-04-16 571 } ^1da177e4c3f41 Linus Torvalds 2005-04-16 572 4b662c6ba9aa9e Liam R. Howlett 2020-07-24 573 prev = mas_prev(&mas, 0); 4b662c6ba9aa9e Liam R. Howlett 2020-07-24 574 mas_reset(&mas); 8feae13110d60c David Howells 2009-01-08 575 /* add the VMA to the tree */ 4b662c6ba9aa9e Liam R. Howlett 2020-07-24 576 vma_mas_store(vma, &mas); ^1da177e4c3f41 Linus Torvalds 2005-04-16 577 } ^1da177e4c3f41 Linus Torvalds 2005-04-16 578 :::::: The code at line 554 was first introduced by commit :::::: 4b662c6ba9aa9ed30b302eade5a79e857fc881b4 mm: Remove rb tree. :::::: TO: Liam R. Howlett :::::: CC: Liam R. Howlett --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org