Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3190941pxu; Tue, 8 Dec 2020 06:01:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJz7avlmJDQiIeN24GxX8lfm2A2FbRoHy80YIUPdv5KJJDtv5XUXWNFCeXDwDbVgeIwTGCJc X-Received: by 2002:a17:906:378f:: with SMTP id n15mr22734313ejc.263.1607436088739; Tue, 08 Dec 2020 06:01:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607436088; cv=none; d=google.com; s=arc-20160816; b=neO5deCwkG232tbxGLkmYywW1xXyXfOfLemUj3xMoqQb4ZDx3NbrLIiFxVW1yTgLWc vXN8PLwViosjyEXekKmrECwZu1rQhTpiA09h6qaSGhNCsMIZZlzydN9+HzmubjuIYM52 axpd65awCl46ce2fF2Ij41n+MHof2Ak+eLsJJ4cgQXl9IQMiqRFvteJiuGVDRcru2c2H Uk1ryAqMSdnQ95DEuQ+Q4PzmNoU/5O8rtAxJOKaO09+XIfjnqckjxawY4ek2xvFaI3py a4VHKZuSGO6KNJa03Hk/XWLLUXVdBJJiE3cDsVR1IGZCpwxtmxN1hbWuXZ3rHKlyVDHO le4A== 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; bh=iE/zVWLbRL4oKiY3Pz/u1EEBe4K7qw19+ng+eG+32hg=; b=YlGdNw7IK7qC5MkkP/qJzpg3IJ6Ma1qBEhQoC10cGQJYo02h6fxQs2VLGe6kGbVkad 5fGTaUL8M4IrLo/0HR8lAcBmEJ1kQjPGfj/hQwlUGvTr0436v38dHrocyyU5tSHKLnPv PgPiAJKq3xdGlq01o/S/WOk7oSumiZkBYD6E/2h6Ehi2HITcBytx1WbdVBt2A5hXelz7 ntyuffma9Svs/uc/R7I3ChtyiFgepGj+ttnuwOVOVm5M2fHnoX8DlsvlLVi/7qj8GC1E INdLIf/XcdCdHht2MjCmxYtQEC3L7Lv82/yj3tGt8s+/FMJmr3H/noEqI/XTDF0JxUcn lpgg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n3si10000695edv.105.2020.12.08.06.01.05; Tue, 08 Dec 2020 06:01:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729641AbgLHN4s (ORCPT + 99 others); Tue, 8 Dec 2020 08:56:48 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:9038 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729025AbgLHN4s (ORCPT ); Tue, 8 Dec 2020 08:56:48 -0500 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4Cr1sf6wYQzhp1j; Tue, 8 Dec 2020 21:55:34 +0800 (CST) Received: from ubuntu.network (10.175.138.68) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.487.0; Tue, 8 Dec 2020 21:55:57 +0800 From: Zheng Yongjun To: , , , , CC: Zheng Yongjun Subject: [PATCH net-next] net/mlx5: simplify the return expression of mlx5_esw_offloads_pair() Date: Tue, 8 Dec 2020 21:56:25 +0800 Message-ID: <20201208135625.11872-1-zhengyongjun3@huawei.com> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.138.68] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Simplify the return expression. Signed-off-by: Zheng Yongjun --- drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c index c9c2962ad49f..786d2fc4b403 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c @@ -1893,13 +1893,8 @@ void esw_offloads_unload_rep(struct mlx5_eswitch *esw, u16 vport_num) static int mlx5_esw_offloads_pair(struct mlx5_eswitch *esw, struct mlx5_eswitch *peer_esw) { - int err; - err = esw_add_fdb_peer_miss_rules(esw, peer_esw->dev); - if (err) - return err; - - return 0; + return esw_add_fdb_peer_miss_rules(esw, peer_esw->dev); } static void mlx5_esw_offloads_unpair(struct mlx5_eswitch *esw) -- 2.22.0