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 AC2C7C433EF for ; Sun, 24 Jul 2022 14:18:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9A2A68E0002; Sun, 24 Jul 2022 10:18:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 952268E0001; Sun, 24 Jul 2022 10:18:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 81A248E0002; Sun, 24 Jul 2022 10:18:07 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 72C7C8E0001 for ; Sun, 24 Jul 2022 10:18:07 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 36B63811F8 for ; Sun, 24 Jul 2022 14:18:07 +0000 (UTC) X-FDA: 79722197814.10.7EA23F2 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by imf23.hostedemail.com (Postfix) with ESMTP id 6190414001B for ; Sun, 24 Jul 2022 14:18:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658672286; x=1690208286; h=date:from:to:cc:subject:message-id:mime-version; bh=r25DWjiX7sbnAPxb+ZFv2bzJI+SP4JHE3swdFz26Eg8=; b=MCv/FNLaqO9ODgOJoN6qM7wTcWt64QY13dU4qwzVblWijZUiAs/uNpox zGNSVFpjw12HdydT07qz6n56K1v1cZfHA5F6SiEVVcoUwcMtlavxg6Teq t8c6ZypeEhmz3Jnj8EW3SCVZKzkdCvD+o3xyK5JldyggXNe/QCgNpfxD1 Rrdyqzv6OjoCvRRA9eBrejyvhUJNZ9XED3IGHcKFSByEvyWLrOd6bTlXz krV0ZToYY8bL8bvVV1vVmmMU0V/6ysB1AkyMLvTn2/9+tjzFuLYtzZEyQ RjEtm32KDNvDM++EaW3c7FFN9wlC3AreL4V0PfVa8o3MqhJIeQjcEylOD A==; X-IronPort-AV: E=McAfee;i="6400,9594,10418"; a="351543382" X-IronPort-AV: E=Sophos;i="5.93,190,1654585200"; d="scan'208";a="351543382" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jul 2022 07:18:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,190,1654585200"; d="scan'208";a="926591677" Received: from lkp-server01.sh.intel.com (HELO e0eace57cfef) ([10.239.97.150]) by fmsmga005.fm.intel.com with ESMTP; 24 Jul 2022 07:18:02 -0700 Received: from kbuild by e0eace57cfef with local (Exim 4.96) (envelope-from ) id 1oFcQk-0003uj-0S; Sun, 24 Jul 2022 14:18:02 +0000 Date: Sun, 24 Jul 2022 22:17:26 +0800 From: kernel test robot To: Kefeng Wang Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, Andrew Morton , Linux Memory Management List Subject: mm/percpu.c:3007:59: warning: the comparison will always evaluate as 'true' for the address of 'pglist' will never be NULL Message-ID: <202207242252.HNteQE9R-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1658672286; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=jI8n+FqMvgokZKXL4G9b9R9fn1p7M+9nNs+aFiruFgI=; b=j0p4NE3hHPVBce8EOljKEDS1GbIEcyiPgS9AMj9LjSwh1h1+7PYxtuGkmcrMe+LRR2WQOi qqMw35rt514KeqEaV8C9W/WigjWRsaX4iTdzPnWd7IYIMJxS8rCIFb4T+19hQBTA9ZfaeQ Gi4UE2r7+9L0Rq6Qm4JUeF8Vps0X0lM= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1658672286; a=rsa-sha256; cv=none; b=07g/kkwoCP3nwewch8VpcWOuBOAUIvg3DynJs0c9LFXYz+8xFYwlyrOc8kX96MiktIIXMV JqTuBI6f+4vmp44R852mgHUvAdFqov6TnglXJkyDmL3QWkV45TeWukgDyn9+exxswm0a8j 3FMh+n5COSYHFueKWINU/zbRssFoKDs= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b="MCv/FNLa"; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf23.hostedemail.com: domain of lkp@intel.com has no SPF policy when checking 134.134.136.100) smtp.mailfrom=lkp@intel.com X-Stat-Signature: 57sis531dr8cbg3ym4rz8gdaed8kbfxy X-Rspamd-Queue-Id: 6190414001B Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b="MCv/FNLa"; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf23.hostedemail.com: domain of lkp@intel.com has no SPF policy when checking 134.134.136.100) smtp.mailfrom=lkp@intel.com X-Rspam-User: X-Rspamd-Server: rspam11 X-HE-Tag: 1658672286-945479 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/torvalds/linux.git master head: 515f71412bb73ebd7f41f90e1684fc80b8730789 commit: 23f917169ef157aa7a6bf80d8c4aad6f1282852c mm: percpu: add generic pcpu_fc_alloc/free funciton date: 6 months ago config: mips-buildonly-randconfig-r003-20220724 (https://download.01.org/0day-ci/archive/20220724/202207242252.HNteQE9R-lkp@intel.com/config) compiler: mips64-linux-gcc (GCC) 12.1.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/torvalds/linux.git/commit/?id=23f917169ef157aa7a6bf80d8c4aad6f1282852c git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout 23f917169ef157aa7a6bf80d8c4aad6f1282852c # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot All warnings (new ones prefixed by >>): mm/percpu.c: In function 'pcpu_fc_alloc': >> mm/percpu.c:3007:59: warning: the comparison will always evaluate as 'true' for the address of 'pglist' will never be NULL [-Waddress] 3007 | if (node == NUMA_NO_NODE || !node_online(node) || !NODE_DATA(node)) { | ^ In file included from arch/mips/include/asm/mmzone.h:12, from include/linux/mmzone.h:1099, from include/linux/gfp.h:6, from include/linux/mm.h:10, from include/linux/memblock.h:13, from mm/percpu.c:73: arch/mips/include/asm/mach-ip27/mmzone.h:19:28: note: 'pglist' declared here 19 | struct pglist_data pglist; | ^~~~~~ vim +3007 mm/percpu.c 2995 2996 static void * __init pcpu_fc_alloc(unsigned int cpu, size_t size, size_t align, 2997 pcpu_fc_cpu_to_node_fn_t cpu_to_nd_fn) 2998 { 2999 const unsigned long goal = __pa(MAX_DMA_ADDRESS); 3000 #ifdef CONFIG_NUMA 3001 int node = NUMA_NO_NODE; 3002 void *ptr; 3003 3004 if (cpu_to_nd_fn) 3005 node = cpu_to_nd_fn(cpu); 3006 > 3007 if (node == NUMA_NO_NODE || !node_online(node) || !NODE_DATA(node)) { 3008 ptr = memblock_alloc_from(size, align, goal); 3009 pr_info("cpu %d has no node %d or node-local memory\n", 3010 cpu, node); 3011 pr_debug("per cpu data for cpu%d %zu bytes at 0x%llx\n", 3012 cpu, size, (u64)__pa(ptr)); 3013 } else { 3014 ptr = memblock_alloc_try_nid(size, align, goal, 3015 MEMBLOCK_ALLOC_ACCESSIBLE, 3016 node); 3017 3018 pr_debug("per cpu data for cpu%d %zu bytes on node%d at 0x%llx\n", 3019 cpu, size, node, (u64)__pa(ptr)); 3020 } 3021 return ptr; 3022 #else 3023 return memblock_alloc_from(size, align, goal); 3024 #endif 3025 } 3026 -- 0-DAY CI Kernel Test Service https://01.org/lkp