[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6877683f-6018-4b29-a378-3a04c7b7f838@linaro.org>
Date: Mon, 29 Jan 2024 17:59:37 +0000
From: Tudor Ambarus <tudor.ambarus@...aro.org>
To: Mark Brown <broonie@...nel.org>
Cc: Sam Protsenko <semen.protsenko@...aro.org>, andi.shyti@...nel.org,
krzysztof.kozlowski@...aro.org, alim.akhtar@...sung.com,
jassi.brar@...sung.com, linux-spi@...r.kernel.org,
linux-samsung-soc@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, andre.draszik@...aro.org,
peter.griffin@...aro.org, kernel-team@...roid.com, willmcvicker@...gle.com
Subject: Re: [PATCH v3 17/17] spi: s3c64xx: use bitfield access macros
On 1/29/24 16:42, Mark Brown wrote:
> On Sat, Jan 27, 2024 at 03:44:24AM +0000, Tudor Ambarus wrote:
>> On 1/27/24 03:38, Sam Protsenko wrote:
>
>>>>>> - val |= S3C64XX_SPI_MODE_BUS_TSZ_HALFWORD;
>>>>>> - val |= S3C64XX_SPI_MODE_CH_TSZ_HALFWORD;
>>>>>> + val |= FIELD_PREP(S3C64XX_SPI_MODE_BUS_TSZ_MASK,
>>>>>> + S3C64XX_SPI_MODE_BUS_TSZ_HALFWORD) |
>>>>>> + FIELD_PREP(S3C64XX_SPI_MODE_CH_TSZ_MASK,
>>>>>> + S3C64XX_SPI_MODE_CH_TSZ_HALFWORD);
>
>>>>> Two people complained it makes the code harder to read. Yet it's not
>>>>> addressed in v3. Please see my comments for your previous submission
>>>>> explaining what can be done, and also Andi's comment on that matter.
>
>>>> I kept these intentionally. Please read my reply on that matter or the
>>>> cover letter to this patch set.
>
>>> I read it. But still don't like it 🙂 I'm sure it's possible to do
>>> this modification, but at the same time keep the code clean an easy to
>>> read. The code above -- I don't like at all, sorry. It was much better
>>> before this patch, IMHO.
>
>> Yeah, I guess Mark will tip the scale.
>
> All other things being equal I tend to try not to get too involved with
> minor coding style stuff in drivers. People do seem to like
> FIELD_PREP() but I have a hard time getting *too* excited.
Ok, I'll remove FIELD_PREP. Would you please consider the other patches,
all are simple. There's another "controversy" on 6/17. You can ignore
that as well maybe, and I'll resend it where I refrain myself to just
removing the cast.
Powered by blists - more mailing lists