Re: [PATCH] net: fec: Remove duplicated code

From: Frank Li
Date: Mon Aug 05 2024 - 12:05:46 EST


On Mon, Aug 05, 2024 at 05:36:49PM +0200, Csókás Bence wrote:
>
>
> On 8/5/24 17:31, Frank Li wrote:
> > On Mon, Aug 05, 2024 at 04:47:55PM +0200, Csókás, Bence wrote:
> > > - ptp_hc = readl(fep->hwp + FEC_ATIME);
> > > + ptp_hc = fep->cc.read(&fep->cc);
> >
> > why not call fec_ptp_read() directly?
> >
> > Frank
>
> It is defined later in the file. Using the struct cyclecounter was the
> solution for this we settled on in 61d5e2a251fb ("fec: Fix timer capture
> timing in `fec_ptp_enable_pps()`") as well.

Actually I prefer move fec_ptp_read() ahead. It is not big deal. Direct
call just little bit better because reduce a indirect call. Generally
->cc.read() supposed to be called only timercount.c otherwice, it should
provide an API call in timercount.h.

Sorry, I missed review 61d5e2a251fb.

Frank Li

>
> Bence
>