Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5672783pxj; Wed, 23 Jun 2021 06:39:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjoVg6kE7HGkiZ6R3jSuC1Hz7f8cYYsCyyy3DKxrtvjjfIuyzDMICvY/CoxYJQ3+pBzBcj X-Received: by 2002:a92:1e04:: with SMTP id e4mr2879225ile.260.1624455548045; Wed, 23 Jun 2021 06:39:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624455548; cv=none; d=google.com; s=arc-20160816; b=YCML70EbNxdiVbRXH6QX3mkCoAV7W+htoJNWCXDHQ8nzEErAia/WqtfulF7f0Aot/F +i0BORroOkdXpkWR/widwXWX4JDXJ0/buaKVrF6l2otG1q0xOM43aBDdE1Guh5g43kZT rkj8F1kBctM9RuOHIP910pid5IWcq2/l+RgSu/owdVtK8XVzMdGQq/s5hJOvD2Dd1QjA hqvvHsKYLP7+OU7/BsvK6CJ6dbhFKHxNeH2d/K5KNm89rzeVTXNx1bkqm1d5NvQL8lhC q/OCS3bGUGZGLeDhFK2ufTH0Me8agcalaqK95lWKIV7sEqC5xqf/8rDHsJhz1VpM40SD AAuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=ayosJHzto3Nl337sThWluxXrKp5Ovvc0yF/Tu5r9k3g=; b=Aezu3eb5dl2iRJ5MyYADVkGlWWAkhhliwoEVugykDwyqCzLrUBgmpQvvVm3+pzKb7y cc2akVXIqre5sOhl0wKGIe1L1vtQBUZ6DIJOgtg7uSG/g/pUl3nA7zfmFZqovtSS64qY 2KsC54EfDDsB2eZ8G14W5aWn3KOAuiSEmp382N3sz0DJREageaZA9ETkWxC4K3EOZz9e gtD9aNQ2ySFa+UM3uK+MxDDj25sma2pC58Ro3fu2XnnTdW6+xY2elsXdd+Qg5pSvHMko BvTKLrXSsCEdPVaiAzi1F9NXdOTMWY+fr6cbqtMb0scTOK6vBEXpfpSDymQDlmgs26sq nPyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=imHZEtmX; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u18si18863899ilg.79.2021.06.23.06.38.55; Wed, 23 Jun 2021 06:39:08 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=imHZEtmX; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230182AbhFWNka (ORCPT + 99 others); Wed, 23 Jun 2021 09:40:30 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:58982 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230243AbhFWNk3 (ORCPT ); Wed, 23 Jun 2021 09:40:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624455491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ayosJHzto3Nl337sThWluxXrKp5Ovvc0yF/Tu5r9k3g=; b=imHZEtmXNjfrr38+nN6XQbcKxWRALBVWJ4WVtjg/rv8TdVT7MirP1PIi9OFMyDrTTJdCzw 3syWX/zijPTdFQ3nWdHjgm4C0TGFMrLWQn5ZKap0YgYUd4Ky8zwLEk1OdorC5RRPs41JEV FNUeMj+GYlSQ56DixSJjmEaZ/CrliAQ= Received: from mail-ot1-f70.google.com (mail-ot1-f70.google.com [209.85.210.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-356-_X1DHXd2MLOhfg0VUlisDQ-1; Wed, 23 Jun 2021 09:38:10 -0400 X-MC-Unique: _X1DHXd2MLOhfg0VUlisDQ-1 Received: by mail-ot1-f70.google.com with SMTP id e28-20020a9d491c0000b02903daf90867beso1251354otf.11 for ; Wed, 23 Jun 2021 06:38:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=ayosJHzto3Nl337sThWluxXrKp5Ovvc0yF/Tu5r9k3g=; b=OLC8t2/TYGpkcQDe7VhMKqRBxa2EwhLyttSW/fxmdZMnbPN/iEwVQfvTqEKfPcHpxY YkviTr4E2fy4vwfboy4CpdS2NjznRZxKNsUXKtoxFkmMwVb+LjiU8wXyfn3cYfGt3O1L G0a2hg59O/3IIbSZ/DCVZC0hNgoOzeBW/d4rDUkHY4Gm+yApMuv8KsDri5OBV0uv1Y4/ IKuoF8n5JxEadi9Re7WMWIZqqPcQLnVekq4lcmpLkBmt2ZTEH127EjrbSp7zzyrpV5ib JwhaAYn/XemZMrAqkCHviLzto5t/3hCZFNM+MTYYGxIgzBuHjh6sOD3G+PaVysctutKV EqvA== X-Gm-Message-State: AOAM532OU5G7BHSdHVLmKBcXN49Vqbe+Gx85uKG5c5vSEW69peSWaRai VJ2wft0jtRSY+V99uwBKTXNUf7UZqchnImnbabZezM5pLttIQPoiOp5uCCxai0ryG1onpMpGX1h 5wgUiqjJYSaRo9JaNyfXo5jck X-Received: by 2002:a9d:baa:: with SMTP id 39mr7603973oth.159.1624455489666; Wed, 23 Jun 2021 06:38:09 -0700 (PDT) X-Received: by 2002:a9d:baa:: with SMTP id 39mr7603952oth.159.1624455489491; Wed, 23 Jun 2021 06:38:09 -0700 (PDT) Received: from localhost.localdomain (075-142-250-213.res.spectrum.com. [75.142.250.213]) by smtp.gmail.com with ESMTPSA id m10sm5008296oig.9.2021.06.23.06.38.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Jun 2021 06:38:09 -0700 (PDT) Subject: Re: [PATCH 2/4] fpga: dfl: Move DFH header register macros to linux/dfl.h To: =?UTF-8?Q?Martin_Hundeb=c3=b8ll?= , Wu Hao , Moritz Fischer , Xu Yilun , Jean Delvare , Guenter Roeck , Lee Jones , Mark Brown Cc: =?UTF-8?Q?Martin_Hundeb=c3=b8ll?= , linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-spi@vger.kernel.org, Debarati Biswas , Russ Weight References: <20210621070621.431482-1-mhu@silicom.dk> <20210621070621.431482-3-mhu@silicom.dk> <81975a85-e9d6-bd4b-7666-56d1d1d581bc@redhat.com> <7c6021cc-69c5-7c3f-9e37-30c933535835@silicom.dk> From: Tom Rix Message-ID: <77aa43c1-6d94-bf08-13cf-ec405916b4b7@redhat.com> Date: Wed, 23 Jun 2021 06:38:06 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <7c6021cc-69c5-7c3f-9e37-30c933535835@silicom.dk> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/23/21 4:44 AM, Martin Hundebøll wrote: > On 21/06/2021 15.56, Tom Rix wrote: >> >> On 6/21/21 12:06 AM, Martin Hundebøll wrote: >>> From: Debarati Biswas >>> >>> Device Feature List (DFL) drivers may be defined in subdirectories >>> other >>> than drivers/fpga, and each DFL driver should have access to the Device >>> Feature Header (DFH) register, which contains revision and type >>> information. This change moves the macros specific to the DFH register >>> from drivers/fpga/dfl.h to include/linux/dfl.h. >>> >>> Signed-off-by: Debarati Biswas >>> Signed-off-by: Russ Weight >>> Signed-off-by: Martin Hundebøll >>> --- >>>   drivers/fpga/dfl.h  | 48 +---------------------------------------- >>>   include/linux/dfl.h | 52 >>> +++++++++++++++++++++++++++++++++++++++++++++ >>>   2 files changed, 53 insertions(+), 47 deletions(-) >>> >>> diff --git a/drivers/fpga/dfl.h b/drivers/fpga/dfl.h >>> index 2b82c96ba56c..6ed0353e9a99 100644 >>> --- a/drivers/fpga/dfl.h >>> +++ b/drivers/fpga/dfl.h >>> @@ -17,6 +17,7 @@ >>>   #include >> >> bitfield.h was added to linux/dfl.h >> >> Likely both aren't needed, try removing this one. > > After this patch both headers use GENMASK_ULL() and BIT_ULL(), which > are both defined in linux/bits.h, so I would expect both to include > that instead. A lot of the users of dfl.h uses FIELD_GET(), which is > defined in linux/bitfield.h, so I would expect that to be included > there instead. > > I can prepare a patch to fix that up, if you like? A rule of thumb, if your commit says 'A and B' , likely it should only be A. Remove the the linux/bitfield.h from drivers/fpga/dfl.h Leave the linux/bitfield.h as-is in include/linux/dfl.h If you feel include/linux/dfl.h can be optimized by the reduction of linux/bitfield.h to linux/bits.h, do that as a follow on patchset. Tom > > // Martin >