lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <ec8b4004475049060d03fd71b916cbf32858559d.1638705082.git.leonro@nvidia.com>
Date:   Sun,  5 Dec 2021 13:51:37 +0200
From:   Leon Romanovsky <leon@...nel.org>
To:     "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>
Cc:     Leon Romanovsky <leonro@...dia.com>, linux-kernel@...r.kernel.org,
        netdev@...r.kernel.org, Salil Mehta <salil.mehta@...wei.com>,
        Yisen Zhuang <yisen.zhuang@...wei.com>
Subject: [PATCH net-next] Revert "net: hns3: add void before function which don't receive ret"

From: Leon Romanovsky <leonro@...dia.com>

There are two issues with this patch:
1. devlink_register() doesn't return any value. It is already void.
2. It is not kernel coding at all to cast return type to void.

This reverts commit 5ac4f180bd07116c1e57858bc3f6741adbca3eb6.

Link: https://lore.kernel.org/all/Yan8VDXC0BtBRVGz@unreal
Signed-off-by: Leon Romanovsky <leonro@...dia.com>
---
 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_devlink.c   | 2 +-
 drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_devlink.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_devlink.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_devlink.c
index 9c3199d3c8ee..4c441e6a5082 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_devlink.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_devlink.c
@@ -120,7 +120,7 @@ int hclge_devlink_init(struct hclge_dev *hdev)
 	hdev->devlink = devlink;
 
 	devlink_set_features(devlink, DEVLINK_F_RELOAD);
-	(void)devlink_register(devlink);
+	devlink_register(devlink);
 	return 0;
 }
 
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_devlink.c b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_devlink.c
index 75d2926729d3..fdc19868b818 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_devlink.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_devlink.c
@@ -122,7 +122,7 @@ int hclgevf_devlink_init(struct hclgevf_dev *hdev)
 	hdev->devlink = devlink;
 
 	devlink_set_features(devlink, DEVLINK_F_RELOAD);
-	(void)devlink_register(devlink);
+	devlink_register(devlink);
 	return 0;
 }
 
-- 
2.33.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ