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 A3304C636D4 for ; Fri, 17 Feb 2023 11:51:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229952AbjBQLvh (ORCPT ); Fri, 17 Feb 2023 06:51:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229496AbjBQLvg (ORCPT ); Fri, 17 Feb 2023 06:51:36 -0500 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFC8066CF4 for ; Fri, 17 Feb 2023 03:51:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1676634673; x=1708170673; h=date:from:to:cc:subject:message-id:mime-version; bh=A81alJJI0PLU9dBLdNYxg9A5OixcuXiu7dPhCOupFeI=; b=Fp6vWE7/qHzEAPh9Ptynhkq8EX0n12zdQXPOcxU8xU/yjMa87DBkzdoa m0/lKtwAtmFSxrBplEVY4n1rO/rs3NK84CaLfH1Te5+83fv/ShGRYvx3B NX338kL4Gd6CqXNalwlMea5LZEiGrJkGyForR6e9Mfv02iSDRAIHaZeGb hZRIcYJYNY4yAquBxrtXWcZUmLQUAhiCGaE8WvJFcVdMQOVEwQqkHQRuH jrafMnYgDl9+8/6gotd8zMV4QtST0giZVqx4svGVS6zN7JwlaiZo5M3r5 ILhyxootOzoXvEVL9Rwa5lnu9s1FrWnwwoTMAq4yqr6hHA5102ePUbtg3 w==; X-IronPort-AV: E=McAfee;i="6500,9779,10623"; a="315684423" X-IronPort-AV: E=Sophos;i="5.97,304,1669104000"; d="scan'208";a="315684423" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Feb 2023 03:51:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10623"; a="794380928" X-IronPort-AV: E=Sophos;i="5.97,304,1669104000"; d="scan'208";a="794380928" Received: from lkp-server01.sh.intel.com (HELO 4455601a8d94) ([10.239.97.150]) by orsmga004.jf.intel.com with ESMTP; 17 Feb 2023 03:51:11 -0800 Received: from kbuild by 4455601a8d94 with local (Exim 4.96) (envelope-from ) id 1pSzGg-000BQ5-0p; Fri, 17 Feb 2023 11:51:10 +0000 Date: Fri, 17 Feb 2023 19:51:02 +0800 From: kernel test robot To: Arnd Bergmann Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org Subject: include/linux/build_bug.h:78:41: error: static assertion failed: "sizeof(struct gve_tx_context_cmd_dtype) == 2" Message-ID: <202302171930.LX5uf1pv-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 Arnd, FYI, the error/warning still remains. tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: ec35307e18ba8174e2a3f701956059f6a36f22fb commit: 5d6f52671e76ca2d55d74e676ac4c38ceb14a2d3 ARM: rework endianess selection date: 11 months ago config: arm-randconfig-c043-20230217 (https://download.01.org/0day-ci/archive/20230217/202302171930.LX5uf1pv-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=5d6f52671e76ca2d55d74e676ac4c38ceb14a2d3 git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout 5d6f52671e76ca2d55d74e676ac4c38ceb14a2d3 # 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 drivers/net/ethernet/google/gve/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot | Link: https://lore.kernel.org/oe-kbuild-all/202302171930.LX5uf1pv-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from include/linux/container_of.h:5, from include/linux/kernel.h:21, from include/linux/cpumask.h:10, from drivers/net/ethernet/google/gve/gve_main.c:7: >> include/linux/build_bug.h:78:41: error: static assertion failed: "sizeof(struct gve_tx_context_cmd_dtype) == 2" 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~~~~~~~~~~~ include/linux/build_bug.h:77:34: note: in expansion of macro '__static_assert' 77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr) | ^~~~~~~~~~~~~~~ drivers/net/ethernet/google/gve/gve_desc_dqo.h:68:1: note: in expansion of macro 'static_assert' 68 | static_assert(sizeof(struct gve_tx_context_cmd_dtype) == 2); | ^~~~~~~~~~~~~ >> include/linux/build_bug.h:78:41: error: static assertion failed: "sizeof(struct gve_tx_tso_context_desc_dqo) == 16" 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~~~~~~~~~~~ include/linux/build_bug.h:77:34: note: in expansion of macro '__static_assert' 77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr) | ^~~~~~~~~~~~~~~ drivers/net/ethernet/google/gve/gve_desc_dqo.h:93:1: note: in expansion of macro 'static_assert' 93 | static_assert(sizeof(struct gve_tx_tso_context_desc_dqo) == 16); | ^~~~~~~~~~~~~ >> include/linux/build_bug.h:78:41: error: static assertion failed: "sizeof(struct gve_tx_general_context_desc_dqo) == 16" 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~~~~~~~~~~~ include/linux/build_bug.h:77:34: note: in expansion of macro '__static_assert' 77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr) | ^~~~~~~~~~~~~~~ drivers/net/ethernet/google/gve/gve_desc_dqo.h:114:1: note: in expansion of macro 'static_assert' 114 | static_assert(sizeof(struct gve_tx_general_context_desc_dqo) == 16); | ^~~~~~~~~~~~~ >> include/linux/build_bug.h:78:41: error: static assertion failed: "sizeof(struct gve_tx_compl_desc) == 8" 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~~~~~~~~~~~ include/linux/build_bug.h:77:34: note: in expansion of macro '__static_assert' 77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr) | ^~~~~~~~~~~~~~~ drivers/net/ethernet/google/gve/gve_desc_dqo.h:172:1: note: in expansion of macro 'static_assert' 172 | static_assert(sizeof(struct gve_tx_compl_desc) == 8); | ^~~~~~~~~~~~~ >> include/linux/build_bug.h:78:41: error: static assertion failed: "sizeof(struct gve_rx_compl_desc_dqo) == 32" 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~~~~~~~~~~~ include/linux/build_bug.h:77:34: note: in expansion of macro '__static_assert' 77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr) | ^~~~~~~~~~~~~~~ drivers/net/ethernet/google/gve/gve_desc_dqo.h:248:1: note: in expansion of macro 'static_assert' 248 | static_assert(sizeof(struct gve_rx_compl_desc_dqo) == 32); | ^~~~~~~~~~~~~ vim +78 include/linux/build_bug.h bc6245e5efd70c Ian Abbott 2017-07-10 60 6bab69c65013be Rasmus Villemoes 2019-03-07 61 /** 6bab69c65013be Rasmus Villemoes 2019-03-07 62 * static_assert - check integer constant expression at build time 6bab69c65013be Rasmus Villemoes 2019-03-07 63 * 6bab69c65013be Rasmus Villemoes 2019-03-07 64 * static_assert() is a wrapper for the C11 _Static_assert, with a 6bab69c65013be Rasmus Villemoes 2019-03-07 65 * little macro magic to make the message optional (defaulting to the 6bab69c65013be Rasmus Villemoes 2019-03-07 66 * stringification of the tested expression). 6bab69c65013be Rasmus Villemoes 2019-03-07 67 * 6bab69c65013be Rasmus Villemoes 2019-03-07 68 * Contrary to BUILD_BUG_ON(), static_assert() can be used at global 6bab69c65013be Rasmus Villemoes 2019-03-07 69 * scope, but requires the expression to be an integer constant 6bab69c65013be Rasmus Villemoes 2019-03-07 70 * expression (i.e., it is not enough that __builtin_constant_p() is 6bab69c65013be Rasmus Villemoes 2019-03-07 71 * true for expr). 6bab69c65013be Rasmus Villemoes 2019-03-07 72 * 6bab69c65013be Rasmus Villemoes 2019-03-07 73 * Also note that BUILD_BUG_ON() fails the build if the condition is 6bab69c65013be Rasmus Villemoes 2019-03-07 74 * true, while static_assert() fails the build if the expression is 6bab69c65013be Rasmus Villemoes 2019-03-07 75 * false. 6bab69c65013be Rasmus Villemoes 2019-03-07 76 */ 6bab69c65013be Rasmus Villemoes 2019-03-07 77 #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr) 6bab69c65013be Rasmus Villemoes 2019-03-07 @78 #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) 6bab69c65013be Rasmus Villemoes 2019-03-07 79 :::::: The code at line 78 was first introduced by commit :::::: 6bab69c65013bed5fce9f101a64a84d0385b3946 build_bug.h: add wrapper for _Static_assert :::::: TO: Rasmus Villemoes :::::: CC: Linus Torvalds -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests