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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1450741676-5865-57-git-send-email-viro@ZenIV.linux.org.uk>
Date:	Mon, 21 Dec 2015 23:47:30 +0000
From:	Al Viro <viro@...IV.linux.org.uk>
To:	linux-kernel@...r.kernel.org
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>
Subject: [POC][PATCH 57/83] iwlegacy: get rid of pointless casts

From: Al Viro <viro@...iv.linux.org.uk>

Signed-off-by: Al Viro <viro@...iv.linux.org.uk>
---
 drivers/net/wireless/iwlegacy/3945-mac.c |  2 +-
 drivers/net/wireless/iwlegacy/3945.c     |  2 +-
 drivers/net/wireless/iwlegacy/common.c   | 10 +++++-----
 drivers/net/wireless/iwlegacy/common.h   |  4 ++--
 4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/net/wireless/iwlegacy/3945-mac.c b/drivers/net/wireless/iwlegacy/3945-mac.c
index af1b3e6..d073676 100644
--- a/drivers/net/wireless/iwlegacy/3945-mac.c
+++ b/drivers/net/wireless/iwlegacy/3945-mac.c
@@ -710,7 +710,7 @@ il3945_get_measurement(struct il_priv *il,
 	if (rc)
 		return rc;
 
-	pkt = (struct il_rx_pkt *)cmd.reply_page;
+	pkt = cmd.reply_page;
 	if (pkt->hdr.flags & IL_CMD_FAILED_MSK) {
 		IL_ERR("Bad return from N_RX_ON_ASSOC command\n");
 		rc = -EIO;
diff --git a/drivers/net/wireless/iwlegacy/3945.c b/drivers/net/wireless/iwlegacy/3945.c
index 93bdf68..1529bd6 100644
--- a/drivers/net/wireless/iwlegacy/3945.c
+++ b/drivers/net/wireless/iwlegacy/3945.c
@@ -1704,7 +1704,7 @@ il3945_send_rxon_assoc(struct il_priv *il)
 	if (rc)
 		return rc;
 
-	pkt = (struct il_rx_pkt *)cmd.reply_page;
+	pkt = cmd.reply_page;
 	if (pkt->hdr.flags & IL_CMD_FAILED_MSK) {
 		IL_ERR("Bad return from C_RXON_ASSOC command\n");
 		rc = -EIO;
diff --git a/drivers/net/wireless/iwlegacy/common.c b/drivers/net/wireless/iwlegacy/common.c
index 8871145..ebdd041 100644
--- a/drivers/net/wireless/iwlegacy/common.c
+++ b/drivers/net/wireless/iwlegacy/common.c
@@ -384,7 +384,7 @@ cancel:
 fail:
 	if (cmd->reply_page) {
 		il_free_pages(il, cmd->reply_page);
-		cmd->reply_page = 0;
+		cmd->reply_page = NULL;
 	}
 out:
 	return ret;
@@ -1288,7 +1288,7 @@ il_send_scan_abort(struct il_priv *il)
 	if (ret)
 		return ret;
 
-	pkt = (struct il_rx_pkt *)cmd.reply_page;
+	pkt = cmd.reply_page;
 	if (pkt->u.status != CAN_ABORT_STATUS) {
 		/* The scan abort will return 1 for success or
 		 * 2 for "failure".  A failure condition can be
@@ -1870,7 +1870,7 @@ il_send_add_sta(struct il_priv *il, struct il_addsta_cmd *sta, u8 flags)
 		return ret;
 
 	if (ret == 0) {
-		pkt = (struct il_rx_pkt *)cmd.reply_page;
+		pkt = cmd.reply_page;
 		ret = il_process_add_sta_resp(il, sta, pkt, true);
 	}
 	il_free_pages(il, cmd.reply_page);
@@ -2124,7 +2124,7 @@ il_send_remove_station(struct il_priv *il, const u8 * addr, int sta_id,
 	if (ret)
 		return ret;
 
-	pkt = (struct il_rx_pkt *)cmd.reply_page;
+	pkt = cmd.reply_page;
 	if (pkt->hdr.flags & IL_CMD_FAILED_MSK) {
 		IL_ERR("Bad return from C_REM_STA (0x%08X)\n", pkt->hdr.flags);
 		ret = -EIO;
@@ -3319,7 +3319,7 @@ il_tx_cmd_complete(struct il_priv *il, struct il_rx_buf *rxb)
 
 	/* Input error checking is done when commands are added to queue. */
 	if (meta->flags & CMD_WANT_SKB) {
-		meta->source->reply_page = (unsigned long)rxb_addr(rxb);
+		meta->source->reply_page = rxb_addr(rxb);
 		rxb->page = NULL;
 	} else if (meta->callback)
 		meta->callback(il, cmd, pkt);
diff --git a/drivers/net/wireless/iwlegacy/common.h b/drivers/net/wireless/iwlegacy/common.h
index 555bf02..6581df1 100644
--- a/drivers/net/wireless/iwlegacy/common.h
+++ b/drivers/net/wireless/iwlegacy/common.h
@@ -576,7 +576,7 @@ struct il_device_cmd {
 
 struct il_host_cmd {
 	const void *data;
-	unsigned long reply_page;
+	struct il_rx_pkt *reply_page;
 	void (*callback) (struct il_priv *il, struct il_device_cmd *cmd,
 			  struct il_rx_pkt *pkt);
 	u32 flags;
@@ -1502,7 +1502,7 @@ __il_free_pages(struct il_priv *il, struct page *page)
 }
 
 static inline void
-il_free_pages(struct il_priv *il, unsigned long page)
+il_free_pages(struct il_priv *il, void *page)
 {
 	free_pages((void *)page, il->hw_params.rx_page_order);
 	il->alloc_rxb_page--;
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ