Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4289654rwl; Mon, 3 Apr 2023 02:48:15 -0700 (PDT) X-Google-Smtp-Source: AKy350bOV2VfbpbyiAEizN5zn6ZJhuM7XXLkKg4TbkrUzXgFsQffcchkJWzWduOjVQtToJcfbq9P X-Received: by 2002:a50:ee04:0:b0:4ad:738b:6706 with SMTP id g4-20020a50ee04000000b004ad738b6706mr17262429eds.2.1680515294974; Mon, 03 Apr 2023 02:48:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680515294; cv=none; d=google.com; s=arc-20160816; b=xgLc6M17pZIVHMQK9JxTFswHLBYoWrIurZVpEfeQbTOFPGVMIsFJRoAy+9z4+GnB8Q d+C7zCzEFBDMhWd49dh32JoTxVyj8qhjWIjqrwKa9UhCMgW0N/Q1N51//WOEhcEw5XOC KrJv8qgqWU3g/lYmEwd9DAXzYh8TdSELpUyDUltaGHmDOw01HyXWeDOOBCBUKxoE9mJS DCGj6UgHAV5Y0WmAokju5pLR1aFC8NTyF/xhwVuwiLM1pfemLSZ9aW+rEJtZcg2ch5kY ikHhgCzysK89ZBgGyYZubI1k3gPzVTxNAe/FFSJs90dbpQE/A7HSCodDFA2tX+lEVXLV qT5Q== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=Rm/llBoGWp5ffCljOTXVOPt7tOqpycYvTpWxArdeVzg=; b=tXV2QO+XYDBNhi0sgNJxqC7EaRapOvJq74Imr6H8t+A8jkHhlIFqGsipM2ELE3xfpz 7PmVnOc5ROLDlwAbpxhxEmAH82IgMG/raQ8UhVGMb7Z+H+QXfnXuAlDe9+Czn8sRHiPf CsBQhuwhzQQqRMH/zYDlO2RS84wa3LGdDTBWlqAY7HC8K1sKrHVPw0pnXe/9mbBSOTwb EnF/txKOq7+C8DUueEqFiw8vKmN8+YI0dHkBAtv29iLmy8WUYLFMxNclgguW+q8bbEsd g+xYo/kSr1haW13CtzTR1BlAy+dPkPOgxq46EjYaAnXZcwzxqN4jfqoYbQ8alT5DKno/ HGag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ZcY638Ik; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j23-20020aa7c417000000b004fe903cef94si4595944edq.24.2023.04.03.02.47.51; Mon, 03 Apr 2023 02:48:14 -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=@ti.com header.s=ti-com-17Q1 header.b=ZcY638Ik; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232346AbjDCJrX (ORCPT + 99 others); Mon, 3 Apr 2023 05:47:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232244AbjDCJrB (ORCPT ); Mon, 3 Apr 2023 05:47:01 -0400 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E4BC1206F for ; Mon, 3 Apr 2023 02:46:23 -0700 (PDT) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 3339jt9d060131; Mon, 3 Apr 2023 04:45:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1680515155; bh=Rm/llBoGWp5ffCljOTXVOPt7tOqpycYvTpWxArdeVzg=; h=From:To:CC:Subject:Date; b=ZcY638IkZzznWM9yQWrg+ni1xdvZ2a/Jgw1p3hBrtBB1zvH6dI6NZCjgQMi4Q+RgP /JjSHKixWExoo5WupTRmPiQjJiQTFHqZfnIng5/fV9sFG+QuQfTvHHwdlqttLLJRNB 5P8QXXAAbi5Yb/byqwRYtKk8xF2VykXRgZPgoag4= Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 3339jtwa118730 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 3 Apr 2023 04:45:55 -0500 Received: from DFLE109.ent.ti.com (10.64.6.30) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Mon, 3 Apr 2023 04:45:55 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Mon, 3 Apr 2023 04:45:55 -0500 Received: from uda0492258.dhcp.ti.com (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 3339jq9L012694; Mon, 3 Apr 2023 04:45:53 -0500 From: Siddharth Vadapalli To: , , CC: , , , , , Subject: [PATCH] phy: ti: j721e-wiz: Fix unreachable code in wiz_mode_select() Date: Mon, 3 Apr 2023 15:15:52 +0530 Message-ID: <20230403094552.929108-1-s-vadapalli@ti.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, SPF_PASS autolearn=unavailable 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 In the wiz_mode_select() function, the configuration performed for PHY_TYPE_USXGMII is unreachable. Fix it. Fixes: b64a85fb8f53 ("phy: ti: phy-j721e-wiz.c: Add usxgmii support in wiz driver") Signed-off-by: Siddharth Vadapalli --- drivers/phy/ti/phy-j721e-wiz.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/phy/ti/phy-j721e-wiz.c b/drivers/phy/ti/phy-j721e-wiz.c index 1b83c98a78f0..1b5f1a5e2b3b 100644 --- a/drivers/phy/ti/phy-j721e-wiz.c +++ b/drivers/phy/ti/phy-j721e-wiz.c @@ -443,18 +443,17 @@ static int wiz_mode_select(struct wiz *wiz) int i; for (i = 0; i < num_lanes; i++) { - if (wiz->lane_phy_type[i] == PHY_TYPE_DP) + if (wiz->lane_phy_type[i] == PHY_TYPE_DP) { mode = LANE_MODE_GEN1; - else if (wiz->lane_phy_type[i] == PHY_TYPE_QSGMII) + } else if (wiz->lane_phy_type[i] == PHY_TYPE_QSGMII) { mode = LANE_MODE_GEN2; - else - continue; - - if (wiz->lane_phy_type[i] == PHY_TYPE_USXGMII) { + } else if (wiz->lane_phy_type[i] == PHY_TYPE_USXGMII) { ret = regmap_field_write(wiz->p0_mac_src_sel[i], 0x3); ret = regmap_field_write(wiz->p0_rxfclk_sel[i], 0x3); ret = regmap_field_write(wiz->p0_refclk_sel[i], 0x3); mode = LANE_MODE_GEN1; + } else { + continue; } ret = regmap_field_write(wiz->p_standard_mode[i], mode); -- 2.25.1