From patchwork Wed Nov 2 13:50:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: zhang.songyi@zte.com.cn X-Patchwork-Id: 14241 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp3636157wru; Wed, 2 Nov 2022 07:01:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4hpH1j3odN73QFCYJCGnPsuDUJipU5dSY9x2Cgd5J0Hdk7bCPL+DN5WUZYqSsBrnJh8bi/ X-Received: by 2002:a17:907:1b1c:b0:72f:9aac:ee41 with SMTP id mp28-20020a1709071b1c00b0072f9aacee41mr23551483ejc.56.1667397697151; Wed, 02 Nov 2022 07:01:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667397697; cv=none; d=google.com; s=arc-20160816; b=jGVV5E0PYXzDV7dJxyO3ZVgFzdH7ZLjOAgiG2G46S9tz7X0e8nsLVzXxn8AlCq+iaL pkZTIh9VUB1cPkJTKeSJXJ+K5imbqNyxldgcyA6EsuIMyeEfyt3kbnJqh8G9Op4mQLoi K8aZ5KPzDX6wpfCeCdKuOAhX5ByajX5jd6cDe7Zw1ALm9iVjr5Yr+Wv58eA1YUgv+SXI /cf/RCkLSWY/A41oHtQ9J8SN/dBfI5om8z0yx2zWvNYtqO9F+LPCxslaOokC6yn+ChZm 9heJPJX+ZJsnuFUf2BhlUbpd2cdPnw1uN1YcqRe07/VTOnMiSqlFT18UkzL+AcGzoVVS LQ6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:mime-version:message-id:date; bh=1t9KlEjR/Mf3E3jSgyDa4crdLPrm9ifGW/2i5xbQ+a8=; b=zC3C16LQo3I5F+obBiWPol1/vdTNh4JMbS9tpxyL/v+xTE0GUsBnsw2EnfxsucZrP0 JPEQyqvVFA027rQL8tH8GE8lpg7/YkR+emgGGn8l/yI4GhvFsKVie2aaX8TFS7T5YBhl gQjAym68Bz/Le/rzrNJD6MJ463lmoV4U9RwkGeYKnKSOUslMb20sZJpl+Lk9pzG/IOZH suQCN/qTFXesStQ9T3PTGBQW7AbjcZPO0jELwzNHvz3XwIole9oM4OXzG/gIXOayB51Q nG/EsUzLDxE/FS1EKBl3KTHUBi+57lvdQippn/jBedfQ/oqQIhr6RnOEW8AHK9NM7nLn Ybxw== 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=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hb18-20020a170907161200b0079195d87013si17894077ejc.713.2022.11.02.07.01.12; Wed, 02 Nov 2022 07:01:37 -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; 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=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231229AbiKBNuv (ORCPT + 99 others); Wed, 2 Nov 2022 09:50:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230416AbiKBNut (ORCPT ); Wed, 2 Nov 2022 09:50:49 -0400 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CEE818E1C; Wed, 2 Nov 2022 06:50:47 -0700 (PDT) Received: from mse-fl2.zte.com.cn (unknown [10.5.228.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mxhk.zte.com.cn (FangMail) with ESMTPS id 4N2Svp52fSz5PkGn; Wed, 2 Nov 2022 21:50:46 +0800 (CST) Received: from xaxapp01.zte.com.cn ([10.88.40.50]) by mse-fl2.zte.com.cn with SMTP id 2A2DobUS088110; Wed, 2 Nov 2022 21:50:37 +0800 (+08) (envelope-from zhang.songyi@zte.com.cn) Received: from mapi (xaxapp01[null]) by mapi (Zmail) with MAPI id mid31; Wed, 2 Nov 2022 21:50:40 +0800 (CST) Date: Wed, 2 Nov 2022 21:50:40 +0800 (CST) X-Zmail-TransId: 2af9636275b06d0fc8ef X-Mailer: Zmail v1.0 Message-ID: <202211022150403300510@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , , , , , , , , , , , , , Subject: =?utf-8?q?=5BPATCH_linux-next=5D_net/mlx5=3A_remove_redundant_ret_v?= =?utf-8?q?ariable?= X-MAIL: mse-fl2.zte.com.cn 2A2DobUS088110 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.250.138.novalocal with ID 636275B6.001 by FangMail milter! X-FangMail-Envelope: 1667397046/4N2Svp52fSz5PkGn/636275B6.001/10.5.228.133/[10.5.228.133]/mse-fl2.zte.com.cn/ X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 636275B6.001/4N2Svp52fSz5PkGn X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY 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?1748393207638224311?= X-GMAIL-MSGID: =?utf-8?q?1748393207638224311?= From 74562e313cf9a1b96c7030f27964f826a0c2572d Mon Sep 17 00:00:00 2001 From: zhang songyi Date: Wed, 2 Nov 2022 20:48:08 +0800 Subject: [PATCH linux-next] net/mlx5: remove redundant ret variable Return value from mlx5dr_send_postsend_action() directly instead of taking this in another redundant variable. Reported-by: Zeal Robot Signed-off-by: zhang songyi --- drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) -- 2.15.2 diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c index a4476cb4c3b3..fd2d31cdbcf9 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c @@ -724,7 +724,6 @@ int mlx5dr_send_postsend_action(struct mlx5dr_domain *dmn, struct mlx5dr_action *action) { struct postsend_info send_info = {}; - int ret; send_info.write.addr = (uintptr_t)action->rewrite->data; send_info.write.length = action->rewrite->num_of_actions * @@ -734,9 +733,7 @@ int mlx5dr_send_postsend_action(struct mlx5dr_domain *dmn, mlx5dr_icm_pool_get_chunk_mr_addr(action->rewrite->chunk); send_info.rkey = mlx5dr_icm_pool_get_chunk_rkey(action->rewrite->chunk); - ret = dr_postsend_icm_data(dmn, &send_info); - - return ret; + return dr_postsend_icm_data(dmn, &send_info); } static int dr_modify_qp_rst2init(struct mlx5_core_dev *mdev,