Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp520879rdh; Wed, 14 Feb 2024 04:10:02 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXR9Sfq5WigQhY5VRFr1SPOn2Jt+h8BJv8VyuG1tTgy64+RpH/B/RJrvF18/OAcM/r3H6wP42t8G/3cUleDTHTHPOi/4mqWfM13FMs7sA== X-Google-Smtp-Source: AGHT+IFvxr5lclMUCVxm7uIWn3umTmu7S2CzPcOUf8oSD0X5vU84dbApf8fUd7HcOXcvgltPHBp7 X-Received: by 2002:a17:907:11dd:b0:a38:99ae:da8b with SMTP id va29-20020a17090711dd00b00a3899aeda8bmr1675974ejb.56.1707912602482; Wed, 14 Feb 2024 04:10:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707912602; cv=pass; d=google.com; s=arc-20160816; b=yJtXJTDq+m9ECrM8Btk9ahsRBAq1zvFHoi0DuK/DPkHTDdNxZOVkaL4+P2DyhoAtNa rkdoleFNmgZGUcF37bk11ZyoWGft4G5+gVnVQ6qVeFqZCv6i3cBSUw+XZ7vMuBJ9cosv miu4edXKctG/N+X0He30ETloNuUXh4momfR73o0w+Kc84y4BjBVFR/juSzhufKd/Pf+E RmVY0llveifgHVHfD+/tHUuY9KWXuwbsg0Ypo/8a5ELMjh4K3CHtpG+x481G6DAVuZCD zUwqK2bpMgK2dxkpoY1kIZ74lh3aVzu8tq8PjVU/31Z8rpLt+xBtkLxK61Sjfx2eUZCg DX0Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:subject:cc:to:from:date :dkim-signature; bh=OPvt+iflso7YfIiTCgw/EGFu25zTc9nqIWyEqKrXSPg=; fh=mYHzWYDYLHu2xcixmTJASI/xFGIMc+jM2vawAkJ7Nr4=; b=i3cVPw5iO+0b8ymCCjv37k7MhdEJp/wUT+Mpx4cSsrbwv46IyTu3Qem3JSZBxACZQU kXgeVO7oHKAQmspulmjFn8Lx/SwhlnM6rDFD6WS5G2EvzzTf6o71RdI3djdMpSti/KT2 +6WggRRcWgS6mHLzFYqzUGqsoE+Vadx9N6KZftgeltMpuWAzR1tVap2XjOeQEYwzy+7s NraFlQ/d4p5/lqJ5hnN/GL2IhKNtOa9PFX/jB9mmX/UgktouqzuHto+5x71U9+mo6EzS bhXXRv7RS7VZgxAmVPGZ2kouFsS+fz84KWrfA5/zhCseyujtGIfPF6AG5DREjfM1JncS 4NDA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=MuxlAnTp; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-65175-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65175-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=2; AJvYcCUaeu3SwyP0MhetWxHXnvJL5UFBPqCJMOmerwc+lb+Zfe1ydTJEgL5eyojZznm9YCl616YeRYc2+y8M6jJydLiDWQ/V9lW9pjSARMUUyg== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id oz6-20020a170906cd0600b00a3d198369besi1173808ejb.509.2024.02.14.04.10.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 04:10:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-65175-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=MuxlAnTp; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-65175-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65175-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id E96F41F24C53 for ; Wed, 14 Feb 2024 12:10:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4CC1F1B813; Wed, 14 Feb 2024 12:09:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="MuxlAnTp" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 522E6199BE for ; Wed, 14 Feb 2024 12:09:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.8 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707912594; cv=none; b=oLMbJWZAfGqYgnY9PEfGH90hD5uhadCdHOgV35I3TuQgMVNcRhud8NXwT1b8NC8vO3Y5lwXHQubDT0JSqr2VK3/pbmpMIGMA0+ko6Jd4WXKvkzT1cNl+vZZ+1m0nyAzXt0rfi6pYKBIYM26g90VsFTncGZNcSaYKOp5zZK6/jS8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707912594; c=relaxed/simple; bh=phbKthtZ1sVqCSWncrebUVU0hamw/lbY4c1dCVvHvck=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=pl2s8kxHwIhYI+JiKZPdN+W8n5ULDQ+K7QPpSNcEy6rCclGKZtogWqNDbl21lPlOgKus4Dqu5WQ2DuTRP7Ezixp1hL9wUWD7VTTh0goY2FvJ/D+uX9L1mEq9SV2ZrLywvpuDKe+VL4n/n5bO5qhpduSwHffHmtXnuEVRFP0qWZI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=MuxlAnTp; arc=none smtp.client-ip=192.198.163.8 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707912592; x=1739448592; h=date:from:to:cc:subject:message-id:mime-version; bh=phbKthtZ1sVqCSWncrebUVU0hamw/lbY4c1dCVvHvck=; b=MuxlAnTpK+eSfETMMIQHpZsNwzmszCWkLvO7AZWwAGsHTP0Ywh/QufaN Sq/S7hGJ6yCK3Dgk9Kvi6JdrjLbt9FIVyXyjoVoQZo33zUIkTyeqlIEEv Xidkl/lGGNo7N71mWZy9ErooKVMzZti3i9VDdSZEX2ow76pqx6wR/sAz2 5nH+yGa4f7V9MzEvl6uLwPq44TzwMHHzsKi9+J909AbZY4mZSP+e7GDga cTuI4DobNIuxuBG0/3VQgo9Qm2+TS6M7SLJyag5XuTF7iIXrzevhedY3M MVx0pOL/s1WUyC8tUTumOiPOsCDzzkhDmw7jC8aPyaX3D7ueryafFNq5S Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10982"; a="19463474" X-IronPort-AV: E=Sophos;i="6.06,159,1705392000"; d="scan'208";a="19463474" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Feb 2024 04:09:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,159,1705392000"; d="scan'208";a="3523964" Received: from lkp-server01.sh.intel.com (HELO 01f0647817ea) ([10.239.97.150]) by orviesa006.jf.intel.com with ESMTP; 14 Feb 2024 04:09:50 -0800 Received: from kbuild by 01f0647817ea with local (Exim 4.96) (envelope-from ) id 1raE5D-0008kI-2J; Wed, 14 Feb 2024 12:09:47 +0000 Date: Wed, 14 Feb 2024 20:09:22 +0800 From: kernel test robot To: Alexandre Ghiti Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org, Palmer Dabbelt Subject: include/linux/hugetlb.h:916:20: error: static declaration of 'arch_hugetlb_migration_supported' follows non-static declaration Message-ID: <202402142035.Aq7hibAu-lkp@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 7e90b5c295ec1e47c8ad865429f046970c549a66 commit: ce68c035457bdd025a9961e0ba2157323090c581 riscv: Fix arch_hugetlb_migration_supported() for NAPOT date: 7 days ago config: riscv-randconfig-r064-20240214 (https://download.01.org/0day-ci/archive/20240214/202402142035.Aq7hibAu-lkp@intel.com/config) compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project c08b90c50bcac9f3f563c79491c8dbcbe7c3b574) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240214/202402142035.Aq7hibAu-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 | Closes: https://lore.kernel.org/oe-kbuild-all/202402142035.Aq7hibAu-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from kernel/fork.c:52: >> include/linux/hugetlb.h:916:20: error: static declaration of 'arch_hugetlb_migration_supported' follows non-static declaration 916 | static inline bool arch_hugetlb_migration_supported(struct hstate *h) | ^ arch/riscv/include/asm/hugetlb.h:15:42: note: expanded from macro 'arch_hugetlb_migration_supported' 15 | #define arch_hugetlb_migration_supported arch_hugetlb_migration_supported | ^ arch/riscv/include/asm/hugetlb.h:14:6: note: previous declaration is here 14 | bool arch_hugetlb_migration_supported(struct hstate *h); | ^ 1 error generated. -- In file included from kernel/sysctl.c:45: >> include/linux/hugetlb.h:916:20: error: static declaration of 'arch_hugetlb_migration_supported' follows non-static declaration 916 | static inline bool arch_hugetlb_migration_supported(struct hstate *h) | ^ arch/riscv/include/asm/hugetlb.h:15:42: note: expanded from macro 'arch_hugetlb_migration_supported' 15 | #define arch_hugetlb_migration_supported arch_hugetlb_migration_supported | ^ arch/riscv/include/asm/hugetlb.h:14:6: note: previous declaration is here 14 | bool arch_hugetlb_migration_supported(struct hstate *h); | ^ In file included from kernel/sysctl.c:53: In file included from include/linux/nfs_fs.h:31: In file included from include/linux/sunrpc/auth.h:13: In file included from include/linux/sunrpc/sched.h:19: include/linux/sunrpc/xdr.h:782:46: warning: result of comparison of constant 4611686018427387903 with expression of type '__u32' (aka 'unsigned int') is always false [-Wtautological-constant-out-of-range-compare] 782 | if (U32_MAX >= SIZE_MAX / sizeof(*p) && len > SIZE_MAX / sizeof(*p)) | ~~~ ^ ~~~~~~~~~~~~~~~~~~~~~ 1 warning and 1 error generated. -- In file included from kernel/events/core.c:31: >> include/linux/hugetlb.h:916:20: error: static declaration of 'arch_hugetlb_migration_supported' follows non-static declaration 916 | static inline bool arch_hugetlb_migration_supported(struct hstate *h) | ^ arch/riscv/include/asm/hugetlb.h:15:42: note: expanded from macro 'arch_hugetlb_migration_supported' 15 | #define arch_hugetlb_migration_supported arch_hugetlb_migration_supported | ^ arch/riscv/include/asm/hugetlb.h:14:6: note: previous declaration is here 14 | bool arch_hugetlb_migration_supported(struct hstate *h); | ^ In file included from kernel/events/core.c:43: include/linux/mman.h:158:9: warning: division by zero is undefined [-Wdivision-by-zero] 158 | _calc_vm_trans(flags, MAP_SYNC, VM_SYNC ) | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/mman.h:136:21: note: expanded from macro '_calc_vm_trans' 136 | : ((x) & (bit1)) / ((bit1) / (bit2)))) | ^ ~~~~~~~~~~~~~~~~~ 1 warning and 1 error generated. vim +/arch_hugetlb_migration_supported +916 include/linux/hugetlb.h 161df60e9e8965 Naoya Horiguchi 2022-07-14 902 c177c81e09e517 Naoya Horiguchi 2014-06-04 903 #ifdef CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION e693de186414ae Anshuman Khandual 2019-03-05 904 #ifndef arch_hugetlb_migration_supported e693de186414ae Anshuman Khandual 2019-03-05 905 static inline bool arch_hugetlb_migration_supported(struct hstate *h) e693de186414ae Anshuman Khandual 2019-03-05 906 { 94310cbcaa3c2b Anshuman Khandual 2017-07-06 907 if ((huge_page_shift(h) == PMD_SHIFT) || 9b553bf5eb99dd Anshuman Khandual 2019-03-05 908 (huge_page_shift(h) == PUD_SHIFT) || 94310cbcaa3c2b Anshuman Khandual 2017-07-06 909 (huge_page_shift(h) == PGDIR_SHIFT)) 94310cbcaa3c2b Anshuman Khandual 2017-07-06 910 return true; 94310cbcaa3c2b Anshuman Khandual 2017-07-06 911 else 94310cbcaa3c2b Anshuman Khandual 2017-07-06 912 return false; e693de186414ae Anshuman Khandual 2019-03-05 913 } e693de186414ae Anshuman Khandual 2019-03-05 914 #endif c177c81e09e517 Naoya Horiguchi 2014-06-04 915 #else e693de186414ae Anshuman Khandual 2019-03-05 @916 static inline bool arch_hugetlb_migration_supported(struct hstate *h) e693de186414ae Anshuman Khandual 2019-03-05 917 { d70c17d436b3fb Chen Gang 2016-05-20 918 return false; e693de186414ae Anshuman Khandual 2019-03-05 919 } c177c81e09e517 Naoya Horiguchi 2014-06-04 920 #endif e693de186414ae Anshuman Khandual 2019-03-05 921 :::::: The code at line 916 was first introduced by commit :::::: e693de186414ae66f2a316ff9befcd2b7a6d07b6 mm/hugetlb: enable arch specific huge page size support for migration :::::: TO: Anshuman Khandual :::::: CC: Linus Torvalds -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki