summaryrefslogtreecommitdiff
path: root/drivers/staging/lustre/lnet
diff options
context:
space:
mode:
authorJeremiah Mahler <jmmahler@gmail.com>2014-12-25 16:04:44 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-01-17 15:49:22 -0800
commitfce6ad229b5d7a0601f59afa6ce6fdaa09b177f1 (patch)
tree62479ec533c797ce53066dfd8cf5d7f88128a848 /drivers/staging/lustre/lnet
parent387915ded529bc47138d1b1401c94569ac4ce71c (diff)
staging: lustre: replace MIN with min, cast (__kernel_size_t)
Switch from MIN to min and fix the new type warning. The warning is produced because a comparison between iov_len, which is a __kernel_size_t, is made to kiov_len, which is an unsigned int (include/linux/lnet/types.h). Fix the warning by casting kiov_len to __kernel_size_t. Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lnet')
-rw-r--r--drivers/staging/lustre/lnet/lnet/lib-move.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/lustre/lnet/lnet/lib-move.c b/drivers/staging/lustre/lnet/lnet/lib-move.c
index 4182bdaaee71..39e27c1be337 100644
--- a/drivers/staging/lustre/lnet/lnet/lib-move.c
+++ b/drivers/staging/lustre/lnet/lnet/lib-move.c
@@ -403,8 +403,8 @@ lnet_copy_kiov2iov(unsigned int niov, struct kvec *iov, unsigned int iovoffset,
do {
LASSERT(niov > 0);
LASSERT(nkiov > 0);
- this_nob = MIN(iov->iov_len - iovoffset,
- kiov->kiov_len - kiovoffset);
+ this_nob = min(iov->iov_len - iovoffset,
+ (__kernel_size_t) kiov->kiov_len - kiovoffset);
this_nob = min(this_nob, nob);
if (addr == NULL)
@@ -474,7 +474,7 @@ lnet_copy_iov2kiov(unsigned int nkiov, lnet_kiov_t *kiov,
do {
LASSERT(nkiov > 0);
LASSERT(niov > 0);
- this_nob = MIN(kiov->kiov_len - kiovoffset,
+ this_nob = min((__kernel_size_t) kiov->kiov_len - kiovoffset,
iov->iov_len - iovoffset);
this_nob = min(this_nob, nob);