From patchwork Tue Apr 15 12:21:42 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Lai X-Patchwork-Id: 14052180 X-Patchwork-Delegate: kuba@kernel.org Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 531B32973B4; Tue, 15 Apr 2025 12:22:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.75.126.72 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744719757; cv=none; b=DukFPyUlzZZigLRGKFOuPhoKnolU9KDhdUDcNqI19YLcWoQ6livZzNm9vo+SqkiBi4DVmjcI+LVI7IHz+RRIYQTMDytX59hOSAfl/yoSKp1pkeZlY1cc+j66ina6gp6p7aEH1PbS6c5tZsZLeKBrrpKEmNJ6DxRafN9TUpzisZA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744719757; c=relaxed/simple; bh=zIn0km++2bJjxdtNcvt3p0b/gp8d2fo9+lm8abcL1Kk=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=nMqrx19d9Jg8rtx5J8Bp6+yHWFQWPs9vtMVSITJFOwpEe1AEoAdjtVC5Ou0qQ6YTpHjx5T8E1QbVjw/7onwTJAGDyDQ0PVisRWb7a57o+Oa0I0fa2uZRuk5VZOjMlI/2QRW8MrxiZwZOCrdsGuNaXs06c7Y226hJE089l0+xka8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=realtek.com; spf=pass smtp.mailfrom=realtek.com; dkim=temperror (0-bit key) header.d=realtek.com header.i=@realtek.com header.b=YtjLSxQe; arc=none smtp.client-ip=211.75.126.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=realtek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=realtek.com Authentication-Results: smtp.subspace.kernel.org; dkim=temperror (0-bit key) header.d=realtek.com header.i=@realtek.com header.b="YtjLSxQe" X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 53FCM5Vp81309599, This message is accepted by code: ctloc85258 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=realtek.com; s=dkim; t=1744719725; bh=zIn0km++2bJjxdtNcvt3p0b/gp8d2fo9+lm8abcL1Kk=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding:Content-Type; b=YtjLSxQeWbg9MZ/dQYiYBWDLSH0WfRJl9BckA9SAcXxwmP8mjvKT3zL+4mm7n6W0u OGaD3v5IElEQDyWQrKCofeRPuRX6/CRl2S07+YQKFatWOgdsY34zwwPz4nD177kDNM WytkUQzYuNKuz8AFOStN/N0LFaVX+UolvMX6rxg9U0G6qgUSWZUSm1KekrTzO3sHnr /KblF71VY1tWjEc1oNM+gWXw8LTRXCyjWbEfPkN/B0s259QbmwUIDGRuDt04ddysTf wFRcs9GelPDUxCwdBAvs/foxJFyF4h8VJcJ/00RNxnaFOZuzM0dNIcieHYeZY/NLQM wm+Se5nqjuqwQ== Received: from mail.realtek.com (rtexh36506.realtek.com.tw[172.21.6.27]) by rtits2.realtek.com.tw (8.15.2/3.06/5.92) with ESMTPS id 53FCM5Vp81309599 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 Apr 2025 20:22:05 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXH36506.realtek.com.tw (172.21.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 15 Apr 2025 20:22:05 +0800 Received: from RTDOMAIN (172.21.210.70) by RTEXMBS04.realtek.com.tw (172.21.6.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Tue, 15 Apr 2025 20:22:03 +0800 From: Justin Lai To: CC: , , , , , , , , , Justin Lai , "kernel test robot" Subject: [PATCH net 1/3] rtase: Fix the compile error reported by the kernel test robot Date: Tue, 15 Apr 2025 20:21:42 +0800 Message-ID: <20250415122144.8830-2-justinlai0215@realtek.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250415122144.8830-1-justinlai0215@realtek.com> References: <20250415122144.8830-1-justinlai0215@realtek.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: RTEXH36506.realtek.com.tw (172.21.6.27) To RTEXMBS04.realtek.com.tw (172.21.6.97) X-Patchwork-Delegate: kuba@kernel.org Fix the following compile error reported by the kernel test robot by modifying the condition used to detect overflow in rtase_calc_time_mitigation. In file included from include/linux/mdio.h:10:0, from drivers/net/ethernet/realtek/rtase/rtase_main.c:58: In function 'u16_encode_bits', inlined from 'rtase_calc_time_mitigation.constprop' at drivers/net/ ethernet/realtek/rtase/rtase_main.c:1915:13, inlined from 'rtase_init_software_variable.isra.41' at drivers/net/ ethernet/realtek/rtase/rtase_main.c:1961:13, inlined from 'rtase_init_one' at drivers/net/ethernet/realtek/ rtase/rtase_main.c:2111:2: >> include/linux/bitfield.h:178:3: error: call to '__field_overflow' declared with attribute error: value doesn't fit into mask __field_overflow(); \ ^~~~~~~~~~~~~~~~~~ include/linux/bitfield.h:198:2: note: in expansion of macro '____MAKE_OP' ____MAKE_OP(u##size,u##size,,) ^~~~~~~~~~~ include/linux/bitfield.h:200:1: note: in expansion of macro '__MAKE_OP' __MAKE_OP(16) ^~~~~~~~~ Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202503182158.nkAlbJWX-lkp@intel.com/ Fixes: a36e9f5cfe9e ("rtase: Add support for a pci table in this module") Signed-off-by: Justin Lai --- drivers/net/ethernet/realtek/rtase/rtase_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/realtek/rtase/rtase_main.c b/drivers/net/ethernet/realtek/rtase/rtase_main.c index 2aacc1996796..55b8d3666153 100644 --- a/drivers/net/ethernet/realtek/rtase/rtase_main.c +++ b/drivers/net/ethernet/realtek/rtase/rtase_main.c @@ -1925,8 +1925,8 @@ static u16 rtase_calc_time_mitigation(u32 time_us) time_us = min_t(int, time_us, RTASE_MITI_MAX_TIME); - msb = fls(time_us); - if (msb >= RTASE_MITI_COUNT_BIT_NUM) { + if (time_us > RTASE_MITI_TIME_COUNT_MASK) { + msb = fls(time_us); time_unit = msb - RTASE_MITI_COUNT_BIT_NUM; time_count = time_us >> (msb - RTASE_MITI_COUNT_BIT_NUM); } else { From patchwork Tue Apr 15 12:21:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Lai X-Patchwork-Id: 14052181 X-Patchwork-Delegate: kuba@kernel.org Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C8CA229E061; Tue, 15 Apr 2025 12:22:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.75.126.72 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744719763; cv=none; b=AA+6OLwZxjlwbfIrrauESmNjgt3QI0JJd9Cle5piVESmh0ttL3ziaKAGtfH1Fs4fPgJsGhUrwQtcTYU5vGAtIzgeiDMyZ4BAunv2S5UfAImJye8oRYWWz+W27JqptlhtRbejG3+smshRvlj5NQwnH1WWm3WnD42WJBmEgok8FEU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744719763; c=relaxed/simple; bh=D4eEpj/ycymL1dKwAiypTkZdxNwjEWty1bTxfH4ci8o=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=aMiGb8CdoTwWMVhQxxwww7jYwnvZMUdHEr7+USHcpPSxdXurie/tnyl8PdYA5rey3sjk26vCdLDTydkVdrOyAonHucP4vUac9wkGcjJ3rwYKBTcl5OprMEN+LlCBYQEyXLWnuo9X/7zVylU46n5xAlUrbeEH4k9ci503D9uOpmk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=realtek.com; spf=pass smtp.mailfrom=realtek.com; dkim=temperror (0-bit key) header.d=realtek.com header.i=@realtek.com header.b=rfcIg5br; arc=none smtp.client-ip=211.75.126.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=realtek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=realtek.com Authentication-Results: smtp.subspace.kernel.org; dkim=temperror (0-bit key) header.d=realtek.com header.i=@realtek.com header.b="rfcIg5br" X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 53FCMKelC1309616, This message is accepted by code: ctloc85258 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=realtek.com; s=dkim; t=1744719740; bh=D4eEpj/ycymL1dKwAiypTkZdxNwjEWty1bTxfH4ci8o=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding:Content-Type; b=rfcIg5briub8VqHwihOriwXxttbXBsaM3dve489uAcrhMssAgzlZvEwNQNEHhsjdP 5ceLkwSk+ocjPl1mN0pRjmVP3i4mvDG5Gb3fwgwr7A/lfU6fj8pNHTxVU5EXpNfYY/ uiI7RWiaYPNqas9L9VMv8Iv6Z4qqhuRkVtgFSPKDLqZIXGZiMpSxofViPu/aERkaOT ++9yTbuAQFKKLdMmsS5ByzMvLgWdsHwmMHcKD7+qHBFqTdOnx6RbGxDQ4UkRFrneUh aBT8gzSlG7SUdttW5KiVDN0KUAG/DaeMEmssmlFspol91D473UBzd/kBh7sDSeTyhX Fyj0Kuyp0X9HA== Received: from mail.realtek.com (rtexh36505.realtek.com.tw[172.21.6.25]) by rtits2.realtek.com.tw (8.15.2/3.06/5.92) with ESMTPS id 53FCMKelC1309616 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 Apr 2025 20:22:20 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXH36505.realtek.com.tw (172.21.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 15 Apr 2025 20:22:20 +0800 Received: from RTDOMAIN (172.21.210.70) by RTEXMBS04.realtek.com.tw (172.21.6.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Tue, 15 Apr 2025 20:22:14 +0800 From: Justin Lai To: CC: , , , , , , , , , Justin Lai , "kernel test robot" Subject: [PATCH net 2/3] rtase: Fix the compile warning reported by the kernel test robot Date: Tue, 15 Apr 2025 20:21:43 +0800 Message-ID: <20250415122144.8830-3-justinlai0215@realtek.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250415122144.8830-1-justinlai0215@realtek.com> References: <20250415122144.8830-1-justinlai0215@realtek.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: RTEXH36506.realtek.com.tw (172.21.6.27) To RTEXMBS04.realtek.com.tw (172.21.6.97) X-Patchwork-Delegate: kuba@kernel.org Fix the following compile warning reported by the kernel test robot by increasing the size of ivec->name. drivers/net/ethernet/realtek/rtase/rtase_main.c: In function 'rtase_open': >> drivers/net/ethernet/realtek/rtase/rtase_main.c:1117:52: warning: '%i' directive output may be truncated writing between 1 and 10 bytes into a region of size between 7 and 22 [-Wformat-truncation=] snprintf(ivec->name, sizeof(ivec->name), "%s_int%i", ^~ drivers/net/ethernet/realtek/rtase/rtase_main.c:1117:45: note: directive argument in the range [0, 2147483647] snprintf(ivec->name, sizeof(ivec->name), "%s_int%i", ^~~~~~~~~~ drivers/net/ethernet/realtek/rtase/rtase_main.c:1117:4: note: 'snprintf' output between 6 and 30 bytes into a destination of size 26 snprintf(ivec->name, sizeof(ivec->name), "%s_int%i", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ tp->dev->name, i); ~~~~~~~~~~~~~~~~~ Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202503182158.nkAlbJWX-lkp@intel.com/ Fixes: a36e9f5cfe9e ("rtase: Add support for a pci table in this module") Signed-off-by: Justin Lai --- drivers/net/ethernet/realtek/rtase/rtase.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/realtek/rtase/rtase.h b/drivers/net/ethernet/realtek/rtase/rtase.h index 2bbfcad613ab..1e63b5826da1 100644 --- a/drivers/net/ethernet/realtek/rtase/rtase.h +++ b/drivers/net/ethernet/realtek/rtase/rtase.h @@ -259,7 +259,7 @@ union rtase_rx_desc { #define RTASE_VLAN_TAG_MASK GENMASK(15, 0) #define RTASE_RX_PKT_SIZE_MASK GENMASK(13, 0) -#define RTASE_IVEC_NAME_SIZE (IFNAMSIZ + 10) +#define RTASE_IVEC_NAME_SIZE (IFNAMSIZ + 14) struct rtase_int_vector { struct rtase_private *tp;