Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp4914823rwn; Mon, 12 Sep 2022 00:57:42 -0700 (PDT) X-Google-Smtp-Source: AA6agR7Pk0/747QJHQTbqQUu7iBPIXXM/JF/0EetWWoFtu176zvoAj0wNy6Ztm7mw6qcp5wWsglz X-Received: by 2002:a17:907:78d:b0:740:33e1:998 with SMTP id xd13-20020a170907078d00b0074033e10998mr18079430ejb.162.1662969461833; Mon, 12 Sep 2022 00:57:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662969461; cv=none; d=google.com; s=arc-20160816; b=vvXoHF0PtRn4LU1RvB65PJQwB0ogu0LydD+DaEJ6drKcYcywrxZ+C9qNXCQCVx6t+t 2NXlZ9babWKRv0qK3BvoU4zi8FSxkrkb41WJVOPGLS/Kv5/rHiJ7UzhYtcGXhnF7DAu4 KDtj6dryh8VK9ts9SweVP9z7xH4ZMW8guLAj/Hajav/IAQIV+38SGPKNKPpLScgA+XCA L3r3wNN9xZ3+bAjQnwEBG5xNkI1ujh17Pr07h+QOI2l5bNT//4UKjPvvlX+D72dSL7FC AUiY3VGQKWwo4lep+vdQIxeZvpuK0A1iHpHjaumZx3qQqSQTc9fvF2LM+iCuPEJY4p4g zLMA== 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=i/w8c1xKOSAuyskQENWzqnLbDpJZE0osAWdxMG+atXc=; b=gAnj9jRR1hn0p12DklVXGn6qLBN2Jqj0qgn/3qZbRYWHrk3CtKqwjStb2M/iCL0G8N nlxOmcws87EnKRTqIbHxMOTSuYYFxcJad42ByAKAvjPo4vIEY+OjR/6t378A5d7nka46 ALFVzBwwDHjkZAA42yoFiupYQpysB40PTQhZEBZ8WXgvS140sy5MV2j3lRe13FqB9xvl qYKaaTqgFDAdKPyhovVBhcJ/039eIv2P6gkP370RToDXEHdHuKtIOmzzWymPrjdRQe6Y CvBnabukqbYSyGfLyeYa5s1sOT+6MRIBeqEL6gNPUrelssD14MRGqoC/042Ly5I5Vj1y Td1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=cLdMSuZ+; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g10-20020a1709065d0a00b00772fe67d540si7738352ejt.433.2022.09.12.00.57.16; Mon, 12 Sep 2022 00:57:41 -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=@gmail.com header.s=20210112 header.b=cLdMSuZ+; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229906AbiILHaI (ORCPT + 99 others); Mon, 12 Sep 2022 03:30:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229885AbiILHaB (ORCPT ); Mon, 12 Sep 2022 03:30:01 -0400 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBD0B1F628; Mon, 12 Sep 2022 00:29:55 -0700 (PDT) Received: by mail-pj1-x102b.google.com with SMTP id q15-20020a17090a304f00b002002ac83485so7343140pjl.0; Mon, 12 Sep 2022 00:29:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=i/w8c1xKOSAuyskQENWzqnLbDpJZE0osAWdxMG+atXc=; b=cLdMSuZ+xU07/FuUG+TZWlhV0PjtGyybA2RgIplZBM+YOxgiG08luMFr5eNk1gxmfx olHbS2Ia2dPMuI7DhL8l0X/nb+0H5SISrrTfLHcamqzpq2JMj9czsR03vC/xM33xY+qn SaYfr7wkbhee2zfXD+8dMVuDOJIdTw8YBVPK4GAWVxaEjJdj7C5ItpheZIVodKZYir5Y W8SL3iflj4vss+WZ1oF7l7hpz881bU8R9UAWFQykEU44K9DdTWI2VsWcTa/hlxGKy+Ny hKjC287NffM6zv52FYvkqp5zEN27JqIPgWAKx8aB4chlyPI0nPDB6IWrVjY4fNtEh07/ mghA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=i/w8c1xKOSAuyskQENWzqnLbDpJZE0osAWdxMG+atXc=; b=QkzHThq0583/q5U2y/T684U3afJxtLLiny6K3k8bRctjFYE9b1f7yZkzqpGY5BJd/L T6gXL8cu+m7e1slhO2DbGj3VL4Y7Cq7lwkEXEFZVwo0joBdc1hdP1JSS2hDXtPBX3YQe CJrgQsuDlKVpiSbRLegExo+IeiVbE8HHRRrEzOb+yb8RT+XptvhenkvvNcI0lMn2IM82 qQm+usCPO2HhyWS/3BwL0XYnfW6NaZHrQQ6MRD5ZyqXd11YScCWGSOwSIiEW9YWqoaxs t8YxxtBIetpLrKLK8gO3E/glm+aJR9tk6KdudXdmd1kL9Lg0iyLxChK46DPcxZqGfgvu /kdw== X-Gm-Message-State: ACgBeo1Qi01tpQbij73QNSIEzIZdowzrtcl+yjV0TnZNQlhA7wPKi5fc KVAdFNqKKbwnwnWsgiDKQM4= X-Received: by 2002:a17:903:32d1:b0:178:1cf0:5081 with SMTP id i17-20020a17090332d100b001781cf05081mr10260678plr.54.1662967795077; Mon, 12 Sep 2022 00:29:55 -0700 (PDT) Received: from localhost.localdomain ([193.203.214.57]) by smtp.gmail.com with ESMTPSA id cp19-20020a170902e79300b0016ef87334aesm5143642plb.162.2022.09.12.00.29.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Sep 2022 00:29:53 -0700 (PDT) From: cgel.zte@gmail.com X-Google-Original-From: xu.panda@zte.com.cn To: idosch@nvidia.com Cc: petrm@nvidia.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Xu Panda , Zeal Robot Subject: [PATCH linux-next] mlxsw: core: remove the unneeded result variable Date: Mon, 12 Sep 2022 07:29:34 +0000 Message-Id: <20220912072933.16994-1-xu.panda@zte.com.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 From: Xu Panda Return the value mlxsw_core_bus_device_register() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot Signed-off-by: Xu Panda --- drivers/net/ethernet/mellanox/mlxsw/core.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/core.c b/drivers/net/ethernet/mellanox/mlxsw/core.c index e2a985ec2c76..8daedf6c4496 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/core.c +++ b/drivers/net/ethernet/mellanox/mlxsw/core.c @@ -1513,15 +1513,13 @@ mlxsw_devlink_core_bus_device_reload_up(struct devlink *devlink, enum devlink_re struct netlink_ext_ack *extack) { struct mlxsw_core *mlxsw_core = devlink_priv(devlink); - int err; *actions_performed = BIT(DEVLINK_RELOAD_ACTION_DRIVER_REINIT) | BIT(DEVLINK_RELOAD_ACTION_FW_ACTIVATE); - err = mlxsw_core_bus_device_register(mlxsw_core->bus_info, - mlxsw_core->bus, - mlxsw_core->bus_priv, true, - devlink, extack); - return err; + return mlxsw_core_bus_device_register(mlxsw_core->bus_info, + mlxsw_core->bus, + mlxsw_core->bus_priv, true, + devlink, extack); } static int mlxsw_devlink_flash_update(struct devlink *devlink, -- 2.15.2