Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1833693pxj; Wed, 19 May 2021 15:17:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+6OD7s0azt3y8bgQpinlbttHAyUa57ymMc3ES9axZWIwT8L0kSw8bfE9ynbKyTr5SRgzs X-Received: by 2002:a05:6638:1928:: with SMTP id p40mr1892293jal.22.1621462632514; Wed, 19 May 2021 15:17:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621462632; cv=none; d=google.com; s=arc-20160816; b=aWpuOSwPsNqTXlX62qfV28nBIKpQ+kg/kxv46xFfZHfFHhxUe07QWXTJ8Gx5gaB1r7 1tMe88xh6WIe+EbQ4909NEtCUxtksNd3Gn4mqyanLBXRG0YqLL0Cwrqoo9lYscpA4KD4 kWtnoZlizEYyY36wc2D9fPesdUQvO8p7+QoRtOj069641Fq1Qcwji1qMzAYltFElPJry U5dbLuKRO2u8yC/0Imf6NhVRWzNR7wLJc4jYmuWeztBKzihMpuLlbM2B5jGkWiBlcebM rHm05G38eQt4XkSZGgh1TgvicR2QxyWZazPSmXSJj07rT2umsFDhjK/Q25FcibfUKGbd 4mSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=l8z+TH5rJXJ5nRSOxZjbEA4s5yvK09lnGjZRgDTR7vs=; b=Axwws/+/8NUIhpEjdKWX9nf6hbaA4JkagEnmHty4Tgm6tgl4y8ontQhieNk/TFaTZK xGVk8y4jb7Hxgu2hRCO+jBPhsbkWr46I42lDuww5Uk+AtWpSMRHnQrdgqFptoec1E820 KorQqHaYJSQhhb8ktAYegDgsls8hWpSnRKPJn6u5yv7BzKwYtZy+Ie/ZRvSS8cwuVakP /NLF2C09/c4ateFYjx88VEePDjsLmy7EbLXuoM+RP5HDPdbT2jVkuDJbi9mdhRT7OPc4 N9+Q1qIWvkyJzywgWYGcsU+Ph6tzYGNAjkZKbKOlaoMwE4J5jWLBD8tJOuhTGSSf8RQz 0Q9A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z13si595917ioj.76.2021.05.19.15.16.58; Wed, 19 May 2021 15:17:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229689AbhESWRo convert rfc822-to-8bit (ORCPT + 99 others); Wed, 19 May 2021 18:17:44 -0400 Received: from mga06.intel.com ([134.134.136.31]:21564 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229455AbhESWRo (ORCPT ); Wed, 19 May 2021 18:17:44 -0400 IronPort-SDR: Uojl7CT7dYn5g84JACOtoyh2CEzv9BPdHJf9SwTbzKsWNN+ScO68QrpO/H/t+KtGYYBu4N5Cip 937DHNOVOZNA== X-IronPort-AV: E=McAfee;i="6200,9189,9989"; a="262316163" X-IronPort-AV: E=Sophos;i="5.82,313,1613462400"; d="scan'208";a="262316163" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2021 15:16:01 -0700 IronPort-SDR: ATK5oUX/UmPtyN8L/+uGComviQx7UsAFoJIAM8/RR/5LaOLRTS9z6ZLJ+L+7o16LljT/UTYepc /BRJTfkCnfTA== X-IronPort-AV: E=Sophos;i="5.82,313,1613462400"; d="scan'208";a="473696521" Received: from jbrandeb-mobl4.amr.corp.intel.com (HELO localhost) ([10.212.165.64]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2021 15:16:01 -0700 Date: Wed, 19 May 2021 15:16:00 -0700 From: Jesse Brandeburg To: Geert Uytterhoeven Cc: Qi Zhang , Tony Nguyen , Yahui Cao , Beilei Xing , "Simei Su" , Jeff Guo , "David S . Miller" , Jakub Kicinski , , , , kernel test robot Subject: Re: [PATCH] virtchnl: Add missing padding to virtchnl_proto_hdrs Message-ID: <20210519151600.00006065@intel.com> In-Reply-To: <20210519194350.1854798-1-geert@linux-m68k.org> References: <20210519194350.1854798-1-geert@linux-m68k.org> X-Mailer: Claws Mail 3.12.0 (GTK+ 2.24.28; i686-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Geert Uytterhoeven wrote: > On m68k (Coldfire M547x): > > CC drivers/net/ethernet/intel/i40e/i40e_main.o > In file included from drivers/net/ethernet/intel/i40e/i40e_prototype.h:9, > from drivers/net/ethernet/intel/i40e/i40e.h:41, > from drivers/net/ethernet/intel/i40e/i40e_main.c:12: > include/linux/avf/virtchnl.h:153:36: warning: division by zero [-Wdiv-by-zero] > 153 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) } > | ^ > include/linux/avf/virtchnl.h:844:1: note: in expansion of macro ‘VIRTCHNL_CHECK_STRUCT_LEN’ > 844 | VIRTCHNL_CHECK_STRUCT_LEN(2312, virtchnl_proto_hdrs); > | ^~~~~~~~~~~~~~~~~~~~~~~~~ > include/linux/avf/virtchnl.h:844:33: error: enumerator value for ‘virtchnl_static_assert_virtchnl_proto_hdrs’ is not an integer constant > 844 | VIRTCHNL_CHECK_STRUCT_LEN(2312, virtchnl_proto_hdrs); > | ^~~~~~~~~~~~~~~~~~~ > > On m68k, integers are aligned on addresses that are multiples of two, > not four, bytes. Hence the size of a structure containing integers may > not be divisible by 4. > > Fix this by adding explicit padding. Thanks Geert, I checked and x86_64 adds this padding anyway, so doesn't result in any functional changes AFAICS. In any case, this is more correct for a structure that is part of an API (no implicit padding!) BTW. the patch subject is a little wrong, should have been [PATCH net] But I think Tony can take care of that when sending to netdev list, unless you want to send a v2. > Fixes: 1f7ea1cd6a374842 ("ice: Enable FDIR Configure for AVF") > Reported-by: kernel test robot > Signed-off-by: Geert Uytterhoeven > --- > Compile-tested only. Acked-by: Jesse Brandeburg