diff options
author | Simon Horman <horms@verge.net.au> | 2009-12-23 19:54:54 +1100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-03 16:42:38 -0800 |
commit | cf137d5c49379c5f05fba40baf1535b611410ec0 (patch) | |
tree | e42e65e4f0455e27f13a7a30647f8cde100b88b8 | |
parent | 27b93f80e47a49a0584a4c8fb58bc44f9e026256 (diff) | |
download | linux-3.10-cf137d5c49379c5f05fba40baf1535b611410ec0.tar.gz linux-3.10-cf137d5c49379c5f05fba40baf1535b611410ec0.tar.bz2 linux-3.10-cf137d5c49379c5f05fba40baf1535b611410ec0.zip |
Staging: rtl8192su, rtl8192u: use min_t() in store_debug_level()
sizeof() returns a size_t but the other types involved
are unsigned long, so using min() results in a warning.
As sizeof() is called on an 11 character buffer defined
immediately above unsigned long is obviously wide enough
for the result.
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/rtl8192su/ieee80211/ieee80211_module.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8192u/ieee80211/ieee80211_module.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211_module.c b/drivers/staging/rtl8192su/ieee80211/ieee80211_module.c index e8c67d5dfb7..c024fa60072 100644 --- a/drivers/staging/rtl8192su/ieee80211/ieee80211_module.c +++ b/drivers/staging/rtl8192su/ieee80211/ieee80211_module.c @@ -262,7 +262,7 @@ static int store_debug_level(struct file *file, const char *buffer, unsigned long count, void *data) { char buf[] = "0x00000000"; - unsigned long len = min(sizeof(buf) - 1, count); + unsigned long len = min_t(unsigned long, sizeof(buf) - 1, count); char *p = (char *)buf; unsigned long val; diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c index 7a8690f449b..b752017a4d1 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c @@ -260,7 +260,7 @@ static int store_debug_level(struct file *file, const char *buffer, unsigned long count, void *data) { char buf[] = "0x00000000"; - unsigned long len = min(sizeof(buf) - 1, count); + unsigned long len = min_t(unsigned long, sizeof(buf) - 1, count); char *p = (char *)buf; unsigned long val; |