mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-04 00:01:44 +00:00
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>
This commit is contained in:
parent
27b93f80e4
commit
cf137d5c49
drivers/staging
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user