From patchwork Thu Nov 17 15:07:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lu Wei X-Patchwork-Id: 21673 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp420187wrr; Thu, 17 Nov 2022 06:11:11 -0800 (PST) X-Google-Smtp-Source: AA0mqf53tBgedqcp6cl/LlFOCgPOxQcI/Q97wb62Ch/4SRKNYKm70Q99AAbeN/2llhfjoB6lSuaf X-Received: by 2002:a17:907:c70a:b0:7ad:d6c6:eb7c with SMTP id ty10-20020a170907c70a00b007add6c6eb7cmr2254734ejc.249.1668694271052; Thu, 17 Nov 2022 06:11:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668694271; cv=none; d=google.com; s=arc-20160816; b=u/l8kteplaJDdgPsIxCBrI8x5Czn2BnNT13tOmtK6CPqnAPUBzxcesodkDHahkR3qS nckNE+ewwq30QB6OZZNDnw7BB4CELupAdWx8OWKSG4rNuo2oSDwco6Wrt7VcNTnmgYFR MpyV1wNDrG3pGV0K0aHP/KlTvgoddzqAmmgZ1g3gxPvUuVhTIwZgtQfWwdi3/UUA1rU4 tuRZeU5J8Vl64DXeIMlZJpeMSLhsrD5L8fHtdqB0dlDWudyD5bFrBgqCvv9pUQlJzz2g bDH+oN8KcI3bMyqst28Tn28ihUOVTXgTpjztJuvN2B+Y/ouAuGTm5dUE+2VhablBzx+G GVnw== 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:to:from; bh=AggziuvtZnQHtsTAIFjSHInNNpPvMJYJnwFyudN05GI=; b=lkFxEy980uSQR1dmnR8sYIw/X/50fO9h8SyJxkfOECAB/G0sqfb5IW+Rari6qyzU4G fR80S732+OCsYn4YjdSwtUFU/2lx18WRdLjNPERDHGLkdGl78G37CNo2wbUbEJMVfMqZ q6D3Jsfkq+9PlA1umV6F85aCo4foHZ9jC+AvgDbK7uZabN3qyqoCws7Vot2J6yXoI5uG u//veVSjBvWpNzNRAiMsDeMogm5sPwjFi2WtbWq2MWBuco/yQmyfXeU/irny06eYy6d/ nAJXVnvnM3td5mkUvnoJL6Ed28cmYElo4Yv0u3KZ8uDHGI5sr+Jqy2i0/QNn6Kh55wTT FAsQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ht21-20020a170907609500b007b299050723si706921ejc.410.2022.11.17.06.10.47; Thu, 17 Nov 2022 06:11:11 -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; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239767AbiKQOCn (ORCPT + 99 others); Thu, 17 Nov 2022 09:02:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234629AbiKQOCl (ORCPT ); Thu, 17 Nov 2022 09:02:41 -0500 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 889DA4093E; Thu, 17 Nov 2022 06:02:40 -0800 (PST) Received: from kwepemi500015.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4NChS842jpzRpFX; Thu, 17 Nov 2022 22:02:16 +0800 (CST) Received: from huawei.com (10.175.101.6) by kwepemi500015.china.huawei.com (7.221.188.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 17 Nov 2022 22:02:37 +0800 From: Lu Wei To: , , , , , , , , , , Subject: [patch net] net: microchip: sparx5: Fix return value in sparx5_tc_setup_qdisc_ets() Date: Thu, 17 Nov 2022 23:07:22 +0800 Message-ID: <20221117150722.2909271-1-luwei32@huawei.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Originating-IP: [10.175.101.6] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemi500015.china.huawei.com (7.221.188.92) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749752763904361092?= X-GMAIL-MSGID: =?utf-8?q?1749752763904361092?= Function sparx5_tc_setup_qdisc_ets() always returns negative value because it return -EOPNOTSUPP in the end. This patch returns the rersult of sparx5_tc_ets_add() and sparx5_tc_ets_del() directly. Fixes: 211225428d65 ("net: microchip: sparx5: add support for offloading ets qdisc") Signed-off-by: Lu Wei Reviewed-by: Daniel Machon --- drivers/net/ethernet/microchip/sparx5/sparx5_tc.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_tc.c b/drivers/net/ethernet/microchip/sparx5/sparx5_tc.c index e05429c751ee..dc2c3756e3a2 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_tc.c +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_tc.c @@ -90,13 +90,10 @@ static int sparx5_tc_setup_qdisc_ets(struct net_device *ndev, } } - sparx5_tc_ets_add(port, params); - break; + return sparx5_tc_ets_add(port, params); case TC_ETS_DESTROY: - sparx5_tc_ets_del(port); - - break; + return sparx5_tc_ets_del(port); case TC_ETS_GRAFT: return -EOPNOTSUPP;