From patchwork Mon Feb 26 13:40:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?K=C3=B6ry_Maincent?= X-Patchwork-Id: 206634 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2082736dyb; Mon, 26 Feb 2024 05:43:34 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXzNakWvAwDaJa/phVGdq5KapBcLyfkp31dKmj0+YaKu2CuQMMer/T7QoAUD+SuPQ+cJzJHlAbz3Elp4VggRrd9PcaRTA== X-Google-Smtp-Source: AGHT+IECXW3dEXC3ae3ON0B1ReiXJS5GKn/2u5kcJWvepvaWNHQeZECVFyoECIk8bU3nQ9YfqHG2 X-Received: by 2002:a05:622a:40e:b0:42e:695b:fcf7 with SMTP id n14-20020a05622a040e00b0042e695bfcf7mr8783422qtx.53.1708955014237; Mon, 26 Feb 2024 05:43:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708955014; cv=pass; d=google.com; s=arc-20160816; b=jvpTOnWxXi24QxeBb0+JFrdt/izElvG84A5BXyZm5I6Yp+9jDGTO42RhPlHl1mOtfs 9QWs17rsgYrmB4JxWQx9jjeGeM3mwjP1zUgUaUeBz3Ko7knuY1HQVW0ak+DQF55U+55D WTbGLVVV0Y2ApCjDwjnYHPRDLZB/JZu5ELHP/H53v/d6GECTUdtGNEEiKuuwzXVPTtmp IaOE9XmB6p4fdJHodtpVXNKMWt6Tab5Glng3+mNThsCYPH1p64kCeE+4OQxsxbkMJnjK yp3YFQ5k/U9yFpx0u3onkLoF47RG6nd2DTrTJkNAFTmoKDFGcD1Z4ZdfKHxgd03/fSqA 8jDQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=Fcclx+P2VRL5YyMqc19FLMrEZY/bn8QqcU/6ryhVROM=; fh=vtlcgQ30nO0QjQR7y1Wfn7g9c11A+T6SWcSZ6WixcJI=; b=erDtCFK0zjT73CW/f/+nZQa1n9/AD9JaS9As9jLA4o6oPEC6cYeVJEkYKl6as/yOgG OH1wJHK1xYXOeYn6Jt+IDBw3cvdBmlN8vQsHkIJq5BHhz3e9VK2Cl402V/QXi4F2j2lD MLKuGWY7zc4sifYue/LHnEkeOSXf2TXQ7iS5vaDmE0WiTDInpSJtwbZAgrv7waW/ti4l p2nCniKMKzhMaC/i8EBybJo3hSgJXepHCzHq65ddbEefh1qKpc6sVOhtCkhcjxjKepBB HsjqaC+EpNOr7lpB8WKcIeNlrqXY/zdHZvIyaq2SBKSr0GYCLDVJ/lGGZSalTZi9dDYW iN6w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=G7dMoR2q; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-81512-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81512-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id h18-20020ac85152000000b0042e7a3e4a03si3891482qtn.8.2024.02.26.05.43.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 05:43:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-81512-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=G7dMoR2q; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-81512-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81512-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 0DB971C28F3A for ; Mon, 26 Feb 2024 13:43:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B0BDE12D760; Mon, 26 Feb 2024 13:40:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="G7dMoR2q" Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) (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 DAF4F12C7E4; Mon, 26 Feb 2024 13:40:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708954829; cv=none; b=aGTlVeBnbS3PIiEkvxSIcM2v3sbg5MhrLFtydjK1I0qFwnooSnCU2rXB6nP8usSPyAeUua9lKfE/PaItv0uTi1mWW7/+Z6l5JVcbInsA7T+H/CHx2FVvUcw7qyI7x22NxOxE4M8lNK75blaxq5frd4V2Y6l2al9DpS2C6W0APZE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708954829; c=relaxed/simple; bh=Qcp2uc+UUo36BOh1LCqqElt85kVpuM5XT+lI8HhHyio=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=H7STlbK39D49cNWT2aZO9GO64UOhyrUpyQIveJ7YkAcuifsfaLZbJXIZ+EkNiFC4iA0+PPG+xgAWB9/7LVKcbs/3SU53SE58pcoVOcX59s3/U8n5UHwGUG/qDfipeg6Q28sHQBsEEm3BK2wjNUtBLAHho+C6INQFKZ2iNb0F1Uo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=G7dMoR2q; arc=none smtp.client-ip=217.70.183.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 05B4540014; Mon, 26 Feb 2024 13:40:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1708954826; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Fcclx+P2VRL5YyMqc19FLMrEZY/bn8QqcU/6ryhVROM=; b=G7dMoR2qBwS63OahwRkXlqHYdLodOK7yjI+jcyHar8mBDZi/O0lhyWSXmsvYgt/B2wG6L+ e5EkDYebvjB0GDiG7TCexvbpenahpUeNRmXEhen0Ggb4eLHz/1f6AMLZrNOTBNRbOIx2rv rqK2qy4YR5+HZo7+A6e+6Cwat4dv2aZmmpd2jJzuAG2iLbGMYP4yWH2eBFtDc2SskyO5JE 2LhtfDxAyHWLonvEqYjAskaXRAZsite7gFZP88CF2Blti9gMqntFnT2yGdvOq4RKV0vuQO JqEMx8952Vmj3kInv6uNgwYG1yAH8V8rAT+DjZUh7lao1tBHHmflYTHzS3zvXg== From: Kory Maincent Date: Mon, 26 Feb 2024 14:40:02 +0100 Subject: [PATCH net-next v9 11/13] net: macb: Convert to netdev_ptp_clock_register Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240226-feature_ptp_netnext-v9-11-455611549f21@bootlin.com> References: <20240226-feature_ptp_netnext-v9-0-455611549f21@bootlin.com> In-Reply-To: <20240226-feature_ptp_netnext-v9-0-455611549f21@bootlin.com> To: Florian Fainelli , Broadcom internal kernel review list , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , Radu Pirea , Jay Vosburgh , Andy Gospodarek , Nicolas Ferre , Claudiu Beznea , Willem de Bruijn , Jonathan Corbet , Horatiu Vultur , UNGLinuxDriver@microchip.com, Simon Horman , Vladimir Oltean Cc: Thomas Petazzoni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Maxime Chevallier , Rahul Rameshbabu , Kory Maincent X-Mailer: b4 0.12.4 X-GND-Sasl: kory.maincent@bootlin.com X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791969213105331989 X-GMAIL-MSGID: 1791969213105331989 The hardware registration clock for net device is now using netdev_ptp_clock_register to save the net_device pointer within the ptp clock xarray. Convert the macb driver to the new API. Signed-off-by: Kory Maincent --- Change in v8: - New patch --- drivers/net/ethernet/cadence/macb_ptp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/cadence/macb_ptp.c b/drivers/net/ethernet/cadence/macb_ptp.c index a63bf29c4fa8..50fa62a0ddc5 100644 --- a/drivers/net/ethernet/cadence/macb_ptp.c +++ b/drivers/net/ethernet/cadence/macb_ptp.c @@ -332,7 +332,7 @@ void gem_ptp_init(struct net_device *dev) bp->tsu_rate = bp->ptp_info->get_tsu_rate(bp); bp->ptp_clock_info.max_adj = bp->ptp_info->get_ptp_max_adj(); gem_ptp_init_timer(bp); - bp->ptp_clock = ptp_clock_register(&bp->ptp_clock_info, &dev->dev); + bp->ptp_clock = netdev_ptp_clock_register(&bp->ptp_clock_info, dev); if (IS_ERR(bp->ptp_clock)) { pr_err("ptp clock register failed: %ld\n", PTR_ERR(bp->ptp_clock));