Re: [v3 1/2] mtd: nand: Add Cadence NAND controller driver

From: Dmitry Osipenko
Date: Tue Jun 25 2019 - 10:45:12 EST


25.06.2019 16:02, Piotr Sroka ÐÐÑÐÑ:
> Hi Dmitry
>
> The 06/16/2019 16:42, Dmitry Osipenko wrote:
>> EXTERNAL MAIL
>>
>>
>> 14.06.2019 18:09, Piotr Sroka ÐÐÑÐÑ:
>>
>> Commit description is mandatory.
>>
>>> Signed-off-by: Piotr Sroka <piotrs@xxxxxxxxxxx>
>>> ---
>>
>> [snip]
>>
>>> +
>>> +/* Cadnence NAND flash controller capabilities get from driver data. */
>>> +struct cadence_nand_dt_devdata {
>>> +ÂÂÂ /* Skew value of the output signals of the NAND Flash interface. */
>>> +ÂÂÂ u32 if_skew;
>>> +ÂÂÂ /* It informs if aging feature in the DLL PHY supported. */
>>> +ÂÂÂ u8 phy_dll_aging;
>>> +ÂÂÂ /*
>>> +ÂÂÂÂ * It informs if per bit deskew for read and write path in
>>> +ÂÂÂÂ * the PHY is supported.
>>> +ÂÂÂÂ */
>>> +ÂÂÂ u8 phy_per_bit_deskew;
>>> +ÂÂÂ /* It informs if slave DMA interface is connected to DMA engine. */
>>> +ÂÂÂ u8 has_dma;
>>
>> There is no needed to dedicate 8 bits to a variable if you only care about a single
>> bit. You may write this as:
>>
>> bool has_dma : 1;
> I modified it locally but it looks that checkpatch does not like such
> notation
> "WARNING: Avoid using bool as bitfield. Prefer bool bitfields as
> unsigned int or u<8|16|32>"
> So maybe I will leave it as is.

You may also use the "u8 : 1" form then, to satisfy the checkpatch. Probably
"unsigned int : 1" will be the best in this case, it's up to you.