[PATCH 6/9] wil6210: fix warning in pointer arithmetic

DORMANTno replies

From: Vladimir Kondratiev <hidden>
Date: 2014-12-01 13:38:55
Subsystem: atheros ath generic utilities, the rest, wilocity wil6210 wireless driver · Maintainers: Jeff Johnson, Linus Torvalds

In some compilation environments, result of pointer arithmetic interpreted as int
while in others it is long int. Force conversion to long.

Signed-off-by: Vladimir Kondratiev <redacted>
---
 drivers/net/wireless/ath/wil6210/fw_inc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/wil6210/fw_inc.c b/drivers/net/wireless/ath/wil6210/fw_inc.c
index 2658455..d4acf93 100644
--- a/drivers/net/wireless/ath/wil6210/fw_inc.c
+++ b/drivers/net/wireless/ath/wil6210/fw_inc.c
@@ -446,7 +446,7 @@ static int wil_fw_load(struct wil6210_priv *wil, const void *data, size_t size)
 		if (size >= sizeof(*hdr)) {
 			wil_err_fw(wil, "Stop at offset %ld"
 				   " record type %d [%zd bytes]\n",
-				   (const void *)hdr - data,
+				   (long)((const void *)hdr - data),
 				   le16_to_cpu(hdr->type), hdr_sz);
 		}
 		return -EINVAL;
-- 
2.1.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help