From patchwork Tue Jun 2 08:58:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 6527631 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4DEE19F1CC for ; Tue, 2 Jun 2015 08:58:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6A231204CF for ; Tue, 2 Jun 2015 08:58:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AD040204A7 for ; Tue, 2 Jun 2015 08:58:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754762AbbFBI6a (ORCPT ); Tue, 2 Jun 2015 04:58:30 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:35214 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754598AbbFBI61 (ORCPT ); Tue, 2 Jun 2015 04:58:27 -0400 Received: by padjw17 with SMTP id jw17so56774193pad.2; Tue, 02 Jun 2015 01:58:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=+6fB3pxC22Q5LpzrRF4UCslObnzLnQEP3ulbvI7qLjI=; b=BLCBtKEgLxP91p548oR+fc1ekga8gP/9VYtxpsY4I+Z2hBjgShkH/YBm1eP1Q2RJ7F Ojn+LvjTawadTnErmkpyR48jJQ7xtS8kP3vLmbj33+AnWB8UKHQyMczlvJpQICuu2iq8 23LOrjNMutKRFwviA4ta7VXxzdG7Z9cIkoUir4XV+Giz4FrC0vw+vIQUm+VkBoXrC0pp 0762zrEJsxO7pZQ0SK48yVWbiLroyGGuvAu1yPJoAAgZL3SPpX9alBS+6H199G4P93Tq Kaa3oGHQk3/ItjHxl0LdvYm1a/H+ZTOboQkuuZHy0obyC1y3NBvBq9qAXQXI8PS/vyqq Yoww== X-Received: by 10.66.63.41 with SMTP id d9mr48948499pas.47.1433235506967; Tue, 02 Jun 2015 01:58:26 -0700 (PDT) Received: from localhost.localdomain ([122.169.146.148]) by mx.google.com with ESMTPSA id k13sm16757911pbq.79.2015.06.02.01.58.23 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 02 Jun 2015 01:58:26 -0700 (PDT) From: Sudip Mukherjee To: Johnny Kim , Rachel Kim , Dean Lee , Chris Park , Greg Kroah-Hartman Cc: linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, bergo.torino@gmail.com, Sudip Mukherjee Subject: [PATCH v2] staging: wilc1000: fix warning while printing Date: Tue, 2 Jun 2015 14:28:17 +0530 Message-Id: <1433235497-5539-1-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.8.1.2 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- v2: missed mentioning unsigned long int in commit message. drivers/staging/wilc1000/wilc_spi.c | 2 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c index d0e7610..6d854fd 100644 --- a/drivers/staging/wilc1000/wilc_spi.c +++ b/drivers/staging/wilc1000/wilc_spi.c @@ -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; diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index e9ab2cb..6fdb0d6 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -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);