[U-Boot] [PATCH v1 15/41] net: mvpp2: introduce PPv2.2 HW descriptors and adapt accessors

Stefan Roese sr at denx.de
Wed Mar 22 08:13:25 UTC 2017


On 22.03.2017 09:03, Thomas Petazzoni wrote:
> Hello,
>
> On Wed, 22 Mar 2017 08:11:45 +0100, Stefan Roese wrote:
>
>>>>  static unsigned long mvpp2_rxdesc_cookie_get(struct mvpp2_port *port,
>>>>                                              struct mvpp2_rx_desc *rx_desc)
>>>>  {
>>>> -       return rx_desc->pp21.buf_cookie;
>>>> +       if (port->priv->hw_version == MVPP21) {
>>>> +               return rx_desc->pp21.buf_cookie;
>>>> +       } else {
>>>> +               return rx_desc->pp22.buf_cookie_misc & GENMASK_ULL(40, 0);
>>>> +       }
>>>
>>> The braces look like something that checkpatch might complain about
>>> (unnecessary one-line if), but I assume you ran that (using patman,
>>> right!?). Also inconsistent with the other functions.
>>>
>>> If there ends up being a v2, then maybe clean this up, otherwise, whatever.
>>
>> I'm aware of this checkpatch "problem", but I prefer to not change
>> it, to keep the U-Boot version in sync with the Linux version, making
>> future ports easier.
>
> FWIW, precisely due to the checkpatch warning, I removed those braces
> before submitting the patches to the kernel, so they are not here in
> the code merged upstream:
>
>   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/tree/drivers/net/ethernet/marvell/mvpp2.c#n1219
>
> Stefan: I think you used the latest branch I pushed on Github,

Correct.

> but I did
> a few further changes (mainly cosmetic stuff to make checkpatch happy)
> before submitting patches to mainline.

I see. I'll use the net-next version now to sync with the patches
again.

Thanks,
Stefan


More information about the U-Boot mailing list