Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp6256572rwb; Wed, 18 Jan 2023 03:10:42 -0800 (PST) X-Google-Smtp-Source: AMrXdXtU4MIye7D1w8pgdSoZYRZnmlc/IF7YtzZDnnZC5ukLiBJEAtUG8uMDlJ5OXVWM2s5oyZgv X-Received: by 2002:a05:6a00:2191:b0:581:19ed:78b9 with SMTP id h17-20020a056a00219100b0058119ed78b9mr9195400pfi.2.1674040242577; Wed, 18 Jan 2023 03:10:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674040242; cv=none; d=google.com; s=arc-20160816; b=aimLkzbRq50BqQmgyJGghEaI1F8cv/IyOYy1+XWKlrnvIAMkp1ouLonl9fXHUkX8zc xRWOYkR0zAIoukdKq5YjbXikkUmmqwcImJw/81XgWZIqCmZA5XMQBiIhsxPfYF5Nx/PO cIZ0LiJFxeDLP90O+nPHzHfPBqbL/4DhFtaK4QPxLOzxUakt1lbEA/lRo+XAoEvou+3l 0OAK5fB/HqvyHUfMhdwb/3kaXaowuPA4/AWI7otji755Qi8CviT3rhmi4EZw+apeXhk5 4b0yyDV/iXIoZZ2+TKqjr3xc4eK8Z5tdIkYHmKdYyTugwP65gvgi7lq4h6YSrTIBE1lU KTrA== 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=tOu3X/Y5UqLfqUKfSCarygyAI2ez5qOQZgljlzsN2dM=; b=QX8g//3aHPFMb7QPuPKq08GedxXIkgbgj9w6t5+rL4mpkvHJ+KtH5+e8GBM7qbydZu 3tVncbVTR9qoy0SgDUetY0zGfG5L5fUlDnDnlBz18RLfHtOZAMVRDDAn4hNXtvty7j24 W9UEJaXSkTNBGprWFczsl3YzCUPje/Mdy8trdqVVW5EsgrCpgzRBeObH/tOxilEFgQQS np5eJlZejMzK3pdIHXLmS4uqsONhNF+LKLTM8EPBHqkHlKGLVN+70afzmnMfV8wWlIJI 9mJlwtgVjXNfbxxQtfC+E7DBYkNE9p55DRSJvNEh95PD08j6BYomQY2v2t99MYz/cGb4 cn4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=jpzYhU+M; 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 y3-20020aa79423000000b0058bb748aec7si16635810pfo.316.2023.01.18.03.10.35; Wed, 18 Jan 2023 03:10:42 -0800 (PST) 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=jpzYhU+M; 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 S229694AbjARKvQ (ORCPT + 45 others); Wed, 18 Jan 2023 05:51:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230146AbjARKse (ORCPT ); Wed, 18 Jan 2023 05:48:34 -0500 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEDA130B09; Wed, 18 Jan 2023 01:55:03 -0800 (PST) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 30I9smjW007317; Wed, 18 Jan 2023 03:54:48 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1674035688; bh=tOu3X/Y5UqLfqUKfSCarygyAI2ez5qOQZgljlzsN2dM=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=jpzYhU+MBBKgesP0A+UNyQycaJHVCWcz18zPkwhDIXYFMT+UwboMk9EiND0ReEDGk Ky3cJIpJBu0d1grmlmfETUwLbUcxOr06bEDlTJToLoB6S5WKSxensWGFph9ivDYh+T zVLRhOt8itllTGw8stZicyAMiypCKgXgTj+3dlcE= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 30I9sm5u061660 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 18 Jan 2023 03:54:48 -0600 Received: from DLEE112.ent.ti.com (157.170.170.23) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Wed, 18 Jan 2023 03:54:47 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE112.ent.ti.com (157.170.170.23) 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; Wed, 18 Jan 2023 03:54:47 -0600 Received: from uda0492258.dhcp.ti.com (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 30I9se8g107670; Wed, 18 Jan 2023 03:54:44 -0600 From: Siddharth Vadapalli To: , , , , , , CC: , , , , , Subject: [PATCH net-next v3 1/2] net: ethernet: ti: am65-cpsw: Delete unreachable error handling code Date: Wed, 18 Jan 2023 15:24:38 +0530 Message-ID: <20230118095439.114222-2-s-vadapalli@ti.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230118095439.114222-1-s-vadapalli@ti.com> References: <20230118095439.114222-1-s-vadapalli@ti.com> 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=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS 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 The am65_cpts_create() function returns -EOPNOTSUPP only when the config "CONFIG_TI_K3_AM65_CPTS" is disabled. Also, in the am65_cpsw_init_cpts() function, am65_cpts_create() can only be invoked if the config "CONFIG_TI_K3_AM65_CPTS" is enabled. Thus, the error handling code for the case in which the return value of am65_cpts_create() is -EOPNOTSUPP, is unreachable. Hence delete it. Reported-by: Leon Romanovsky Signed-off-by: Siddharth Vadapalli --- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c index 5cac98284184..7363e01e7579 100644 --- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c +++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c @@ -1935,11 +1935,6 @@ static int am65_cpsw_init_cpts(struct am65_cpsw_common *common) int ret = PTR_ERR(cpts); of_node_put(node); - if (ret == -EOPNOTSUPP) { - dev_info(dev, "cpts disabled\n"); - return 0; - } - dev_err(dev, "cpts create err %d\n", ret); return ret; } -- 2.25.1