Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1559748lql; Wed, 13 Mar 2024 01:10:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWxLpc9ftE7slouvgO1mZZUEFKGqQmxepF1ali0yzT5nvrEOQ4jJKrDZAweXXIGhOmoM6af+XtTSc4MNrIj+N7luvFACN6YXRosvPHwYA== X-Google-Smtp-Source: AGHT+IGnNKsKeRkbU/N+REZkTTto65sjYxYof6HfRfpQ/NWL6ii05LAS1bMpB9ScAqoeWHOZbnLl X-Received: by 2002:a50:a41e:0:b0:567:737f:e90e with SMTP id u30-20020a50a41e000000b00567737fe90emr8103839edb.30.1710317454970; Wed, 13 Mar 2024 01:10:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710317454; cv=pass; d=google.com; s=arc-20160816; b=Sn3Uqu3rCbcVp4MbWfOh/t9VI8Juq8BrIOoiSdsUOtQFOA9e35XDs4NCrMC8P0J7Ue dAs0IjigWWFQaNsTUW9Hti3PQM7fiCy9NKBN3+HWJRUAmTHNOb2ZBIXMLv3iQjqsBxJE XBBP5IeBmuhijS+OncjShmRZswEY1dALPDV4lh3y0X3scoQdL5LkBOjpbw7DRjqoqTR2 8kC2B5YCFi+YFtMAnLotup9LxffyNb5CAmmtV+uh/wegc7S6q2IUrz/zj97fsdxudZ5i g7KobiHINCdLXKVVHtlWp3mKDIUze/iN+/85wz4qUzjXmgh8HY1URKeeoEm+5iNQukb4 3ctA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=feedback-id:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=9vT60Car6IVPGtteJlVFhEeqxt+K3llajYoqitvw5EI=; fh=TwGItHXyg1m1Yy+mpxL/ikOI947UEammZ0kBGklKm5Y=; b=G3B1N6a9nJCRxGDzeD8hKmRnabPDHRo+9Yj+oSXxNdl2PWHHcAJ1m1x640uHh/UxsT aUAk9OFtyDCPVzyAU2UxxMbtPId+7cYxxdYEQU26I6C84sOT4ZzBzFEsxm+8B+m2z9MU 0I3Z/p04nI88iiBZn7pIAf3qonyRT3mdr2dESZMtOsKns1iLKrzgA97ZXCw91YYnczr7 bkAQKDHohEs5ornFJg6P5JdgbW6ldalGPZEz6A3CkQY6n9jG7LKxqrtAp8phQknGMiK2 G1v++IQyypqGpej8wE+VJ98FXbe0k5iJM8y06lWTuMrFIbYOGfFuMvN7x4lsn7ABWMjh o7Cw==; 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-101201-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101201-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id g11-20020a056402320b00b005687488ac60si1226223eda.97.2024.03.13.01.10.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 01:10:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-101201-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=net-swift.com); spf=pass (google.com: domain of linux-kernel+bounces-101201-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101201-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 91DBC1F21FA2 for ; Wed, 13 Mar 2024 08:10:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DB4CB18EC3; Wed, 13 Mar 2024 08:10:44 +0000 (UTC) Received: from smtpbgeu1.qq.com (smtpbgeu1.qq.com [52.59.177.22]) (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 52BE91B267; Wed, 13 Mar 2024 08:10:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=52.59.177.22 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710317444; cv=none; b=JMYeT8HUgeOEWLDYmvk+UMc3VEC9xLM+LqxTeORSh+hIRJ8k4ZXI33LaVKEym7oiFrN338KkJsveJg8rG69JE+u4N66Ur/94XgkX0WSVUS37karsBGQgpJNMRlmaO/8Eu28Gb1PaT1Td6tMvYrVX1WWv3cDo+lLd8fwgtPKcqQA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710317444; c=relaxed/simple; bh=AO4gYrFR5YhIPMlUJJE2gkuMghCgvYBgRr0xsk9NSfM=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=DCdMpJ5EyTu0PaHzn6UD9m9Jzogql+N2d6MXKl2wMxxhpppIEQRNNytEFlabBhE4m/serg4YhI9ShrMMXISLKCpcoAIV56Jd53VVz95rSKMYPz216dB0ze2HVawO2lR45p8bMLaeJGMT08ZX4BnwvVdFYayFL+H5zy4jN4w+bAM= 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=52.59.177.22 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: bizesmtp87t1710317259tiv652if X-QQ-Originating-IP: 1vHP8eRVGrZlnDR2BorgL9IqCfsKxq2xqsWDaBZnZoQ= Received: from localhost.trustnetic.com ( [122.235.139.233]) by bizesmtp.qq.com (ESMTP) with id ; Wed, 13 Mar 2024 16:07:37 +0800 (CST) X-QQ-SSF: 01400000000000E0E000000A0000000 X-QQ-FEAT: CR3LFp2JE4n6i6hfLWy6jeqm55CI8Fwsjw6qaB7dOywOkPOXEED3zxN2HVRfE o5+YAj2XeQeJB3qeFidSUuBpseJKGz/yuMT2BazJ7/H8mCXXVEecLqx7WSYo1B5DaQj/5tJ O78cnoNSjZ3CHWvqNdILrVYkhAPhure7+uS45RHlVImfr46PUQrOBJA0+efeStWzyx8bSgg 5aQ/0v4KKTGTTbxiGvnYuzfp2nsAUTfnJXmxlVox9le5ZPFzfHWRJhkGzzfuoTDJb6xex15 4fr6bwsi0FUgE8ttBEIIPRIL9rrrF8lKbsdzZWDVLPXsw2iNJdG7SI6d1Tiw/2SmnFYuqpp AEHHgkiGFjI2JFiUbea3325N2/IXNw1PvU5B0PBGdGPNEwEOKD0MO6lV5kvv3waBAqA4Xtp WaLRXaPZwbgCx/U7zD+ssA== X-QQ-GoodBg: 2 X-BIZMAIL-ID: 17129813797246797824 From: Duanqiang Wen To: netdev@vger.kernel.org, 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 Cc: Duanqiang Wen Subject: [PATCH] net: txgbe: fix clk_name exceed MAX_DEV_ID limits Date: Wed, 13 Mar 2024 16:06:34 +0800 Message-Id: <20240313080634.459523-1-duanqiangwen@net-swift.com> X-Mailer: git-send-email 2.27.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:net-swift.com:qybglogicsvrsz:qybglogicsvrsz3a-1 txgbe register clk which name is i2c_designware.pci_dev_id(), clk_name will be stored in clk_lookup_alloc. If PCIe bus number is larger than 0x39, clk_name size will be larger than 20 bytes. It exceeds clk_lookup_alloc MAX_DEV_ID limits. So the driver shortened clk_name. Fixes: b63f20485e43 ("net: txgbe: Register fixed rate clock") Signed-off-by: Duanqiang Wen --- drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c b/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c index 93295916b1d2..5b5d5e4310d1 100644 --- a/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c +++ b/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c @@ -571,7 +571,7 @@ static int txgbe_clock_register(struct txgbe *txgbe) char clk_name[32]; struct clk *clk; - snprintf(clk_name, sizeof(clk_name), "i2c_designware.%d", + snprintf(clk_name, sizeof(clk_name), "i2c_dw.%d", pci_dev_id(pdev)); clk = clk_register_fixed_rate(NULL, clk_name, NULL, 0, 156250000); -- 2.27.0