]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: Use min_t() when comparing "size_t" and "unsigned long"
authorGeert Uytterhoeven <geert@linux-m68k.org>
Sun, 13 Apr 2014 18:46:21 +0000 (20:46 +0200)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 13 Apr 2014 21:10:26 +0000 (14:10 -0700)
commit43dd2ee3f3a6cb23c7588facc3251cba79bf555c
treefd50e93b4abb666d111d61f6543c20ee6e61557b
parentae6100dfe614e5891c5b0bb55f8613abb050ccc3
cifs: Use min_t() when comparing "size_t" and "unsigned long"

On 32 bit, size_t is "unsigned int", not "unsigned long", causing the
following warning when comparing with PAGE_SIZE, which is always "unsigned
long":

  fs/cifs/file.c: In function ‘cifs_readdata_to_iov’:
  fs/cifs/file.c:2757: warning: comparison of distinct pointer types lacks a cast

Introduced by commit 4b4a6a2568e4 ("cifs_iovec_read: keep iov_iter
between the calls of cifs_readdata_to_iov()"), which changed the
signedness of "remaining" and the code from min_t() to min().

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/cifs/file.c