Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp928307iog; Wed, 15 Jun 2022 15:57:00 -0700 (PDT) X-Google-Smtp-Source: AGRyM1torAK1r01fbY8QnTE3bHH//iya+H2wk8BD4YZnJUe93MLBG9tnVdwKGdLEfptuiS5ia0fs X-Received: by 2002:a17:906:6946:b0:70e:e904:8e87 with SMTP id c6-20020a170906694600b0070ee9048e87mr1857942ejs.629.1655333820459; Wed, 15 Jun 2022 15:57:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655333820; cv=none; d=google.com; s=arc-20160816; b=wjHvwHeBGKs3QCxaoUy6K3KiG42DdCDCvlVOaBKU9kPAGip3+viFTAkd8kip7B5B3k nBRg6PHiayHVV0syWaMvDtXLvMSCyUtWnQ+Yj0aXkg/8ruzCLspHe9L09Ee+Va3hAu9P ot+WoooaYdLQe5PTSU1XoslQZ88Cx5xVrHQC/Kpj7NCvHRYcgU+UzfetNTQ+ItT2TXJD 0qVzF6tjA6tFOli5hjwSorXcg4MBvW5fJ2Fen0aKgsN1JKbLUjEq9RAKP6d4IQbCY8fe f7+houDr4hkQFoLnrtV16iT709LoYduM64v2NFDd79r2EwFJZEb5aQkwfFxnbin4uRTw vQ6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=AareH3Xp+hp4A5FOtY4uNivgTY9OEK29GzGPxmxFOws=; b=ReaFL9YI6xVbcMDxOqMF9xjDaS0pX5E+P+g8RarWhXUyB6a9yTFzm7pj6WBOV8XSgT FO9drjRqNtmNr+rgiKzVzfJir2pzPdbal/8cgjH96jopGTmOeFO4Khou7Al+2bigRKGd tCo9+6xZqfLX7+nm01GKqefWz7H8yrg/gFwKD0VKJjZPr6F0dBw73JEtLPyCXCDudL1d YzsQxhilfSZHeMrfxnJd2XafHQ9Suer30J7VMjUncK7Nu+waxzkZbPj8i/MnKc5SdsJ/ aysjXj6cLP/jjUsrs+Aap/4kjkbUbe1TPhU2s8tX4BCOb+ga52ASa+9ma4i8yOxJwyyJ zD5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@pqrs.dk header.s=google header.b=kJzpPcYm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o13-20020a170906974d00b00718cce808fesi11166285ejy.486.2022.06.15.15.56.35; Wed, 15 Jun 2022 15:57:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@pqrs.dk header.s=google header.b=kJzpPcYm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350662AbiFOWvp (ORCPT + 99 others); Wed, 15 Jun 2022 18:51:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350488AbiFOWvi (ORCPT ); Wed, 15 Jun 2022 18:51:38 -0400 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C7555641D for ; Wed, 15 Jun 2022 15:51:35 -0700 (PDT) Received: by mail-ed1-x533.google.com with SMTP id cn20so5816817edb.6 for ; Wed, 15 Jun 2022 15:51:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pqrs.dk; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AareH3Xp+hp4A5FOtY4uNivgTY9OEK29GzGPxmxFOws=; b=kJzpPcYmcX7GoYd5tKK+ollj2PRhF8lAkiyS3JW/xsbBypPJ1S6pWA7AwYOH4o1NNk TxuMrtWli9kiluVbcbl0Si+CK0BVPyD7C/b4zxvVTjOe1bm7iLzSbYQ+c/ZealIYX91u 2BfBxNLumPg8ZjKobTSfjtIDMh1WL/1QFD7hM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AareH3Xp+hp4A5FOtY4uNivgTY9OEK29GzGPxmxFOws=; b=5MCDlX907o3iD9zcFEeM8zQJiUqWjMsbFAq9mhfCVoxazSxM7j+nSKhz9/2sHB1oaJ i7JvT8zm27cvxV04ur60CZA4FNpGKRm48ReE0PWyKPzKcDFMqE3rYsvUSfs8zu/OtVb6 3l8YAMvLY2IPLoWjR4j3Oao71fdUkg412LzM3ZBG1V5sQMxk2xLW3yypw//0yz2CuNNi oGZGmxnPYo8LQoXYurcSJMtfk66Ia44Q8doR2I/nAjjCLu6oH3pnMb0gIp5Q+PpKOFh2 nRSUgBVgdRJaByNkLzLqW1pTSwmn4gVwSvLuH+6ALWa139jx7hAC0pBRMz79kCl6PmPi 9Bug== X-Gm-Message-State: AJIora8yXEnIAU9lo3Kb+NmkhXx5X2+S4KKx+khfN5POVPBKRQIWz7kt 4F3stuM/0Pf6p/RrID+Gy70p9A== X-Received: by 2002:a05:6402:329b:b0:431:3143:5ced with SMTP id f27-20020a056402329b00b0043131435cedmr2648926eda.257.1655333493599; Wed, 15 Jun 2022 15:51:33 -0700 (PDT) Received: from localhost.localdomain (80.71.142.18.ipv4.parknet.dk. [80.71.142.18]) by smtp.gmail.com with ESMTPSA id h23-20020aa7c617000000b0042e21f8c412sm371506edq.42.2022.06.15.15.51.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jun 2022 15:51:33 -0700 (PDT) From: =?UTF-8?q?Alvin=20=C5=A0ipraga?= To: hauke@hauke-m.de, Linus Walleij , =?UTF-8?q?Alvin=20=C5=A0ipraga?= , Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Russell King Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next v3 4/5] net: dsa: realtek: rtl8365mb: remove learn_limit_max private data member Date: Thu, 16 Jun 2022 00:51:14 +0200 Message-Id: <20220615225116.432283-5-alvin@pqrs.dk> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220615225116.432283-1-alvin@pqrs.dk> References: <20220615225116.432283-1-alvin@pqrs.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alvin Šipraga The variable is just assigned the value of a macro, so it can be removed. Signed-off-by: Alvin Šipraga --- drivers/net/dsa/realtek/rtl8365mb.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/net/dsa/realtek/rtl8365mb.c b/drivers/net/dsa/realtek/rtl8365mb.c index 3599fa5d9f14..676b88798976 100644 --- a/drivers/net/dsa/realtek/rtl8365mb.c +++ b/drivers/net/dsa/realtek/rtl8365mb.c @@ -563,7 +563,6 @@ struct rtl8365mb_port { * @irq: registered IRQ or zero * @chip_id: chip identifier * @chip_ver: chip silicon revision - * @learn_limit_max: maximum number of L2 addresses the chip can learn * @cpu: CPU tagging and CPU port configuration for this chip * @mib_lock: prevent concurrent reads of MIB counters * @ports: per-port data @@ -577,7 +576,6 @@ struct rtl8365mb { int irq; u32 chip_id; u32 chip_ver; - u32 learn_limit_max; struct rtl8365mb_cpu cpu; struct mutex mib_lock; struct rtl8365mb_port ports[RTL8365MB_MAX_NUM_PORTS]; @@ -1088,15 +1086,13 @@ static void rtl8365mb_port_stp_state_set(struct dsa_switch *ds, int port, static int rtl8365mb_port_set_learning(struct realtek_priv *priv, int port, bool enable) { - struct rtl8365mb *mb = priv->chip_data; - /* Enable/disable learning by limiting the number of L2 addresses the * port can learn. Realtek documentation states that a limit of zero * disables learning. When enabling learning, set it to the chip's * maximum. */ return regmap_write(priv->map, RTL8365MB_LUT_PORT_LEARN_LIMIT_REG(port), - enable ? mb->learn_limit_max : 0); + enable ? RTL8365MB_LEARN_LIMIT_MAX : 0); } static int rtl8365mb_port_set_isolation(struct realtek_priv *priv, int port, @@ -2003,7 +1999,6 @@ static int rtl8365mb_detect(struct realtek_priv *priv) mb->priv = priv; mb->chip_id = chip_id; mb->chip_ver = chip_ver; - mb->learn_limit_max = RTL8365MB_LEARN_LIMIT_MAX; mb->jam_table = rtl8365mb_init_jam_8365mb_vc; mb->jam_size = ARRAY_SIZE(rtl8365mb_init_jam_8365mb_vc); -- 2.36.1