On Fri, 23 Mar 2012 15:55:14 -0500
Steve French <[email protected]> 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?

-- 
Jeff Layton <[email protected]>
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to