Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp975063lqp; Fri, 22 Mar 2024 01:25:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWiDCvna0ssINLGUlUuaHXnUIw5N80ACxthFUvRtBnT0T9UAKv7ud4Z/txxr8kHTu3ZooMNp2WCZbYaF1z+Gm+PZ9Gi7wdemmC2YE7VlQ== X-Google-Smtp-Source: AGHT+IGcNyN/oCA0PmJQ1yYIiGQTDlf6aL20fNKIynatrcEc3oiWpsvxcnp+qcaBp2h80DEFaFdC X-Received: by 2002:a17:90a:1bc8:b0:29e:780:778 with SMTP id r8-20020a17090a1bc800b0029e07800778mr1458092pjr.47.1711095907574; Fri, 22 Mar 2024 01:25:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711095907; cv=pass; d=google.com; s=arc-20160816; b=WSI4nG+v3kfsYOEB0f6btyLw3HA7tuQ96ZCyc+A9EwAqVC3jRc0ZAfAZHjHxcLASW8 Gps+IYdvgDPYcthqVlNTq6lBXhs7cP7l22jzA/tD3g+loRD5shMx5pumVWhSmKBfRcKX Dz4alSGETz0DgUjHmlKeY19uIH6fUP/KXiqcoE8yS8MEYxZlTmK1T8Ex0hXq7CAQy/Iz D3eu283HuJzYGaZJA9aB42AkreZKW95Jo0lTZNj4UoNqbpUk5TFlDV/oXSnGPdPpsyWQ iEfr6HrljiqV+0K5rAl9YXl5TWsaeDtzixQNvk8oWIPco/iPeGKDuqgHUWqsTGd2lLaA 262Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=feedback-id:content-language:thread-index:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:subject:in-reply-to:references:cc:to:from; bh=iN458kriMTZAnmHMIIr4yCgt9oKNTmDhrAal3TUs70A=; fh=eOU4NvqV5rd8c5N/WP6ag7BmLPxD6MUXW0uqVVho8Xo=; b=w8IqVRFOWTYR5afm9DqWJeRg3l+xjSkVhAKos8QRL4h0+BGNgJymkK4KTiS1qEC5di 3a8fkZVd+DEuI8oN2rO6SLrsJZvPTeDi3vN+PwW0kLAmpMkp2r5o+qWmzt7zb/oAFvc0 pq/6JsP4hNPRpwA3b52pBbqFnsVcf8ytqKOUHlmBx6q4bFWbnX4RwgB2V7p4W+aDEObI CamVEsfJyhIFZSsgkqBg3jKu1qu/Nfv7nwgE/1u9MbrmJVCTFhI1oj+wT/LTH+/5wh3i hdHdDAlPx2oDTT/ArGyO2Ru6BbKYzk0NpyGJ4ndhNsdqqcsPRxTq7j21vY2Cg/CHCN8t GceA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=net-swift.com); spf=pass (google.com: domain of linux-kernel+bounces-111119-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111119-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id hg8-20020a17090b300800b0029dded337bdsi1572027pjb.165.2024.03.22.01.25.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Mar 2024 01:25:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-111119-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=net-swift.com); spf=pass (google.com: domain of linux-kernel+bounces-111119-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111119-linux.lists.archive=gmail.com@vger.kernel.org" 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 6A93CB23C8F for ; Fri, 22 Mar 2024 08:22:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EB3851756D; Fri, 22 Mar 2024 08:22:31 +0000 (UTC) Received: from bg1.exmail.qq.com (bg1.exmail.qq.com [114.132.124.171]) (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 42F67168CC; Fri, 22 Mar 2024 08:22:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=114.132.124.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711095751; cv=none; b=El0mWLgzCeYHJmLcYgPgjN5dPyna5duNw3t7a2SyB6mAQPFz+bcVmHucXp99sA9XeVlY0VDy0dKFI9d7FGAz/GMN2vm3jMRq7fncKjDzSBetQMAKhUE+4Hjr32DGG2p8WZpD7PVZjQfy8Ew8bfFCr8To9yuJRfMQzchAI44YQoc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711095751; c=relaxed/simple; bh=/JC9kH3/GXHoXGUSw1qcqJheDHHcI3KNF0aeQuH77fA=; h=From:To:Cc:References:In-Reply-To:Subject:Date:Message-ID: MIME-Version:Content-Type; b=DEqnz0Ekju8LM0/5cwY3/ukrTwIL2ooQQcOJ48cyhGe6xQTNN0ss2/aOttbwq+avPjVRj0JRfDzA/omnQd2aBf21ndzriflHl7KDyPkEfhSjJ2bPqdtU90RC1ziK8bL+JaAQeeI8aStGOp2h+TYdAtztR5tdbNb0XfietbdGVnw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=net-swift.com; spf=pass smtp.mailfrom=net-swift.com; arc=none smtp.client-ip=114.132.124.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=net-swift.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=net-swift.com X-QQ-mid:Yeas48t1711095605t408t26085 Received: from 73E00E8BC808433CB9DB281092DFBE6B (duanqiangwen@net-swift.com [183.159.169.46]) X-QQ-SSF:00400000000000F0FH4000000000000 From: duanqiangwen@net-swift.com X-BIZMAIL-ID: 11884217184907262476 To: "'Jiri Pirko'" Cc: , , , , , , , , , , , References: <20240322080416.470517-1-duanqiangwen@net-swift.com> In-Reply-To: Subject: RE: [PATCH net v5] net: txgbe: fix i2c dev name cannot match clkdev Date: Fri, 22 Mar 2024 16:20:04 +0800 Message-ID: <000001da7c31$be2330f0$3a6992d0$@net-swift.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQFwLs5rgYGClTpBePjvbYMXpqMxXgKXsSFcsgNHLUA= Content-Language: zh-cn X-QQ-SENDSIZE: 520 Feedback-ID: Yeas:net-swift.com:qybglogicsvrsz:qybglogicsvrsz3a-1 -----Original Message----- From: Jiri Pirko =20 Sent: 2024=C4=EA3=D4=C222=C8=D5 16:12 To: Duanqiang Wen Cc: netdev@vger.kernel.org; jiawenwu@trustnetic.com; mengyuanlou@net-swift.com; davem@davemloft.net; edumazet@google.com; kuba@kernel.org; pabeni@redhat.com; maciej.fijalkowski@intel.com; andrew@lunn.ch; wangxiongfeng2@huawei.com; linux-kernel@vger.kernel.org; michal.kubiak@intel.com Subject: Re: [PATCH net v5] net: txgbe: fix i2c dev name cannot match = clkdev Fri, Mar 22, 2024 at 09:04:16AM CET, duanqiangwen@net-swift.com wrote: >txgbe clkdev shortened clk_name, so i2c_dev info_name also need to=20 >shorten. Otherwise, i2c_dev cannot initialize clock. > >Change log: >v4-v5: address comments: > Jiri Pirko: > Well, since it is used in txgbe_phy.c, it should be probably > rather defined locally in txgbe_phy.c. Did you read Florian's comment? Please do. pw-bot: cr -------- I replied to Florian:=20 " I want to shorten "i2c_desginware" to "i2c_dw" in txgbe driver, so = other drivers which use "i2c_designware" need another patch to use a define. " Sorry, this email forgot to cc the mailing list. >v3->v4: address comments: > Jakub Kicinski: > No empty lines between Fixes and Signed-off... please. >v2->v3: address comments: > Jiawen Wu: > Please add the define in txgbe_type.h > >Fixes: e30cef001da2 ("net: txgbe: fix clk_name exceed MAX_DEV_ID=20 >limits") >Signed-off-by: Duanqiang Wen >--- > drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > >diff --git a/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c=20 >b/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c >index 5b5d5e4310d1..2fa511227eac 100644 >--- a/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c >+++ b/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c >@@ -20,6 +20,8 @@ > #include "txgbe_phy.h" > #include "txgbe_hw.h" >=20 >+#define TXGBE_I2C_CLK_DEV_NAME "i2c_dw" >+ > static int txgbe_swnodes_register(struct txgbe *txgbe) { > struct txgbe_nodes *nodes =3D &txgbe->nodes; @@ -571,8 +573,8 @@ static=20 >int txgbe_clock_register(struct txgbe *txgbe) > char clk_name[32]; > struct clk *clk; >=20 >- snprintf(clk_name, sizeof(clk_name), "i2c_dw.%d", >- pci_dev_id(pdev)); >+ snprintf(clk_name, sizeof(clk_name), "%s.%d", >+ TXGBE_I2C_CLK_DEV_NAME, pci_dev_id(pdev)); >=20 > clk =3D clk_register_fixed_rate(NULL, clk_name, NULL, 0, 156250000); > if (IS_ERR(clk)) >@@ -634,7 +636,7 @@ static int txgbe_i2c_register(struct txgbe *txgbe) >=20 > info.parent =3D &pdev->dev; > info.fwnode =3D software_node_fwnode(txgbe->nodes.group[SWNODE_I2C]); >- info.name =3D "i2c_designware"; >+ info.name =3D TXGBE_I2C_CLK_DEV_NAME; > info.id =3D pci_dev_id(pdev); >=20 > info.res =3D &DEFINE_RES_IRQ(pdev->irq); >-- >2.27.0 > > =20