From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (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 BBD687C for ; Tue, 7 Jun 2022 01:45:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654566338; x=1686102338; h=date:from:to:cc:subject:message-id:mime-version; bh=BbWNEmTuA3m/B0fxmtGWuMlNcAj9/XfKtOSeLCdOV/U=; b=kmKpdpMaWLIcYMI4ic8hCBH5blHlKpvQlDpviV/GBrvwmgKjNPC8HoHD WbtEMLa+d0Ge/HdNSAD50UL2EHbdDS/XqO4wMpdiog9vXuxE0M7Aeg4D6 BUGMNpWZ0/2QRf/oB/NVOy3tI6nbc6jTCNDSrPqsYocEEexYpHlbbuXnB uYHWblBh8wn1pUzSNX3jRWph6GMD0WIfMUBXJAnRT56eSK056CuDV2CS7 sK7fFWfuHvYCCKZybhiMR9PSBPEHiqHwkimvDzt556fubvM6ULKYHhr8T 2ejWm70xGBKrYIOev7C0PWGHFjlizemoojK6C1ic77qNVTR1BYjVPsodV Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10370"; a="264899930" X-IronPort-AV: E=Sophos;i="5.91,282,1647327600"; d="scan'208";a="264899930" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jun 2022 18:45:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,282,1647327600"; d="scan'208";a="532409322" Received: from lkp-server01.sh.intel.com (HELO 60dabacc1df6) ([10.239.97.150]) by orsmga003.jf.intel.com with ESMTP; 06 Jun 2022 18:45:36 -0700 Received: from kbuild by 60dabacc1df6 with local (Exim 4.95) (envelope-from ) id 1nyOHo-000DDW-0Q; Tue, 07 Jun 2022 01:45:36 +0000 Date: Tue, 7 Jun 2022 09:44:51 +0800 From: kernel test robot To: Yury Norov Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org, linux-kernel@vger.kernel.org Subject: [norov:cpumask 1/2] include/linux/cpumask.h:378:15: warning: attribute declaration must precede definition Message-ID: <202206070900.yXiDTt2L-lkp@intel.com> Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline tree: https://github.com/norov/linux cpumask head: baf4c0c7943ff03b66ab7c18550df9071b5ba097 commit: 4fb0cdef75eb28ca37159b5c208ef574d6ccba98 [1/2] move cpumask config: powerpc-buildonly-randconfig-r003-20220605 (https://download.01.org/0day-ci/archive/20220607/202206070900.yXiDTt2L-lkp@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project b92436efcb7813fc481b30f2593a4907568d917a) 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 powerpc cross compiling tool for clang build # apt-get install binutils-powerpc-linux-gnu # https://github.com/norov/linux/commit/4fb0cdef75eb28ca37159b5c208ef574d6ccba98 git remote add norov https://github.com/norov/linux git fetch --no-tags norov cpumask git checkout 4fb0cdef75eb28ca37159b5c208ef574d6ccba98 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=powerpc prepare If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot All warnings (new ones prefixed by >>): In file included from arch/powerpc/kernel/asm-offsets.c:12: In file included from include/linux/compat.h:14: In file included from include/linux/sem.h:5: In file included from include/uapi/linux/sem.h:5: In file included from include/linux/ipc.h:5: In file included from include/linux/spinlock.h:62: In file included from include/linux/lockdep.h:14: In file included from include/linux/smp.h:13: >> include/linux/cpumask.h:378:15: warning: attribute declaration must precede definition [-Wignored-attributes] static inline __pure ^ include/linux/compiler_attributes.h:308:56: note: expanded from macro '__pure' #define __pure __attribute__((__pure__)) ^ include/linux/cpumask.h:168:28: note: previous definition is here static inline unsigned int cpumask_any_but(const struct cpumask *mask, ^ include/linux/cpumask.h:379:14: error: redefinition of 'cpumask_any_but' unsigned int cpumask_any_but(const struct cpumask *mask, unsigned int cpu) ^ include/linux/cpumask.h:168:28: note: previous definition is here static inline unsigned int cpumask_any_but(const struct cpumask *mask, ^ In file included from arch/powerpc/kernel/asm-offsets.c:12: In file included from include/linux/compat.h:17: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:97:11: warning: array index 3 is past the end of the array (which contains 2 elements) [-Warray-bounds] return (set->sig[3] | set->sig[2] | ^ ~ arch/powerpc/include/uapi/asm/signal.h:18:2: note: array 'sig' declared here unsigned long sig[_NSIG_WORDS]; ^ In file included from arch/powerpc/kernel/asm-offsets.c:12: In file included from include/linux/compat.h:17: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:97:25: warning: array index 2 is past the end of the array (which contains 2 elements) [-Warray-bounds] return (set->sig[3] | set->sig[2] | ^ ~ arch/powerpc/include/uapi/asm/signal.h:18:2: note: array 'sig' declared here unsigned long sig[_NSIG_WORDS]; ^ In file included from arch/powerpc/kernel/asm-offsets.c:12: In file included from include/linux/compat.h:17: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:113:11: warning: array index 3 is past the end of the array (which contains 2 elements) [-Warray-bounds] return (set1->sig[3] == set2->sig[3]) && ^ ~ arch/powerpc/include/uapi/asm/signal.h:18:2: note: array 'sig' declared here unsigned long sig[_NSIG_WORDS]; ^ In file included from arch/powerpc/kernel/asm-offsets.c:12: In file included from include/linux/compat.h:17: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:113:27: warning: array index 3 is past the end of the array (which contains 2 elements) [-Warray-bounds] return (set1->sig[3] == set2->sig[3]) && ^ ~ arch/powerpc/include/uapi/asm/signal.h:18:2: note: array 'sig' declared here unsigned long sig[_NSIG_WORDS]; ^ In file included from arch/powerpc/kernel/asm-offsets.c:12: In file included from include/linux/compat.h:17: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:114:5: warning: array index 2 is past the end of the array (which contains 2 elements) [-Warray-bounds] (set1->sig[2] == set2->sig[2]) && ^ ~ arch/powerpc/include/uapi/asm/signal.h:18:2: note: array 'sig' declared here unsigned long sig[_NSIG_WORDS]; ^ In file included from arch/powerpc/kernel/asm-offsets.c:12: In file included from include/linux/compat.h:17: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:114:21: warning: array index 2 is past the end of the array (which contains 2 elements) [-Warray-bounds] (set1->sig[2] == set2->sig[2]) && ^ ~ arch/powerpc/include/uapi/asm/signal.h:18:2: note: array 'sig' declared here unsigned long sig[_NSIG_WORDS]; ^ In file included from arch/powerpc/kernel/asm-offsets.c:12: In file included from include/linux/compat.h:17: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:156:1: warning: array index 3 is past the end of the array (which contains 2 elements) [-Warray-bounds] _SIG_SET_BINOP(sigorsets, _sig_or) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/signal.h:137:8: note: expanded from macro '_SIG_SET_BINOP' a3 = a->sig[3]; a2 = a->sig[2]; \ ^ ~ arch/powerpc/include/uapi/asm/signal.h:18:2: note: array 'sig' declared here unsigned long sig[_NSIG_WORDS]; vim +378 include/linux/cpumask.h 369 370 /** 371 * cpumask_any_but - return a "random" in a cpumask, but not this one. 372 * @mask: the cpumask to search 373 * @cpu: the cpu to ignore. 374 * 375 * Often used to find any cpu but smp_processor_id() in a mask. 376 * Returns >= nr_cpu_ids if no cpus set. 377 */ > 378 static inline __pure 379 unsigned int cpumask_any_but(const struct cpumask *mask, unsigned int cpu) 380 { 381 unsigned int i; 382 383 cpumask_check(cpu); 384 for_each_cpu(i, mask) 385 if (i != cpu) 386 break; 387 return i; 388 } 389 -- 0-DAY CI Kernel Test Service https://01.org/lkp