2011-04-18 05:21:07

by Mohammed Shafi Shajakhan

[permalink] [raw]
Subject: [PATCH] mac80211: Fix a compilation warning

From: Mohammed Shafi Shajakhan <[email protected]>

mac80211/debugfs_sta.c:113: warning:
format ‘%d’ expects type ‘int’, but argument 4 has type ‘long int’
introduced by the commit ebe27c91af8b7f4810ae906fbd3eeb2d87850026

Signed-off-by: Mohammed Shafi Shajakhan <[email protected]>
---
net/mac80211/debugfs_sta.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c
index c008232..a01d213 100644
--- a/net/mac80211/debugfs_sta.c
+++ b/net/mac80211/debugfs_sta.c
@@ -108,7 +108,7 @@ static ssize_t sta_connected_time_read(struct file *file, char __user *userbuf,
result.tm_year -= 70;
result.tm_mday -= 1;
res = scnprintf(buf, sizeof(buf),
- "years - %d\nmonths - %d\ndays - %d\nclock - %d:%d:%d\n\n",
+ "years - %ld\nmonths - %d\ndays - %d\nclock - %d:%d:%d\n\n",
result.tm_year, result.tm_mon, result.tm_mday,
result.tm_hour, result.tm_min, result.tm_sec);
return simple_read_from_buffer(userbuf, count, ppos, buf, res);
--
1.7.0.4



2011-04-18 10:19:05

by Mohammed Shafi Shajakhan

[permalink] [raw]
Subject: Re: [PATCH] mac80211: Fix a compilation warning

On Monday 18 April 2011 10:50 AM, Mohammed Shajakhan wrote:
> From: Mohammed Shafi Shajakhan<[email protected]>
>
> mac80211/debugfs_sta.c:113: warning:
> format ‘%d’ expects type ‘int’, but argument 4 has type ‘long int’
> introduced by the commit ebe27c91af8b7f4810ae906fbd3eeb2d87850026
>
> Signed-off-by: Mohammed Shafi Shajakhan<[email protected]>
> ---
> net/mac80211/debugfs_sta.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c
> index c008232..a01d213 100644
> --- a/net/mac80211/debugfs_sta.c
> +++ b/net/mac80211/debugfs_sta.c
> @@ -108,7 +108,7 @@ static ssize_t sta_connected_time_read(struct file *file, char __user *userbuf,
> result.tm_year -= 70;
> result.tm_mday -= 1;
> res = scnprintf(buf, sizeof(buf),
> - "years - %d\nmonths - %d\ndays - %d\nclock - %d:%d:%d\n\n",
> + "years - %ld\nmonths - %d\ndays - %d\nclock - %d:%d:%d\n\n",
> result.tm_year, result.tm_mon, result.tm_mday,
> result.tm_hour, result.tm_min, result.tm_sec);
> return simple_read_from_buffer(userbuf, count, ppos, buf, res);
>
John, this seems to be already fixed by this patch
[PATCH -next] mac80211: fix debugfs printk format warning
http://www.spinics.net/lists/linux-wireless/msg67977.html