Re: [PATCH resubmit net 1/2] net: fec: Forward-declare `fec_ptp_read()`

From: Andrew Lunn
Date: Wed Aug 07 2024 - 09:53:36 EST


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.

Andrew