On Fri, Mar 23, 2012 at 4:01 PM, Jeff Layton <jlayton@xxxxxxxxxx> wrote: > On Fri, 23 Mar 2012 15:55:14 -0500 > Steve French <smfrench@xxxxxxxxx> wrote: > >> Jeff, >> We should cleanup compile warning - was planning to add a tiny patch >> to fix if no objection. >> >> Look correct? >> >> diff --git a/fs/cifs/file.c b/fs/cifs/file.c >> index daaaca8..460d87b 100644 >> --- a/fs/cifs/file.c >> +++ b/fs/cifs/file.c >> @@ -2114,7 +2114,7 @@ cifs_uncached_marshal_iov(struct kvec *iov, >> struct cifs_writedata *wdata) >> >> /* marshal up the pages into iov array */ >> for (i = 0; i < wdata->nr_pages; i++) { >> - iov[i + 1].iov_len = min(bytes, PAGE_SIZE); >> + iov[i + 1].iov_len = min_t(size_t, bytes, PAGE_SIZE); >> iov[i + 1].iov_base = kmap(wdata->pages[i]); >> bytes -= iov[i + 1].iov_len; >> } >> > > That patch looks harmless, but I don't seem to be able to reproduce any > warnings. Can you elaborate on how you're getting a warning from that? make modules C=1 M=fs/cifs CF=-D__CHECK_ENDIAN__ FC16 [stevef@smf-gateway cifs-2.6]$ gcc --version gcc (GCC) 4.6.2 20111027 (Red Hat 4.6.2-1) Copyright (C) 2011 Free Software Foundation, Inc. -- Thanks, Steve -- To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html