diff options
author | Silvan Jegen <s.jegen@gmail.com> | 2014-02-25 12:12:52 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-03-03 15:35:54 -0500 |
commit | c8e4955653a470ece7bf580c84fc88eb58cc9850 (patch) | |
tree | 0517b79659c4b4b0d83528dfc973d99c4de19770 /drivers/net/wireless/mwifiex/debugfs.c | |
parent | 9ffd2e9a174769913dcce0fbc9223b58d2eb5526 (diff) |
net: Replace min macro with min_t
Instead of an explicit cast, use the min_t macro.
Signed-off-by: Silvan Jegen <s.jegen@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/debugfs.c')
-rw-r--r-- | drivers/net/wireless/mwifiex/debugfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/mwifiex/debugfs.c b/drivers/net/wireless/mwifiex/debugfs.c index 61b467a7ebdd..b8a49aad12fd 100644 --- a/drivers/net/wireless/mwifiex/debugfs.c +++ b/drivers/net/wireless/mwifiex/debugfs.c | |||
@@ -493,7 +493,7 @@ mwifiex_regrdwr_write(struct file *file, | |||
493 | { | 493 | { |
494 | unsigned long addr = get_zeroed_page(GFP_KERNEL); | 494 | unsigned long addr = get_zeroed_page(GFP_KERNEL); |
495 | char *buf = (char *) addr; | 495 | char *buf = (char *) addr; |
496 | size_t buf_size = min(count, (size_t) (PAGE_SIZE - 1)); | 496 | size_t buf_size = min_t(size_t, count, PAGE_SIZE - 1); |
497 | int ret; | 497 | int ret; |
498 | u32 reg_type = 0, reg_offset = 0, reg_value = UINT_MAX; | 498 | u32 reg_type = 0, reg_offset = 0, reg_value = UINT_MAX; |
499 | 499 | ||
@@ -594,7 +594,7 @@ mwifiex_rdeeprom_write(struct file *file, | |||
594 | { | 594 | { |
595 | unsigned long addr = get_zeroed_page(GFP_KERNEL); | 595 | unsigned long addr = get_zeroed_page(GFP_KERNEL); |
596 | char *buf = (char *) addr; | 596 | char *buf = (char *) addr; |
597 | size_t buf_size = min(count, (size_t) (PAGE_SIZE - 1)); | 597 | size_t buf_size = min_t(size_t, count, PAGE_SIZE - 1); |
598 | int ret = 0; | 598 | int ret = 0; |
599 | int offset = -1, bytes = -1; | 599 | int offset = -1, bytes = -1; |
600 | 600 | ||