diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2014-12-15 07:21:42 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-12-15 11:49:09 -0500 |
commit | 6ff4a8ad4b6eae5171754fb60418bc81834aa09b (patch) | |
tree | 901bd100a2583fcef6a3605d335f138f9b5e47ad /net/rds | |
parent | 50262c8533a31edc9512c36fbd1ac224ddfee242 (diff) |
rds: Fix min() warning in rds_message_inc_copy_to_user()
net/rds/message.c: In function ‘rds_message_inc_copy_to_user’:
net/rds/message.c:328: warning: comparison of distinct pointer types lacks a cast
Use min_t(unsigned long, ...) like is done in
rds_message_copy_from_user().
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds')
-rw-r--r-- | net/rds/message.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/rds/message.c b/net/rds/message.c index ff2202218187..5a21e6f5986f 100644 --- a/net/rds/message.c +++ b/net/rds/message.c | |||
@@ -325,7 +325,8 @@ int rds_message_inc_copy_to_user(struct rds_incoming *inc, struct iov_iter *to) | |||
325 | copied = 0; | 325 | copied = 0; |
326 | 326 | ||
327 | while (iov_iter_count(to) && copied < len) { | 327 | while (iov_iter_count(to) && copied < len) { |
328 | to_copy = min(iov_iter_count(to), sg->length - vec_off); | 328 | to_copy = min_t(unsigned long, iov_iter_count(to), |
329 | sg->length - vec_off); | ||
329 | to_copy = min_t(unsigned long, to_copy, len - copied); | 330 | to_copy = min_t(unsigned long, to_copy, len - copied); |
330 | 331 | ||
331 | rds_stats_add(s_copy_to_user, to_copy); | 332 | rds_stats_add(s_copy_to_user, to_copy); |