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

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Wed Mar 22 08:03:42 UTC 2017


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, but I did
a few further changes (mainly cosmetic stuff to make checkpatch happy)
before submitting patches to mainline.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com


More information about the U-Boot mailing list