Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp10946842rwl; Mon, 2 Jan 2023 10:50:09 -0800 (PST) X-Google-Smtp-Source: AMrXdXtf31GLGFN4Jjm7q33234xkFzbB8loK+alv8tml1or2BrRCKa53490t7PhxD/LdQOrT19L4 X-Received: by 2002:a17:906:8601:b0:7b2:91e8:1553 with SMTP id o1-20020a170906860100b007b291e81553mr36467335ejx.20.1672685409569; Mon, 02 Jan 2023 10:50:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672685409; cv=none; d=google.com; s=arc-20160816; b=LZoyRA1Ogo5XgSz1KtvLxlXXKoIiDiU2lF49VHIceq5MGz2BySQXvZRkt04tUWGWUh evsXJyBXgr0wHNXSWh+KSED7YroAsAXxKscp8HdBUK5lkjwUP1uMfMMsnzhwSflNSAmV 9LhOXM3lMFDG9QTmqEwLfbhV5SLU4e9ImvflCBriZ/E0w4t87fYwKaSeKcqo+u6+I8Zl TPGKzSYdvVc2Tv+UYN1Vr8+yz5nja48qZdbBNwY+Xqtxo+wr4qkXN678n2+ohhEXpOcT JvtNAszvvgR1SRoHDsKSJVTvqwgh2xFoHFeqBQxCHgPyhQ4IVqZUve5P5BINcJOqydlM Z/Ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=C0y5NZ8q3qPWm3GGmoBZacObTf9iVVwsHMeFzdTeC7w=; b=jvwLSqYi2g1wCny5m89l9wKw3siU/npnNoWAIecS522oDPKyZEg76FwqtBE0y27qj3 FHfX2bf2FIH1ZXE7SF0XjzRApwM+ccHPO2lLnvNow3kIFa9yLhld3B4c99pOrf6K4ruo 3LQZSLC3FHcCk/3q9bQUKPAuHWFLi5Js9Ufpu+V1TY/zmvii/J7bpvY240zloE1QHnLX 2Oa/s6vYZp8M9EU1xgxIJywMz1J+tWTBLSy1UTPVeOVsMxqwKnJuz44fOBTSvkJMbnYS lhiChI1y9Si3MPvwlxsaLAAGaNei6SVbB8GLTrI+R1lcyee3Ow9AEAr+Y4XdJAGVkN83 8wbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ZzyH9Hyu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i8-20020a1709064fc800b007c89c44ec82si27769468ejw.84.2023.01.02.10.49.55; Mon, 02 Jan 2023 10:50:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ZzyH9Hyu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236481AbjABSJe (ORCPT + 61 others); Mon, 2 Jan 2023 13:09:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236324AbjABSJa (ORCPT ); Mon, 2 Jan 2023 13:09:30 -0500 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD3EBA464; Mon, 2 Jan 2023 10:09:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672682969; x=1704218969; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=u0cKWq5UhALwaWgyRXoKx+AMTrECSa5KGHsicEUKVqU=; b=ZzyH9Hyu9pwVzzKnwpCVHaEe1zppWmCNHqz9bz+RsMLVqlh9a/TD+DlR 2Dzij87CpvlxaB13RhVrZksC9OynJdnh2J2cCINGj9XRRt9bKPMymzx1H qvPsr2AlJvfpDaOOIBYsPkIhethifL6jy+oq4LqHSCmNkR9EFvbIw/Nmu ksxZfgx1KcLmA1xqbKISCi5m9b1Fy8GFcvn6xax+2bwUpBL6KRb/9w42E 47xFxgP6Nbndkv+HB95HRU1ZjEyvYdHFmE1Fnz67H/+A6G58bhlf9YVR1 1wpocqfr1cmfuBKrTj45oBgIyfnocbJuQLuVqVcHKTkjc00wGvS362jNQ Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10578"; a="323515068" X-IronPort-AV: E=Sophos;i="5.96,294,1665471600"; d="scan'208";a="323515068" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jan 2023 10:09:29 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10578"; a="828629888" X-IronPort-AV: E=Sophos;i="5.96,294,1665471600"; d="scan'208";a="828629888" Received: from rhweight-wrk1.ra.intel.com ([137.102.106.139]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jan 2023 10:09:25 -0800 Date: Mon, 2 Jan 2023 10:09:45 -0800 (PST) From: matthew.gerlach@linux.intel.com X-X-Sender: mgerlach@rhweight-WRK1 To: Andy Shevchenko cc: Tom Rix , hao.wu@intel.com, yilun.xu@intel.com, russell.h.weight@intel.com, basheer.ahmed.muddebihal@intel.com, mdf@kernel.org, linux-fpga@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, tianfei.zhang@intel.com, corbet@lwn.net, gregkh@linuxfoundation.org, linux-serial@vger.kernel.org, jirislaby@kernel.org, geert+renesas@glider.be, niklas.soderlund+renesas@ragnatech.se, macro@orcam.me.uk, johan@kernel.org, lukas@wunner.de, ilpo.jarvinen@linux.intel.com, marpagan@redhat.com, bagasdotme@gmail.com Subject: Re: [PATCH v8 3/4] fpga: dfl: add basic support for DFHv1 In-Reply-To: Message-ID: References: <20221228181624.1793433-1-matthew.gerlach@linux.intel.com> <20221228181624.1793433-4-matthew.gerlach@linux.intel.com> <628c125a-5a84-e1bd-7724-2637315cc35e@redhat.com> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2 Jan 2023, Andy Shevchenko wrote: > On Mon, Jan 02, 2023 at 07:27:06PM +0200, Andy Shevchenko wrote: >> On Mon, Jan 02, 2023 at 08:54:48AM -0800, matthew.gerlach@linux.intel.com wrote: >>> On Thu, 29 Dec 2022, Andy Shevchenko wrote: >>>> On Thu, Dec 29, 2022 at 08:18:03AM -0800, Tom Rix wrote: >>>>> On 12/28/22 10:16 AM, matthew.gerlach@linux.intel.com wrote: > > ... > >>>>>> + u64 params[]; >>>>> u64 *params >> >>>> This will break the overflow.h macros, no? >>>> Besides that it will break the code for sure as it's not an equivalent. >> >>> I don't understand how this will break the overflow.h macros. The definition >>> of struct dfl_feature_info and all of its uses are in a single file, dfl.c. >> >> Hint: __must_be_array() >> >> As I said, the proposed change is not acceptable since it's not an equivalent. > > Ah, you meant that there is no use of macros from overflow in the dfl.c? > IIRC we discussed that some of the code may make use of them, or am I > mistaken? There currently is one usage of struct_size() from overflow.h in dfl.c, and my patch adds another usage of struct_size(). struct dfl_feature_info ends with a trailing array of u64. I think the confusion is with struct dfl_feature and/or struct struct dfl_device. Those structs don't end with a trailing array, and those structs are not used with macros from overview.h. Thanks for the feedback, Matthew Gerlach > > -- > With Best Regards, > Andy Shevchenko > > >