staging: wilc1000: fix warning while printing
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Tue, 2 Jun 2015 08:58:17 +0000 (14:28 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Jun 2015 19:41:51 +0000 (12:41 -0700)
size_t should print using %zu and unsigned long int should use %lu
but here it was using %d and hence we were getting warning while
printing.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/wilc_spi.c
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c

index d0e761080ca5ffe74ce23262aa916547d752349e..6d854fd9101d938a3a8e47dfdc2577f3f6630a16 100644 (file)
@@ -404,7 +404,7 @@ static int spi_cmd_complete(uint8_t cmd, uint32_t adr, uint8_t *b, uint32_t sz,
 #undef NUM_DUMMY_BYTES
 
        if (len2 > (sizeof(wb) / sizeof(wb[0]))) {
-               PRINT_ER("[wilc spi]: spi buffer size too small (%d) (%d)\n",
+               PRINT_ER("[wilc spi]: spi buffer size too small (%d) (%lu)\n",
                         len2, (sizeof(wb) / sizeof(wb[0])));
                result = N_FAIL;
                return result;
index f5eff0933e7d7ff085ba3546dac05e50a35a8db5..cbee14e19d9c1abd17d18c118d6b06f3a96c171f 100644 (file)
@@ -638,7 +638,7 @@ static void CfgConnectResult(tenuConnDisconnEvent enuConnDisconnEvent,
                }
 
 
-               PRINT_D(CFG80211_DBG, "Association request info elements length = %d\n", pstrConnectInfo->ReqIEsLen);
+               PRINT_D(CFG80211_DBG, "Association request info elements length = %zu\n", pstrConnectInfo->ReqIEsLen);
 
                PRINT_D(CFG80211_DBG, "Association response info elements length = %d\n", pstrConnectInfo->u16RespIEsLen);
 
@@ -778,7 +778,7 @@ static int WILC_WFI_CfgScan(struct wiphy *wiphy, struct cfg80211_scan_request *r
                }
 
                PRINT_D(CFG80211_DBG, "Requested num of scan channel %d\n", request->n_channels);
-               PRINT_D(CFG80211_DBG, "Scan Request IE len =  %d\n", request->ie_len);
+               PRINT_D(CFG80211_DBG, "Scan Request IE len =  %zu\n", request->ie_len);
 
                PRINT_D(CFG80211_DBG, "Number of SSIDs %d\n", request->n_ssids);
 
@@ -3316,7 +3316,7 @@ static int WILC_WFI_start_ap(struct wiphy *wiphy, struct net_device *dev,
        priv = wiphy_priv(wiphy);
        PRINT_D(HOSTAPD_DBG, "Starting ap\n");
 
-       PRINT_D(HOSTAPD_DBG, "Interval = %d \n DTIM period = %d\n Head length = %d Tail length = %d\n",
+       PRINT_D(HOSTAPD_DBG, "Interval = %d \n DTIM period = %d\n Head length = %zu Tail length = %zu\n",
                settings->beacon_interval, settings->dtim_period, beacon->head_len, beacon->tail_len);
 
        s32Error = WILC_WFI_CfgSetChannel(wiphy, &settings->chandef);