Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2851807rwd; Mon, 22 May 2023 05:25:59 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6wn+kElKpxzaxiDav66tpWt9Qw1uLVS8m7z676fyNlMiy3ezDEEezU7BkNZeVW9snDZO/Y X-Received: by 2002:a17:90a:628a:b0:24e:3c23:9654 with SMTP id d10-20020a17090a628a00b0024e3c239654mr10249698pjj.44.1684758358758; Mon, 22 May 2023 05:25:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684758358; cv=none; d=google.com; s=arc-20160816; b=ryVpmIx2RZvi5iu/zriT1RMrMwwDGSAtK3pmNFMGFid9IM/kSjaecLGksVLLGae23v ZseXDW1+fodXJmPt3xw38ecBjH7ADAI0DGQs2mVlEkTx9hSbcsE8PXobc0sCw+IO4Nhx MJymmqeLk9SW4CIjveLhp/GRGn5mpN9mVXHgTKjrtdYHIiVLII96znl+YDdQH7Lt6KoA m3yTr0LGgd5AL2ZHOc/7O93orrkVz+8zN8NJqc64eF2r8KAgGSahn/8os61POTTPWlhX kO/1NG/MXSsUtDNKQ9DHHhV91JXGyOGIPjMB/P7LKF+UR0kjg1rJ8c1yuPRuy6mmLsKr rkyA== 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=C/Tw7LJKMFy4PfANJoXoLwPDs0oFT2xt0A4+ifBliZA=; b=lOKLnjbQ6fQ19P14ElcNxrFnJCYryfr78b3UrMlHDg8wD2pEEilCyU4iJsGMlDD/qu Ckv2x/yYu+KSZZRy3Hf5M2Jj3OAIwL7Y8RQ1nm/pFU4DM3fV37KC2oXz1Hr7OpzPS/BC yj8EJgdEiZMtxX2V19csCIDj8pcBaqOuN1pdhHPqwxR9gtHDU319Bj/3WbAipKgMNODA TtLD3RNHVoATp8cR6eqt05jRCZOeUz0s7umHtA1GqWLubfJDfDtPXEtsr5AlU7Juo56L DIRxDa3L5LiFyVR/NMNzr2x3un0tCg2SFzC0ue3NlFH3u2+gq8ET6A6OG2vidGu05IQI BunQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=L82IXude; 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 60-20020a17090a09c200b00247ad11b6d3si4628843pjo.88.2023.05.22.05.25.43; Mon, 22 May 2023 05:25:58 -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=L82IXude; 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 S233802AbjEVMSZ (ORCPT + 99 others); Mon, 22 May 2023 08:18:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233854AbjEVMRm (ORCPT ); Mon, 22 May 2023 08:17:42 -0400 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69FB51BC7; Mon, 22 May 2023 05:16:33 -0700 (PDT) Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-96f588bc322so587512966b.1; Mon, 22 May 2023 05:16:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684757773; x=1687349773; 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=C/Tw7LJKMFy4PfANJoXoLwPDs0oFT2xt0A4+ifBliZA=; b=L82IXudeI6mBhpOZyX+3epgT5s/qYbgTVZ0c15cgRmJ4B8Qcq8HfmX7W1zl50r19J2 3lq5YNf54zk9Rhy5VQ2jXk1SZiK1DVOhDoVJPRpKL7VvefgV3GzaQuduX2g+Iu45J/10 LqiQo3mqh6r4CiR0pAfjqmA38ppuHeQhsHly8rO81WYC3b1YB2V/z0NdxredZoBq8wOO Xx6fP0d9TqQPxJiKuOMzeTbZd/HZRKmABNQQhew4UGBZrmFyXTdfNzIY6/Hfbt0T7jOd 40BlFvdlOP6edz+m2PY9udaqGODPJpXD1G1vd2f13sZl21xXDHYaRnW1BfvnrNJjjBdt /SFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684757773; x=1687349773; 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=C/Tw7LJKMFy4PfANJoXoLwPDs0oFT2xt0A4+ifBliZA=; b=LgoNpe9Co5UQUbntdBD+zZ3jLsCtyBKd7GeZZfNgm1oaAknTQB2E73WPuZje/czK76 l6AwF9kg6Nz2Uo75qIiozmgFk4FLKzNa29BrXDYBDQFf0Z6iRVqHQH4J91ZShwSAHsmq 4YzycPk6GXiibIVioGJ/AQt2oNHgWrPSQKm3mhQ71GfCklou0LIf4twT6U5udzGm4uD4 NqFDdYZXokytn5hOzeQkzo3oIYOGdZSkT10azPe2wwVOEFk9loQDStbXx9YDoAKc1xrc VDwPz1NjZVTHn/DpWVFdYzMzCXfvJQyTnApITfEV/c/ja5ft2GZnj3PKX4pgC2VQtsI4 kVPw== X-Gm-Message-State: AC+VfDyn7r3R3eINuWWJoaUwH6hWGKlUUr5PLMw2lTASYTGaIX/Q3yV8 ZDll+Q/sW4Nq8Wp01JKBHhY= X-Received: by 2002:a17:907:9629:b0:96f:8ea4:a72c with SMTP id gb41-20020a170907962900b0096f8ea4a72cmr9874454ejc.62.1684757773086; Mon, 22 May 2023 05:16:13 -0700 (PDT) Received: from arinc9-PC.. ([149.91.1.15]) by smtp.gmail.com with ESMTPSA id y26-20020a17090614da00b009659fed3612sm2999950ejc.24.2023.05.22.05.16.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 May 2023 05:16:12 -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, mithat.guner@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 09/30] net: dsa: mt7530: empty default case on mt7530_setup_port5() Date: Mon, 22 May 2023 15:15:11 +0300 Message-Id: <20230522121532.86610-10-arinc.unal@arinc9.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230522121532.86610-1-arinc.unal@arinc9.com> References: <20230522121532.86610-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 d837aa20968c..50f150ff481a 100644 --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c @@ -930,9 +930,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 */ @@ -962,7 +960,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.39.2