Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp2341444rwr; Fri, 21 Apr 2023 07:39:46 -0700 (PDT) X-Google-Smtp-Source: AKy350ZwWbMvtRLcqF2vChv1GBYfOLBQLtSd98d05erfBOJb8W02+E5C9eUqKo1AGk0lPtO0HSgB X-Received: by 2002:a17:902:e811:b0:1a9:465c:6802 with SMTP id u17-20020a170902e81100b001a9465c6802mr3088067plg.5.1682087986256; Fri, 21 Apr 2023 07:39:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682087986; cv=none; d=google.com; s=arc-20160816; b=qe5LTsWxb2kUwZubfTKPscq9V4juYwPT8b3FegERTpLrWexXREMkWvps1OBxODSgtt 0X644EKRajOTVUEvmjHdijD8jUACsci7PWL7LsVcMp81+8jLlcCWaipvTY2pum/Ka2PV KX1wXF7lrIl/i7Oicv9MTufI9G/3Xyj+kr0Of+v2SAlxb4t8sHo1u7oxOklglij4fJqJ 1ya+M3voE7EHncaDqmBqqirLHHBMXmUFMQowM7doU8rsixTkroSsn87ETdq88P1C4ywc /Y7h4iiTC2i6Yf9Qizd/FSZpwS4rCEJ9t3pwlXMRv0YUP+5rw7o7h+OxDWsdo4P0PiWt caGQ== 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=GIUfI9zYtHK2jC08JSP+sw+iUpDI1NVNrxb5eq8tcPY=; b=a7AnJvUHnjbP+hEZR4/tQVxEi90iY8tN+L0u7NkdOPYnZ0kYcjW68Zd0o5yOwj4VDV DjDwCCwKP5bzPLBGEMxCY2HFxul550VgQsExLqH3PaxtO6YQ0DPwSb2X5C6m5XMnj4hw pZ2wQtd7M2CfKKRn+vyA+08IaMtJmmZ95VIkTFrEb6v6BPjPH2afCkncCXJqcwtFuHJf N9w5cTglY9P0TT5wBuu7ke5nBtD3BU0tksYOKbWVMkE0cUwgOCiTEL+6SIgFMJMzl5Ll 6XL8e+tus9X3CNe/qPD8fPXiOIK+f/V6vCqMkWQ0RNOfAxBsn12grzM7bb9MoqzxhiYA Wy9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=EljJWrJf; 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 ld15-20020a170902facf00b0019e8c3cd415si4243057plb.260.2023.04.21.07.39.32; Fri, 21 Apr 2023 07:39:46 -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=EljJWrJf; 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 S232916AbjDUOhr (ORCPT + 99 others); Fri, 21 Apr 2023 10:37:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232803AbjDUOhU (ORCPT ); Fri, 21 Apr 2023 10:37:20 -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 854D310DD; Fri, 21 Apr 2023 07:37:15 -0700 (PDT) Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-506b8c6bbdbso2564054a12.1; Fri, 21 Apr 2023 07:37:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682087835; x=1684679835; 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=GIUfI9zYtHK2jC08JSP+sw+iUpDI1NVNrxb5eq8tcPY=; b=EljJWrJfUjgKLFZf4IOQcisR2n+YvpKGILxQA0DY8LRAmGKjAkYxrBbV9zkWaEzEEZ ToBPIz31lbts9A6vbTHwyo2Qy1xfD+C+ZOxQHBmdmh9VggFiup2xf42NeV15y2/ZEZxz CFBeSREVfQk5ERVAUslmpDlkte6lEProXiA8Ysgf2iphfR4iFI3x4k9i6LS8xqNj43gw l51i+L6mswdX4zOPFozwD9GLu6Nci8Fpv4t57BW+80VWM4nygIVSjC8WmUnxvQwGeyVg H5IxkknOJ90pXzQ0w6PX0/AweMVWH8Z7YxNDwM+u0vX24vRWnU6L6z0QoKZtMtDhD9jn FWvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682087835; x=1684679835; 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=GIUfI9zYtHK2jC08JSP+sw+iUpDI1NVNrxb5eq8tcPY=; b=W00dq8GS3wgfK29ISk0WEEQ/rph3k9bFZTL1lJiq5/AP81j/VA5rLORYVC99l4EGqP MAqSV7nkfPp9F4Cpcw7U8nGEFGydiHEe7uUqKTPR9PTiVWj4rIymOiY/43m+accskQnU gaMi18M6rTW2+GOslfI3BHj15YZsd6YfYra/DGN0eF+zwyZRSRnd3lgdtXnsEjd70cYv P/mMyL39kWp8ERkt9WbyvqrWpaYbuqCOQVYWq0EL01Uuq3rmiy81I2L1pP0IGJxKnbJ0 +ITHs2E55XouT/hglZv3pXyDCA18TKTG6pBDN65ooynFTeMDAKtlYuPVYd5n+7exy9Mw xXtw== X-Gm-Message-State: AAQBX9djkrtEqcaqt7+sLS77UM8lfFqeLqMWdJKE2JvcnjwDHYt9sTlH YLdcL3nKYK+2+Z60hnXZmv0= X-Received: by 2002:a17:906:5d0:b0:94e:ef09:544c with SMTP id t16-20020a17090605d000b0094eef09544cmr2370576ejt.10.1682087834761; Fri, 21 Apr 2023 07:37:14 -0700 (PDT) Received: from arinc9-PC.lan ([149.91.1.15]) by smtp.gmail.com with ESMTPSA id q27-20020a170906361b00b0094e1026bc66sm2168244ejb.140.2023.04.21.07.37.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Apr 2023 07:37:14 -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 , 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: [RFC PATCH net-next 09/22] net: dsa: mt7530: empty default case on mt7530_setup_port5() Date: Fri, 21 Apr 2023 17:36:35 +0300 Message-Id: <20230421143648.87889-10-arinc.unal@arinc9.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230421143648.87889-1-arinc.unal@arinc9.com> References: <20230421143648.87889-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 2f670e512415..be143da94add 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