[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20230503-companion-sincere-573fc8d234d8-mkl@pengutronix.de>
Date: Wed, 3 May 2023 16:37:44 +0200
From: Marc Kleine-Budde <mkl@...gutronix.de>
To: Peter Hong <peter_hong@...tek.com.tw>
Cc: Vincent MAILHOL <mailhol.vincent@...adoo.fr>,
Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>,
wg@...ndegger.com, Steen.Hegelund@...rochip.com,
davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, frank.jungclaus@....eu,
linux-kernel@...r.kernel.org, linux-can@...r.kernel.org,
netdev@...r.kernel.org, hpeter+linux_kernel@...il.com
Subject: Re: [PATCH V5] can: usb: f81604: add Fintek F81604 support
On 02.05.2023 10:53:43, Peter Hong wrote:
> Hi Vincent, Michal and Marc,
>
> Vincent MAILHOL 於 2023/4/21 下午 03:30 寫道:
> > Hi Peter and Michal,
> >
> > On Fry. 21 Apr. 2023 at 12:14, Peter Hong <peter_hong@...tek.com.tw> wrote:
> > > Hi Vincent,
> > >
> > > Vincent MAILHOL 於 2023/4/20 下午 08:02 寫道:
> > > > Hi Peter,
> > > >
> > > > Here are my comments. Now, it is mostly nitpicks. I guess that this is
> > > > the final round.
> > > >
> > > > On Thu. 20 avr. 2023 at 11:44, Ji-Ze Hong (Peter Hong)
> > > > <peter_hong@...tek.com.tw> wrote:
> > > > > +static void f81604_handle_tx(struct f81604_port_priv *priv,
> > > > > + struct f81604_int_data *data)
> > > > > +{
> > > > > + struct net_device *netdev = priv->netdev;
> > > > > + struct net_device_stats *stats;
> > > > > +
> > > > > + stats = &netdev->stats;
> > > > Merge the declaration with the initialization.
> > > If I merge initialization into declaration, it's may violation RCT?
> > > How could I change about this ?
> > @Michal: You requested RTC in:
> >
> > https://lore.kernel.org/linux-can/ZBgKSqaFiImtTThv@localhost.localdomain/
> >
> > I looked at the kernel documentation but I could not find "Reverse
> > Chistmas Tree". Can you point me to where this is defined?
> >
> > In the above case, I do not think RCT should apply.
> >
> > I think that this:
> >
> > struct net_device *netdev = priv->netdev;
> > struct net_device_stats *stats = &netdev->stats;
> >
> > Is better than that:
> >
> > struct net_device *netdev = priv->netdev;
> > struct net_device_stats *stats;
> >
> > stats = &netdev->stats;
> >
> > Arbitrarily splitting the definition and assignment does not make sense to me.
> >
> > Thank you for your comments.
>
> The RCT coding style seems a bit confuse. How about refactoring of next
> step? @Marc ?
I don't are that much about RCT (so far my upstream has not complained).
Either of the above is fine with me.
regards,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung Nürnberg | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists