wil6210: fix warning in pointer arithmetic
authorVladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Mon, 1 Dec 2014 13:35:27 +0000 (15:35 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 1 Dec 2014 20:57:23 +0000 (15:57 -0500)
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 <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/wil6210/fw_inc.c

index 2658455..d4acf93 100644 (file)
@@ -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;