summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192u
diff options
context:
space:
mode:
authorSimon Horman <horms@verge.net.au>2009-12-23 19:54:54 +1100
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-03 16:42:38 -0800
commitcf137d5c49379c5f05fba40baf1535b611410ec0 (patch)
treee42e65e4f0455e27f13a7a30647f8cde100b88b8 /drivers/staging/rtl8192u
parent27b93f80e47a49a0584a4c8fb58bc44f9e026256 (diff)
downloadblackbird-op-linux-cf137d5c49379c5f05fba40baf1535b611410ec0.tar.gz
blackbird-op-linux-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>
Diffstat (limited to 'drivers/staging/rtl8192u')
-rw-r--r--drivers/staging/rtl8192u/ieee80211/ieee80211_module.c2
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 7a8690f449b4..b752017a4d18 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;
OpenPOWER on IntegriCloud