Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2059760lqz; Tue, 2 Apr 2024 06:18:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVaXdRyuhr6a5NQTcLhzZGUQiTXqBRLZ+oPa2HIxpzKMjRXUxVCfBDLDU6NfxzMc+3sHLiQgyxAL2+v0ghceYISwh24o16MlY7/qCJKAA== X-Google-Smtp-Source: AGHT+IFzbUVXE4ydcpIAR5jL7qToPRdjcndzy6v1XA30wPpzjLotZq7QjdleYhpokNVvAFxCF9X8 X-Received: by 2002:a05:6a20:734f:b0:1a5:7307:e342 with SMTP id v15-20020a056a20734f00b001a57307e342mr19962340pzc.4.1712063889379; Tue, 02 Apr 2024 06:18:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712063889; cv=pass; d=google.com; s=arc-20160816; b=B00J0NOczqxLHfYtc0w/1RopKCyQTL3f4Dps7OkX15Dc53ltHfs8ObCsEFIrIR56Cj M38IUuTTaHA/K9J2FmXtI5x1Z3/B6VAJGf1A2f5nBf3G+1pseDKjvkXCXrsTNP/cRi+B 9twjGvq0iGxi9KwsvXhkcMl6EjlIF7FMaJ0/aV3VinRQeKwLu9ZZL4AID3oVAmdRivYu 0Bqa1/JEl//E1eBQNcK1Ua/+c+9KdJYf47Au/25UZZb4dHQttmxG3HenkkcRFH6Px00D gwskVih9MpRlDfsoupf9v2gD2uo9AlrwgzwUYaEL75+vKOJh8zvRFyMXvYfXJQEz1KDH IJxg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=9QxX8K9HHkJOoSM0+PwVrjh2cDHFPzZlf1C7qfwu/Ok=; fh=+wuPl0jVtcYGOKyQ4dCrYwpLO51Md4SLm1XlQV1l1VE=; b=W5f2BZGlwJGGvCAeGoCOCypNT9aWPtes4yvvJrme+Wn9tq7oCHrsg2iCf/JnMVmGHd BPiZwLVTsUKsIXe+2YY/Hf2HQhqv97uECpqTIE2fImn581XCLgbFTKr/rvVB3afzbWJ5 oMOR4TT1nOqL3fwAZoV3RTzZ8BtnfhpaTXftJ8BHp0d8G4Hh+gwNcMUiNSFRXkNJTciz ETW3TbI+e2/sDVB1+0Q8WE1SYFH9xAE3pxfq0LLgLpTMLO9sFCICFpGYyRKKX14E/+AJ Qls9IX00ENFc/nEdVdDlsdl00RiI/SQxmmTKlhXtXLxEAzFN8jomiAFc6wvcsmkW4/OW +iYg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-128016-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-128016-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id s20-20020a63af54000000b005dc85a7eb1dsi11216340pgo.299.2024.04.02.06.18.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 06:18:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-128016-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-128016-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-128016-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 0EE4A28A225 for ; Tue, 2 Apr 2024 13:15:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 756A085275; Tue, 2 Apr 2024 13:13:54 +0000 (UTC) Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (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 7B9C98062A for ; Tue, 2 Apr 2024 13:13:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712063633; cv=none; b=kM0mg2V/7QLoqu3tHsGHOXpoLS9RgUQDdihqNfCHh2lrlxIfAnk/fKQ5o9dOzdV9RgYKfbV/Dz5Z/kuHVAw5CRP8fFKUVwoK+aBmW9wlHkEtG3kCt9sb1KaGRQrCXXpr7nZCj+SEg2uVOjeUMEgwiElUiNJdYn7uKMhe53c9/Wo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712063633; c=relaxed/simple; bh=OCmAc0dU4f5Gke4kKPVWSsKvnUjZorH4TIhLd8GLc5s=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=UA4KuWZESsegIMyk3B63LLRZgTv6xBYUyqnDrYND+RoVnmz+Vck1aq5lydWCbGoQEB25JcwVCRhY9OYjf9XKaVsM9mEYk/nlYq0Z5E2t/zOq8bdDkjNXuFBKG3PM3xittEEWC77cAdj9SIOpXJrOMI7huYKPbbxQNnNWJNr8CPw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rrdxN-0007Nh-MW; Tue, 02 Apr 2024 15:13:41 +0200 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rrdxM-009zW1-ED; Tue, 02 Apr 2024 15:13:40 +0200 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rrdxM-006Oor-1B; Tue, 02 Apr 2024 15:13:40 +0200 From: Oleksij Rempel To: "David S. Miller" , Andrew Lunn , Eric Dumazet , Florian Fainelli , Jakub Kicinski , Paolo Abeni , Vladimir Oltean , Woojung Huh , Arun Ramadoss Cc: Oleksij Rempel , kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, UNGLinuxDriver@microchip.com, =?UTF-8?q?S=C3=B8ren=20Andersen?= Subject: [PATCH net-next v1 1/8] net: dsa: microchip: Remove unused FDB timestamp support in ksz8_r_dyn_mac_table() Date: Tue, 2 Apr 2024 15:13:32 +0200 Message-Id: <20240402131339.1525330-2-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240402131339.1525330-1-o.rempel@pengutronix.de> References: <20240402131339.1525330-1-o.rempel@pengutronix.de> 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-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org The FDB timestamps are not being utilized. This commit removes the unused timestamp support from ksz8_r_dyn_mac_table() function. Signed-off-by: Oleksij Rempel --- drivers/net/dsa/microchip/ksz8.h | 2 +- drivers/net/dsa/microchip/ksz8795.c | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/net/dsa/microchip/ksz8.h b/drivers/net/dsa/microchip/ksz8.h index 1a5225264e6a3..5b38cbb7b058b 100644 --- a/drivers/net/dsa/microchip/ksz8.h +++ b/drivers/net/dsa/microchip/ksz8.h @@ -20,7 +20,7 @@ void ksz8_port_setup(struct ksz_device *dev, int port, bool cpu_port); int ksz8_r_phy(struct ksz_device *dev, u16 phy, u16 reg, u16 *val); int ksz8_w_phy(struct ksz_device *dev, u16 phy, u16 reg, u16 val); int ksz8_r_dyn_mac_table(struct ksz_device *dev, u16 addr, u8 *mac_addr, - u8 *fid, u8 *src_port, u8 *timestamp, u16 *entries); + u8 *fid, u8 *src_port, u16 *entries); void ksz8_r_mib_cnt(struct ksz_device *dev, int port, u16 addr, u64 *cnt); void ksz8_r_mib_pkt(struct ksz_device *dev, int port, u16 addr, u64 *dropped, u64 *cnt); diff --git a/drivers/net/dsa/microchip/ksz8795.c b/drivers/net/dsa/microchip/ksz8795.c index 14923535ca7e8..f59a03e6981d2 100644 --- a/drivers/net/dsa/microchip/ksz8795.c +++ b/drivers/net/dsa/microchip/ksz8795.c @@ -409,7 +409,7 @@ static int ksz8_valid_dyn_entry(struct ksz_device *dev, u8 *data) } int ksz8_r_dyn_mac_table(struct ksz_device *dev, u16 addr, u8 *mac_addr, - u8 *fid, u8 *src_port, u8 *timestamp, u16 *entries) + u8 *fid, u8 *src_port, u16 *entries) { u32 data_hi, data_lo; const u8 *shifts; @@ -454,8 +454,6 @@ int ksz8_r_dyn_mac_table(struct ksz_device *dev, u16 addr, u8 *mac_addr, shifts[DYNAMIC_MAC_FID]; *src_port = (data_hi & masks[DYNAMIC_MAC_TABLE_SRC_PORT]) >> shifts[DYNAMIC_MAC_SRC_PORT]; - *timestamp = (data_hi & masks[DYNAMIC_MAC_TABLE_TIMESTAMP]) >> - shifts[DYNAMIC_MAC_TIMESTAMP]; mac_addr[5] = (u8)data_lo; mac_addr[4] = (u8)(data_lo >> 8); @@ -1196,14 +1194,13 @@ int ksz8_fdb_dump(struct ksz_device *dev, int port, int ret = 0; u16 i = 0; u16 entries = 0; - u8 timestamp = 0; u8 fid; u8 src_port; u8 mac[ETH_ALEN]; do { ret = ksz8_r_dyn_mac_table(dev, i, mac, &fid, &src_port, - ×tamp, &entries); + &entries); if (!ret && port == src_port) { ret = cb(mac, fid, false, data); if (ret) -- 2.39.2