[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <77aa43c1-6d94-bf08-13cf-ec405916b4b7@redhat.com>
Date: Wed, 23 Jun 2021 06:38:06 -0700
From: Tom Rix <trix@...hat.com>
To: Martin Hundebøll <mhu@...icom.dk>,
Wu Hao <hao.wu@...el.com>, Moritz Fischer <mdf@...nel.org>,
Xu Yilun <yilun.xu@...el.com>,
Jean Delvare <jdelvare@...e.com>,
Guenter Roeck <linux@...ck-us.net>,
Lee Jones <lee.jones@...aro.org>,
Mark Brown <broonie@...nel.org>
Cc: Martin Hundebøll <mhu@...nix.com>,
linux-fpga@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-hwmon@...r.kernel.org, linux-spi@...r.kernel.org,
Debarati Biswas <debaratix.biswas@...el.com>,
Russ Weight <russell.h.weight@...el.com>
Subject: Re: [PATCH 2/4] fpga: dfl: Move DFH header register macros to
linux/dfl.h
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 <debaratix.biswas@...el.com>
>>>
>>> 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 <debaratix.biswas@...el.com>
>>> Signed-off-by: Russ Weight <russell.h.weight@...el.com>
>>> Signed-off-by: Martin Hundebøll <mhu@...icom.dk>
>>> ---
>>> 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 <linux/bitfield.h>
>>
>> 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
>
Powered by blists - more mailing lists