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>] [day] [month] [year] [list]
Message-Id: <20230710064148.174011-1-suhui@nfschina.com>
Date: Mon, 10 Jul 2023 14:41:48 +0800
From: Su Hui <suhui@...china.com>
To: rmody@...vell.com,
	skalluru@...vell.com,
	GR-Linux-NIC-Dev@...vell.com,
	davem@...emloft.net,
	edumazet@...gle.com,
	kuba@...nel.org,
	pabeni@...hat.com
Cc: netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	kernel-janitors@...r.kernel.org,
	wuych <yunchuan@...china.com>
Subject: [PATCH net-next v2 10/10] net: bna: Remove unnecessary (void*) conversions

From: wuych <yunchuan@...china.com>

Pointer variables of void * type do not require type cast.

Signed-off-by: wuych <yunchuan@...china.com>
---
 drivers/net/ethernet/brocade/bna/bnad.c | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/drivers/net/ethernet/brocade/bna/bnad.c b/drivers/net/ethernet/brocade/bna/bnad.c
index d6d90f9722a7..fb2bef54d104 100644
--- a/drivers/net/ethernet/brocade/bna/bnad.c
+++ b/drivers/net/ethernet/brocade/bna/bnad.c
@@ -1037,8 +1037,7 @@ bnad_cb_ccb_destroy(struct bnad *bnad, struct bna_ccb *ccb)
 static void
 bnad_cb_tx_stall(struct bnad *bnad, struct bna_tx *tx)
 {
-	struct bnad_tx_info *tx_info =
-			(struct bnad_tx_info *)tx->priv;
+	struct bnad_tx_info *tx_info = tx->priv;
 	struct bna_tcb *tcb;
 	u32 txq_id;
 	int i;
@@ -1056,7 +1055,7 @@ bnad_cb_tx_stall(struct bnad *bnad, struct bna_tx *tx)
 static void
 bnad_cb_tx_resume(struct bnad *bnad, struct bna_tx *tx)
 {
-	struct bnad_tx_info *tx_info = (struct bnad_tx_info *)tx->priv;
+	struct bnad_tx_info *tx_info = tx->priv;
 	struct bna_tcb *tcb;
 	u32 txq_id;
 	int i;
@@ -1133,7 +1132,7 @@ bnad_tx_cleanup(struct delayed_work *work)
 static void
 bnad_cb_tx_cleanup(struct bnad *bnad, struct bna_tx *tx)
 {
-	struct bnad_tx_info *tx_info = (struct bnad_tx_info *)tx->priv;
+	struct bnad_tx_info *tx_info = tx->priv;
 	struct bna_tcb *tcb;
 	int i;
 
@@ -1149,9 +1148,9 @@ bnad_cb_tx_cleanup(struct bnad *bnad, struct bna_tx *tx)
 static void
 bnad_cb_rx_stall(struct bnad *bnad, struct bna_rx *rx)
 {
-	struct bnad_rx_info *rx_info = (struct bnad_rx_info *)rx->priv;
-	struct bna_ccb *ccb;
+	struct bnad_rx_info *rx_info = rx->priv;
 	struct bnad_rx_ctrl *rx_ctrl;
+	struct bna_ccb *ccb;
 	int i;
 
 	for (i = 0; i < BNAD_MAX_RXP_PER_RX; i++) {
@@ -1208,9 +1207,9 @@ bnad_rx_cleanup(void *work)
 static void
 bnad_cb_rx_cleanup(struct bnad *bnad, struct bna_rx *rx)
 {
-	struct bnad_rx_info *rx_info = (struct bnad_rx_info *)rx->priv;
-	struct bna_ccb *ccb;
+	struct bnad_rx_info *rx_info = rx->priv;
 	struct bnad_rx_ctrl *rx_ctrl;
+	struct bna_ccb *ccb;
 	int i;
 
 	for (i = 0; i < BNAD_MAX_RXP_PER_RX; i++) {
@@ -1231,10 +1230,10 @@ bnad_cb_rx_cleanup(struct bnad *bnad, struct bna_rx *rx)
 static void
 bnad_cb_rx_post(struct bnad *bnad, struct bna_rx *rx)
 {
-	struct bnad_rx_info *rx_info = (struct bnad_rx_info *)rx->priv;
+	struct bnad_rx_info *rx_info = rx->priv;
+	struct bnad_rx_ctrl *rx_ctrl;
 	struct bna_ccb *ccb;
 	struct bna_rcb *rcb;
-	struct bnad_rx_ctrl *rx_ctrl;
 	int i, j;
 
 	for (i = 0; i < BNAD_MAX_RXP_PER_RX; i++) {
-- 
2.30.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ