[PATCH 5/8] xhci: mediatek: Add support for MTK xHCI host controller

Marek Vasut marex at denx.de
Tue Mar 31 18:05:27 CEST 2020


On 3/31/20 4:16 PM, Simon Glass wrote:
> HI Marek,

Hi,

[...]

>>>>> OK I have updated the coding style page with all of this.
>>>>
>>>> Which page ?
>>>
>>> https://www.denx.de/wiki/U-Boot/CodingStyle
>>
>> " U-Boot typically uses a C structure to map out the registers in an I/O
>> region, rather than offsets. The reasons for this are: " is misleading
>> and suggests that using structures is the best practice. This should be
>> reworded to make it clear both options are equally valid.
> 
> I'd like to see a preference to use struct where it makes sense and
> not use it when it doesn't, with the different tradeoffs clearly
> written. Are asking that we say nothing about which is better in each
> situation?

Correct, because I don't see a clear agreement on which one is better
and should be preferred.

>>> Separately, I sent a patch a while back which updated checkpatch for
>>> U-Boot. I got some pushback
>>
>> Link ?
>>
> 
> http://patchwork.ozlabs.org/patch/999510/

OK, this has nothing to do with structs, right ?

>> I am very much opposed to this struct-based approach, so there is my
>> pushback too. I think we should NOT do it.
> 
> Right, but there are arguments on both sides. I strongly prefer it
> where it makes sense, for reasons that we've already discussed.

Your preference does not mean it is also the project preference though.
If you want to decide on that, make sure there is some agreement first.


More information about the U-Boot mailing list