Re: [PATCH resubmit net 1/2] net: fec: Forward-declare `fec_ptp_read()`
From: Andrew Lunn
Date: Thu Aug 08 2024 - 09:34:24 EST
On Thu, Aug 08, 2024 at 12:37:41PM +0100, Simon Horman wrote:
> On Thu, Aug 08, 2024 at 11:49:29AM +0200, Csókás Bence wrote:
> > On 8/8/24 11:41, Simon Horman wrote:
> > > On Wed, Aug 07, 2024 at 03:53:17PM +0200, Andrew Lunn wrote:
> > > > On Wed, Aug 07, 2024 at 10:29:17AM +0200, Csókás, Bence wrote:
> > > > > This function is used in `fec_ptp_enable_pps()` through
> > > > > struct cyclecounter read(). Forward declarations make
> > > > > it clearer, what's happening.
> > > >
> > > > In general, forward declarations are not liked. It is better to move
> > > > the code to before it is used.
> > > >
> > > > Since this is a minimal fix for stable, lets allow it. But please wait
> > > > for net to be merged into net-next, and submit a cleanup patch which
> > > > does move fec_ptp_read() earlier and remove the forward declaration.
> > >
> > > That makes sense.
> > >
> > > However, is this a fix?
> > > It's not clear to me that it is.
> >
> > Well, it's not clear to me either what constitutes as a "fix" versus "just a
> > cleanup". But, whatever floats Andrew's boat...
>
> Let me state my rule of thumb: a fix addresses a user-visible bug.
>
> > > And if it is a pre-requisite for patch 2/2,
> > > well that doesn't seem to be a fix.
> >
> > It indeed is.
> >
> > > So in all, I'm somewhat confused.
> > > And wonder if all changes can go via net-next.
> >
> > That's probably what will be happening.
>
> It does seem like the cleanest, and coincidently easiest, path.
If it does not really fix anything, then net-next.
Andrew