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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 08A69C7619A for ; Tue, 11 Apr 2023 04:45:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229952AbjDKEpD (ORCPT ); Tue, 11 Apr 2023 00:45:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229507AbjDKEpB (ORCPT ); Tue, 11 Apr 2023 00:45:01 -0400 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31B5E1981 for ; Mon, 10 Apr 2023 21:44:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681188296; x=1712724296; h=date:from:to:cc:subject:message-id:mime-version; bh=+Gl4SVIhkfj8kJslAGlVgcDUjOI5gzVDo6kVMfhtPgw=; b=hAYyaBaCm8OjJOk42TjUjUh7dae0pQezBIKvLexdIuGrV1JFnkjyekYK 69d8vkE14Ujt4xkBkcj5igkGg8wmJ81AaLAqpLwstuqihFYSVyPvoS8+X /bm+r1ZeFewvCbew2VnYq+r+WOjGmqIKMvnqjukpkkRsqQM2uCwSjZph2 hnOndMe1iaC3DAU2AkA/PToa2xYf1UcShZK3mrCkJSNNUtS9WErVAZ3Fb DGeg9FNsHqY/46lJ+FphMu7P0Rx7xVsPf2RU8sHigm2GqAw4u7XBzhug+ BUvcXTCtr7yzQh8FNotzbgOZv96MZtLpmjj7fV997IE2xwKEyqXnHSUBx w==; X-IronPort-AV: E=McAfee;i="6600,9927,10676"; a="323884769" X-IronPort-AV: E=Sophos;i="5.98,335,1673942400"; d="scan'208";a="323884769" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Apr 2023 21:44:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10676"; a="718827282" X-IronPort-AV: E=Sophos;i="5.98,335,1673942400"; d="scan'208";a="718827282" Received: from lkp-server01.sh.intel.com (HELO b613635ddfff) ([10.239.97.150]) by orsmga008.jf.intel.com with ESMTP; 10 Apr 2023 21:44:53 -0700 Received: from kbuild by b613635ddfff with local (Exim 4.96) (envelope-from ) id 1pm5sC-000VwT-2m; Tue, 11 Apr 2023 04:44:52 +0000 Date: Tue, 11 Apr 2023 12:43:59 +0800 From: kernel test robot To: Will Deacon Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org Subject: include/linux/compiler_types.h:338:45: error: call to '__compiletime_assert_574' declared with attribute error: must increase SMC_WR_BUF_SIZE to at least sizeof(struct smc_llc_msg) Message-ID: <202304111219.o7vdKZKt-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Will, FYI, the error/warning still remains. tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 0d3eb744aed40ffce820cded61d7eac515199165 commit: eb5c2d4b45e3d2d5d052ea6b8f1463976b1020d5 compiler.h: Move compiletime_assert() macros into compiler_types.h date: 2 years, 9 months ago config: arm-randconfig-r012-20230411 (https://download.01.org/0day-ci/archive/20230411/202304111219.o7vdKZKt-lkp@intel.com/config) compiler: arm-linux-gnueabi-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=eb5c2d4b45e3d2d5d052ea6b8f1463976b1020d5 git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout eb5c2d4b45e3d2d5d052ea6b8f1463976b1020d5 # 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=arm olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash net/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot | Link: https://lore.kernel.org/oe-kbuild-all/202304111219.o7vdKZKt-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from include/linux/gfp.h:6, from include/linux/mm.h:10, from include/linux/bvec.h:13, from include/linux/skbuff.h:17, from include/linux/tcp.h:17, from include/net/tcp.h:20, from net/smc/smc_llc.c:13: include/linux/mmzone.h: In function '__nr_to_section': include/linux/mmzone.h:1213:13: warning: the comparison will always evaluate as 'true' for the address of 'mem_section' will never be NULL [-Waddress] 1213 | if (!mem_section[SECTION_NR_TO_ROOT(nr)]) | ^ include/linux/mmzone.h:1199:27: note: 'mem_section' declared here 1199 | extern struct mem_section mem_section[NR_SECTION_ROOTS][SECTIONS_PER_ROOT]; | ^~~~~~~~~~~ In file included from : net/smc/smc_llc.c: In function 'smc_llc_add_pending_send': >> include/linux/compiler_types.h:338:45: error: call to '__compiletime_assert_574' declared with attribute error: must increase SMC_WR_BUF_SIZE to at least sizeof(struct smc_llc_msg) 338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^ include/linux/compiler_types.h:319:25: note: in definition of macro '__compiletime_assert' 319 | prefix ## suffix(); \ | ^~~~~~ include/linux/compiler_types.h:338:9: note: in expansion of macro '_compiletime_assert' 338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert' 39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) | ^~~~~~~~~~~~~~~~~~ net/smc/smc_llc.c:348:9: note: in expansion of macro 'BUILD_BUG_ON_MSG' 348 | BUILD_BUG_ON_MSG( | ^~~~~~~~~~~~~~~~ >> include/linux/compiler_types.h:338:45: error: call to '__compiletime_assert_575' declared with attribute error: must adapt SMC_WR_TX_SIZE to sizeof(struct smc_llc_msg); if not all smc_wr upper layer protocols use the same message size any more, must start to set link->wr_tx_sges[i].length on each individual smc_wr_tx_send() 338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^ include/linux/compiler_types.h:319:25: note: in definition of macro '__compiletime_assert' 319 | prefix ## suffix(); \ | ^~~~~~ include/linux/compiler_types.h:338:9: note: in expansion of macro '_compiletime_assert' 338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert' 39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) | ^~~~~~~~~~~~~~~~~~ net/smc/smc_llc.c:351:9: note: in expansion of macro 'BUILD_BUG_ON_MSG' 351 | BUILD_BUG_ON_MSG( | ^~~~~~~~~~~~~~~~ In function 'smc_llc_send_message_wait', inlined from 'smc_llc_send_link_delete_all' at net/smc/smc_llc.c:1263:8: net/smc/smc_llc.c:577:9: warning: 'memcpy' reading 60 bytes from a region of size 48 [-Wstringop-overread] 577 | memcpy(wr_buf, llcbuf, sizeof(union smc_llc_msg)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ net/smc/smc_llc.c: In function 'smc_llc_send_link_delete_all': net/smc/smc_llc.c:1250:37: note: source object 'delllc' of size 48 1250 | struct smc_llc_msg_del_link delllc = {0}; | ^~~~~~ -- In file included from include/linux/gfp.h:6, from include/linux/slab.h:15, from include/linux/crypto.h:19, from include/crypto/hash.h:11, from include/linux/uio.h:10, from include/linux/socket.h:8, from net/smc/smc.h:14, from net/smc/smc_cdc.c:15: include/linux/mmzone.h: In function '__nr_to_section': include/linux/mmzone.h:1213:13: warning: the comparison will always evaluate as 'true' for the address of 'mem_section' will never be NULL [-Waddress] 1213 | if (!mem_section[SECTION_NR_TO_ROOT(nr)]) | ^ include/linux/mmzone.h:1199:27: note: 'mem_section' declared here 1199 | extern struct mem_section mem_section[NR_SECTION_ROOTS][SECTIONS_PER_ROOT]; | ^~~~~~~~~~~ In file included from : In function 'smc_cdc_add_pending_send', inlined from 'smc_cdc_msg_send' at net/smc/smc_cdc.c:101:2: >> include/linux/compiler_types.h:338:45: error: call to '__compiletime_assert_544' declared with attribute error: must increase SMC_WR_BUF_SIZE to at least sizeof(struct smc_cdc_msg) 338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^ include/linux/compiler_types.h:319:25: note: in definition of macro '__compiletime_assert' 319 | prefix ## suffix(); \ | ^~~~~~ include/linux/compiler_types.h:338:9: note: in expansion of macro '_compiletime_assert' 338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert' 39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) | ^~~~~~~~~~~~~~~~~~ net/smc/smc_cdc.c:78:9: note: in expansion of macro 'BUILD_BUG_ON_MSG' 78 | BUILD_BUG_ON_MSG( | ^~~~~~~~~~~~~~~~ >> include/linux/compiler_types.h:338:45: error: call to '__compiletime_assert_545' declared with attribute error: must adapt SMC_WR_TX_SIZE to sizeof(struct smc_cdc_msg); if not all smc_wr upper layer protocols use the same message size any more, must start to set link->wr_tx_sges[i].length on each individual smc_wr_tx_send() 338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^ include/linux/compiler_types.h:319:25: note: in definition of macro '__compiletime_assert' 319 | prefix ## suffix(); \ | ^~~~~~ include/linux/compiler_types.h:338:9: note: in expansion of macro '_compiletime_assert' 338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert' 39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) | ^~~~~~~~~~~~~~~~~~ net/smc/smc_cdc.c:81:9: note: in expansion of macro 'BUILD_BUG_ON_MSG' 81 | BUILD_BUG_ON_MSG( | ^~~~~~~~~~~~~~~~ vim +/__compiletime_assert_574 +338 include/linux/compiler_types.h 324 325 #define _compiletime_assert(condition, msg, prefix, suffix) \ 326 __compiletime_assert(condition, msg, prefix, suffix) 327 328 /** 329 * compiletime_assert - break build and emit msg if condition is false 330 * @condition: a compile-time constant condition to check 331 * @msg: a message to emit if condition is false 332 * 333 * In tradition of POSIX assert, this macro will break the build if the 334 * supplied condition is *false*, emitting the supplied error message if the 335 * compiler has support to do so. 336 */ 337 #define compiletime_assert(condition, msg) \ > 338 _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) 339 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests