wl1271: fix compiler warnings on 64 bit archs
authorLuciano Coelho <luciano.coelho@nokia.com>
Tue, 11 Aug 2009 08:58:27 +0000 (11:58 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 14 Aug 2009 13:14:02 +0000 (09:14 -0400)
There were a few warnings when compiling the wl1271 driver on 64 bit
architectures.  This was due to size mismatch of integers.

This commit fixes the following warnings:

drivers/net/wireless/wl12xx/wl1271_main.c: In function 'wl1271_irq_work':
drivers/net/wireless/wl12xx/wl1271_main.c:184: warning: large integer implicitly truncated to unsigned type
drivers/net/wireless/wl12xx/wl1271_boot.c: In function 'wl1271_boot_upload_firmware_chunk':
drivers/net/wireless/wl12xx/wl1271_boot.c:103: warning: format '%d' expects type 'int', but argument 2 has type 'size_t'
drivers/net/wireless/wl12xx/wl1271_boot.c:150: warning: format '%d' expects type 'int', but argument 2 has type 'size_t'
drivers/net/wireless/wl12xx/wl1271_boot.c: In function 'wl1271_boot_enable_interrupts':
drivers/net/wireless/wl12xx/wl1271_boot.c:278: warning: large integer implicitly truncated to unsigned type

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/wl12xx/wl1271_boot.c
drivers/net/wireless/wl12xx/wl1271_main.c

index 4c22f25fd8f05c54995b35e628019b44b4adaad3..8228ef474a7e1ea2ee1d1604be7d959daf91eda9 100644 (file)
@@ -100,8 +100,8 @@ static int wl1271_boot_upload_firmware_chunk(struct wl1271 *wl, void *buf,
 
        wl1271_debug(DEBUG_BOOT, "starting firmware upload");
 
 
        wl1271_debug(DEBUG_BOOT, "starting firmware upload");
 
-       wl1271_debug(DEBUG_BOOT, "fw_data_len %d chunk_size %d", fw_data_len,
-               CHUNK_SIZE);
+       wl1271_debug(DEBUG_BOOT, "fw_data_len %zd chunk_size %d",
+                    fw_data_len, CHUNK_SIZE);
 
 
        if ((fw_data_len % 4) != 0) {
 
 
        if ((fw_data_len % 4) != 0) {
@@ -147,7 +147,7 @@ static int wl1271_boot_upload_firmware_chunk(struct wl1271 *wl, void *buf,
        /* 10.4 upload the last chunk */
        addr = dest + chunk_num * CHUNK_SIZE;
        p = buf + chunk_num * CHUNK_SIZE;
        /* 10.4 upload the last chunk */
        addr = dest + chunk_num * CHUNK_SIZE;
        p = buf + chunk_num * CHUNK_SIZE;
-       wl1271_debug(DEBUG_BOOT, "uploading fw last chunk (%d B) 0x%p to 0x%x",
+       wl1271_debug(DEBUG_BOOT, "uploading fw last chunk (%zd B) 0x%p to 0x%x",
                     fw_data_len % CHUNK_SIZE, p, addr);
        wl1271_spi_mem_write(wl, addr, p, fw_data_len % CHUNK_SIZE);
 
                     fw_data_len % CHUNK_SIZE, p, addr);
        wl1271_spi_mem_write(wl, addr, p, fw_data_len % CHUNK_SIZE);
 
@@ -275,7 +275,8 @@ static int wl1271_boot_upload_nvs(struct wl1271 *wl)
 static void wl1271_boot_enable_interrupts(struct wl1271 *wl)
 {
        enable_irq(wl->irq);
 static void wl1271_boot_enable_interrupts(struct wl1271 *wl)
 {
        enable_irq(wl->irq);
-       wl1271_reg_write32(wl, ACX_REG_INTERRUPT_MASK, ~(WL1271_INTR_MASK));
+       wl1271_reg_write32(wl, ACX_REG_INTERRUPT_MASK,
+                          WL1271_ACX_INTR_ALL & ~(WL1271_INTR_MASK));
        wl1271_reg_write32(wl, HI_CFG, HI_CFG_DEF_VAL);
 }
 
        wl1271_reg_write32(wl, HI_CFG, HI_CFG_DEF_VAL);
 }
 
index 3bb45ced99abeb410959533268c67328ace9e717..4102d590b798566cda678d76987adf634726ecac 100644 (file)
@@ -181,7 +181,8 @@ static void wl1271_irq_work(struct work_struct *work)
        } while (intr && --ctr);
 
 out_sleep:
        } while (intr && --ctr);
 
 out_sleep:
-       wl1271_reg_write32(wl, ACX_REG_INTERRUPT_MASK, ~(WL1271_INTR_MASK));
+       wl1271_reg_write32(wl, ACX_REG_INTERRUPT_MASK,
+                          WL1271_ACX_INTR_ALL & ~(WL1271_INTR_MASK));
        wl1271_ps_elp_sleep(wl);
 
 out:
        wl1271_ps_elp_sleep(wl);
 
 out: