From cf137d5c49379c5f05fba40baf1535b611410ec0 Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Wed, 23 Dec 2009 19:54:54 +1100 Subject: 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 Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8192u/ieee80211/ieee80211_module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/staging/rtl8192u') 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; -- cgit v1.1