Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6657701rwr; Tue, 25 Apr 2023 01:32:47 -0700 (PDT) X-Google-Smtp-Source: AKy350bj28BZE6Cq5wi0N8B1aEMzypyPtHVGgWrQiCoj9AlimScfhDwDzuagWQRfX6gPPefQ+BG2 X-Received: by 2002:a17:902:ec86:b0:1a9:5674:282e with SMTP id x6-20020a170902ec8600b001a95674282emr14466735plg.14.1682411567366; Tue, 25 Apr 2023 01:32:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682411567; cv=none; d=google.com; s=arc-20160816; b=TalBRuZIXIwsbYeZLteL9p+ePYMzfilrS9mDnOP7A/tTFPXFwXPc89xQ4wbR7L/Huv bQ41HPKYwH4QNT6M+yO+VBy4t4JyQaXGrlot963Vm4N4qGPgWriiP+MsLW5btEa+7W5G pEEKRxYRv+lFOB3GA07t/tutH/JRHQWDrZD4yPWip2oRwwcKy1OSDjjuoOAgZkn06xtn BSVef6AwU5z3GTRjlR9/B/g5RJ1+TVM2aRwxoiaAsp9aSTbQ5yJxxAT9Se5XjulPUlFR 6Dby5Ve8lsaSg1Q1fz52w5565Ax1ynyYSYUAlAEFlre9UNtL8qwga2jK6xARCXCfwRCg S0lg== 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=vU6wfq3kMO/C39pPAHFIW3WITZNrGxeZCJhmPURxHOM=; b=Mr5pUaywTVvgbAZc8SITrNAaObi3Vub14W59cBV9akUTd557lAn2Nj/ceo9EK7o5ve vzzFaQsuZ/VIubcUusqcg9ad4w/hhflLkKx8+89M1Vc4Fa4zdybEPsq/GfNFJV5TpV7l r6+lf5xetFx+FvqbCGm/jWi27Fk4cpm6qFQKq2EV5rAhCgBMdxQq2dcfe0v3HkeKVovC uNpCrvdtOPfcUQiGPKhHY/f2HwtreNMvnr891F9MrQFptl4F+k6O2wx4cInnmgHFO8tM qqrAtt3N3Oe5d1vwCP7QdkHkGWmBYqGE3tbycMnIR+naHonh4q+8BVZuOOChmbVFTrCq 3GMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=l4W4psed; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y15-20020a17090322cf00b001a52db202c7si9664156plg.382.2023.04.25.01.32.36; Tue, 25 Apr 2023 01:32:47 -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=pass header.i=@gmail.com header.s=20221208 header.b=l4W4psed; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233750AbjDYIb6 (ORCPT + 99 others); Tue, 25 Apr 2023 04:31:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233749AbjDYIbF (ORCPT ); Tue, 25 Apr 2023 04:31:05 -0400 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81437CC20; Tue, 25 Apr 2023 01:30:24 -0700 (PDT) Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-94f0dd117dcso784089366b.3; Tue, 25 Apr 2023 01:30:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682411416; x=1685003416; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=vU6wfq3kMO/C39pPAHFIW3WITZNrGxeZCJhmPURxHOM=; b=l4W4psed/okE2858F1jwOoceAvDESB+rcNaUOGKKXHvoskGS4Vq09ejJ7IrKBRQWmp 3AXERUtGJdxtEFj7UUwW2lN1GeQ3IOrm5tYgRfYIhynei3DQKyvfAXdcnARB21aBQNyW W3nh4Swn8RZ733hf/ImtT058oskznYZyBXxZPO1wlwinYpSW34Buo7Zhofe3Ee2OTlX+ zma9fGshWqVMvc7RkJtN5EFDIfV8B5VlVTbDfBH1gxpEErTWP/rfqp6RnUPPdjwzOvdg 96ItPnBbH6hYTGj/MOSKC3nNyEWF2pxCVPmzhIz0AawoKvwkJ8Pyjj1PbtPhgDqMmUPz GyAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682411416; x=1685003416; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vU6wfq3kMO/C39pPAHFIW3WITZNrGxeZCJhmPURxHOM=; b=dfba5WyM6ybvkSX2iZqVLd71nfB6RbfjQp/26MLPsk4+9AbSU0Bz3sdcGpdjDoNCZv 0m8OIfhc4TVtvXFP+Pwp9IeKD2hXw0XlJizzDMTuWWzjIZp7xw2jdt6esae/Ykqi7Qef R00ChUjuc5pmt9MtmM+bxWE+a4YD/WbGDn1TS1pAV9mmkgduN4KM5rVLoLlgxxFT202b De69bFo7oz/BMCCemUdCjyC89uTYHsikm+Pj0h5AeIjrtxxFCmNz7WUaiwqgEdCfAAmU ZC/LKAEJtEDE9ZH6N0I0iq9xNljDSsGOiQEdVbcNrU1GHFqsMp4v+Rnlyc+WsT6d1jwo pgsw== X-Gm-Message-State: AAQBX9ev/PYTcIQCKbMzdnQO6yz8HVZ/lACT28+plEe31Hxpha76gR+i z8OtLh4rANR8gW+YLbyMCTs= X-Received: by 2002:a17:906:ecb7:b0:933:3a22:8513 with SMTP id qh23-20020a170906ecb700b009333a228513mr13189142ejb.53.1682411415866; Tue, 25 Apr 2023 01:30:15 -0700 (PDT) Received: from arinc9-PC.lan ([149.91.1.15]) by smtp.gmail.com with ESMTPSA id mc2-20020a170906eb4200b0094ca077c985sm6439028ejb.213.2023.04.25.01.30.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Apr 2023 01:30:15 -0700 (PDT) From: arinc9.unal@gmail.com X-Google-Original-From: arinc.unal@arinc9.com To: Sean Wang , Landen Chao , DENG Qingfang , Daniel Golle , Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , Russell King Cc: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= , Richard van Schagen , Richard van Schagen , Frank Wunderlich , Bartel Eerdekens , erkin.bozoglu@xeront.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH net-next 10/24] net: dsa: mt7530: empty default case on mt7530_setup_port5() Date: Tue, 25 Apr 2023 11:29:19 +0300 Message-Id: <20230425082933.84654-11-arinc.unal@arinc9.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230425082933.84654-1-arinc.unal@arinc9.com> References: <20230425082933.84654-1-arinc.unal@arinc9.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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: Arınç ÜNAL There're two code paths for setting up port 5: mt7530_setup() -> mt7530_setup_port5() mt753x_phylink_mac_config() -> mt753x_mac_config() -> mt7530_mac_config() -> mt7530_setup_port5() On the first code path, priv->p5_intf_sel is either set to P5_INTF_SEL_PHY_P0 or P5_INTF_SEL_PHY_P4 when mt7530_setup_port5() is run. On the second code path, priv->p5_intf_sel is set to P5_INTF_SEL_GMAC5 when mt7530_setup_port5() is run. Empty the default case which will never run but is needed nonetheless to handle all the remaining enumeration values. Tested-by: Arınç ÜNAL Signed-off-by: Arınç ÜNAL --- drivers/net/dsa/mt7530.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c index aab9ebb54d7d..b3db68d6939a 100644 --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c @@ -933,9 +933,7 @@ static void mt7530_setup_port5(struct dsa_switch *ds, phy_interface_t interface) val &= ~MHWTRAP_P5_DIS; break; default: - dev_err(ds->dev, "Unsupported p5_intf_sel %d\n", - priv->p5_intf_sel); - goto unlock_exit; + break; } /* Setup RGMII settings */ @@ -965,7 +963,6 @@ static void mt7530_setup_port5(struct dsa_switch *ds, phy_interface_t interface) dev_dbg(ds->dev, "Setup P5, HWTRAP=0x%x, intf_sel=%s, phy-mode=%s\n", val, p5_intf_modes(priv->p5_intf_sel), phy_modes(interface)); -unlock_exit: mutex_unlock(&priv->reg_mutex); } -- 2.37.2