From patchwork Wed Aug 7 08:29:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q3PDs2vDoXMgQmVuY2U=?= X-Patchwork-Id: 13755965 X-Patchwork-Delegate: kuba@kernel.org Received: from fw2.prolan.hu (fw2.prolan.hu [193.68.50.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3315C1BDAB6; Wed, 7 Aug 2024 08:29:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.68.50.107 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723019392; cv=none; b=fXOcVca6QBxfh/pKIhYJbhC7hnY959p2Lw8Si7O+Zp3vVF/QYLrAMDPGc8H6CBQn6WZrFd/+1wNDXkbcdSAZH0topTy3X0pKziL5nOpYv/h3Gz0wUIkAKo6Ded/kZoX3Db+1HYB3A4MM4AKw3jztwcoLBrH0owZt7wCRH7e+NtY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723019392; c=relaxed/simple; bh=OnapAem2E91EqGGMAh397ud0U7heFVYvLvbFISX8OlM=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=ARwTDVq1suVPoDRvGQDgDqekD5NPG3pDw5Ia5I4W3VgDpPWgJwMRWH/nmcPjE/WUkVI91k8EBQcePMBveuGm0yH5+DixlB5eAyU7RM8YczhSrAV+ByY3QEfwHI1Bs5TRcrspo68MCWHTtLTUPcf7ICni+qm2hKf9LveB1RcHv5A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=prolan.hu; spf=pass smtp.mailfrom=prolan.hu; dkim=pass (4096-bit key) header.d=prolan.hu header.i=@prolan.hu header.b=uX/Go35j; arc=none smtp.client-ip=193.68.50.107 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=prolan.hu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=prolan.hu Authentication-Results: smtp.subspace.kernel.org; dkim=pass (4096-bit key) header.d=prolan.hu header.i=@prolan.hu header.b="uX/Go35j" Received: from proxmox-mailgw.intranet.prolan.hu (localhost.localdomain [127.0.0.1]) by proxmox-mailgw.intranet.prolan.hu (Proxmox) with ESMTP id D9631A050F; Wed, 7 Aug 2024 10:29:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=prolan.hu; h=cc :cc:content-transfer-encoding:content-type:content-type:date :from:from:message-id:mime-version:reply-to:subject:subject:to :to; s=mail; bh=Hg5GSTMLl38WzLZ42vBN3FPT2wlT/tDURwfZyb8EsxM=; b= uX/Go35jJLVi8M3I+eRiMjuuU4AQ62Fo8BAu2mA0r1i8GZJ9GyBpJpq5DD0rZWM6 eTwatiBDY4gQpe/RGKJgD/LVm3g2UuCj2mH4/cTvCBLNxoEIzFLm+GDI1eiYcAPa KutoNa7C216JHgA4ggZqsp5S6kdZNMaxf1RBxzAq6BvTgbVMfWL1pt2fnPweG6+r fR8wI5/QmOHv8zhGFCCeNnnsg8jfadFYYpzSLqOgeall9AaoHT51e9RZNZo3aHMC zXOoVQLD5xcFou/aM1p0+dkB1lcbazsWU3Fw8V9+PEf83E3Qk6/49net0uJdSdZs /lD5GTmiWNQIfif+4uNH8AHn2FJDhlUpKrC6OUA0Ak1qiuqgnOyfPZmrlSiPRI2n +5ovph72+t3PMaZzizIYcM8qFNFFMgIErAAzi/FmTjEI7pRkCjEN9iwjYnos+aWQ JQUf3jMCG2ZTt9cZa9QFYUpwoWxbPnLW5MI7nBWyxEEFRp4mJqaUEMKYE/3FoHwR eBwpUJOXSxB4ROyN2xttY5TrU8qIo3TenHFcOJDRcVlT0SpMBR3jqM98CAJzNfIl 6/YUFFdnzZgEmtG6XOA8MSfNoACd3TrQj+tIBs+F9ahr9f9G5f4xp2mvLHFV31DT BBAf8WSv/j12zSqXFuHOKLJfh2IkrGBBFxwL8lzLIu4= From: =?utf-8?b?Q3PDs2vDoXMsIEJlbmNl?= To: =?utf-8?b?Q3PDs2vDoXMgQmVuY2U=?= , "Jakub Kicinski" , , , CC: Frank Li , Wei Fang , Shenwei Wang , Clark Wang , "David S. Miller" , Eric Dumazet , Paolo Abeni , Richard Cochran Subject: [PATCH resubmit net 1/2] net: fec: Forward-declare `fec_ptp_read()` Date: Wed, 7 Aug 2024 10:29:17 +0200 Message-ID: <20240807082918.2558282-1-csokas.bence@prolan.hu> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ESET-AS: R=OK;S=0;OP=CALC;TIME=1723019386;VERSION=7975;MC=2323596704;ID=189166;TRN=0;CRV=0;IPC=;SP=0;SIPS=0;PI=3;F=0 X-ESET-Antispam: OK X-EsetResult: clean, is OK X-EsetId: 37303A29ACD94854617461 X-Patchwork-Delegate: kuba@kernel.org This function is used in `fec_ptp_enable_pps()` through struct cyclecounter read(). Forward declarations make it clearer, what's happening. Fixes: 61d5e2a251fb ("fec: Fix timer capture timing in `fec_ptp_enable_pps()`") Suggested-by: Frank Li Link: https://lore.kernel.org/netdev/20240805144754.2384663-1-csokas.bence@prolan.hu/T/#ma6c21ad264016c24612048b1483769eaff8cdf20 Signed-off-by: Csókás, Bence Reviewed-by: Frank Li --- drivers/net/ethernet/freescale/fec_ptp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/fec_ptp.c b/drivers/net/ethernet/freescale/fec_ptp.c index e32f6724f568..fdbf61069a05 100644 --- a/drivers/net/ethernet/freescale/fec_ptp.c +++ b/drivers/net/ethernet/freescale/fec_ptp.c @@ -90,6 +90,8 @@ #define FEC_PTP_MAX_NSEC_PERIOD 4000000000ULL #define FEC_PTP_MAX_NSEC_COUNTER 0x80000000ULL +static u64 fec_ptp_read(const struct cyclecounter *cc); + /** * fec_ptp_enable_pps * @fep: the fec_enet_private structure handle @@ -136,7 +138,7 @@ static int fec_ptp_enable_pps(struct fec_enet_private *fep, uint enable) * NSEC_PER_SEC - ts.tv_nsec. Add the remaining nanoseconds * to current timer would be next second. */ - tempval = fep->cc.read(&fep->cc); + tempval = fec_ptp_read(&fep->cc); /* Convert the ptp local counter to 1588 timestamp */ ns = timecounter_cyc2time(&fep->tc, tempval); ts = ns_to_timespec64(ns);