diff options
author | Simon Horman <horms@verge.net.au> | 2009-12-23 08:54:54 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-04 00:42:38 (GMT) |
commit | cf137d5c49379c5f05fba40baf1535b611410ec0 (patch) | |
tree | e42e65e4f0455e27f13a7a30647f8cde100b88b8 /drivers/staging/rtl8192u/ieee80211 | |
parent | 27b93f80e47a49a0584a4c8fb58bc44f9e026256 (diff) | |
download | linux-fsl-qoriq-cf137d5c49379c5f05fba40baf1535b611410ec0.tar.xz |
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>
Diffstat (limited to 'drivers/staging/rtl8192u/ieee80211')
-rw-r--r-- | drivers/staging/rtl8192u/ieee80211/ieee80211_module.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c index 7a8690f..b752017 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; |