linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Konrad Zapalowicz <bergo.torino@gmail.com>
To: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Johnny Kim <johnny.kim@atmel.com>,
	Rachel Kim <rachel.kim@atmel.com>, Dean Lee <dean.lee@atmel.com>,
	Chris Park <chris.park@atmel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: wilc1000: fix warning while printing
Date: Tue, 2 Jun 2015 10:29:17 +0200	[thread overview]
Message-ID: <20150602082917.GB5903@patagonia> (raw)
In-Reply-To: <1433231814-4204-1-git-send-email-sudipm.mukherjee@gmail.com>

On 06/02, Sudip Mukherjee wrote:
> size_t should print using %zu, but here it was using %d and hence we
> were getting warning while printing.
> 
> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> ---
> 
> I think it will be easy to remove the other warnings if all the typedefs
> are removed first.
> 
>  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",

Hi, it seems that the above line should use %zu too. Am I correct or I'm
missing something?

 - konrad

>  			 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);
> -- 
> 1.8.1.2
> 
> _______________________________________________
> devel mailing list
> devel@linuxdriverproject.org
> http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  reply	other threads:[~2015-06-02  8:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-02  7:56 [PATCH] staging: wilc1000: fix warning while printing Sudip Mukherjee
2015-06-02  8:29 ` Konrad Zapalowicz [this message]
2015-06-02  8:35   ` Sudip Mukherjee
2015-06-02  8:58     ` Konrad Zapalowicz
2015-06-02  9:01       ` Sudip Mukherjee
  -- strict thread matches above, loose matches on Subject: below --
2015-06-11  3:42 Chris Park
2015-06-11  5:48 ` Sudip Mukherjee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150602082917.GB5903@patagonia \
    --to=bergo.torino@gmail.com \
    --cc=chris.park@atmel.com \
    --cc=dean.lee@atmel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=johnny.kim@atmel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=rachel.kim@atmel.com \
    --cc=sudipm.mukherjee@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).