linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Shilovsky <piastry@etersoft.ru>
To: Stephen Rothwell <sfr@canb.auug.org.au>,
	Steve French <smfrench@gmail.com>,
	Suresh Jayaraman <sjayaraman@suse.de>
Cc: linux-cifs@vger.kernel.org, linux-next@vger.kernel.org,
	linux-kernel@vger.kernel.org, Jeff Layton <jlayton@redhat.com>
Subject: [PATCH] cifs: fix compiler warning about incompatible pointer type (try #3)
Date: Mon, 31 Jan 2011 15:09:39 +0300	[thread overview]
Message-ID: <1296475779-19357-1-git-send-email-piastry@etersoft.ru> (raw)
In-Reply-To: <4D4693CF.9090903@suse.de>

fs/cifs/file.c: In function ‘cifs_iovec_write’:
fs/cifs/file.c:1740:9: warning: passing argument 6 of ‘CIFSSMBWrite2’ from incompatible pointer type
fs/cifs/cifsproto.h:343:12: note: expected ‘unsigned int *’ but argument is of type ‘size_t *’

Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de>
Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
---
 fs/cifs/file.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 0de17c1..d8338e7 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -1667,9 +1667,10 @@ static ssize_t
 cifs_iovec_write(struct file *file, const struct iovec *iov,
 		 unsigned long nr_segs, loff_t *poffset)
 {
-	size_t total_written = 0, written = 0;
-	unsigned long num_pages, npages;
-	size_t copied, len, cur_len, i;
+	unsigned int written;
+	ssize_t total_written = 0;
+	unsigned long num_pages, npages, i;
+	size_t copied, len, cur_len;
 	struct kvec *to_send;
 	struct page **pages;
 	struct iov_iter it;
@@ -1825,7 +1826,8 @@ cifs_iovec_read(struct file *file, const struct iovec *iov,
 {
 	int rc;
 	int xid;
-	unsigned int total_read, bytes_read = 0;
+	ssize_t total_read;
+	unsigned int bytes_read = 0;
 	size_t len, cur_len;
 	int iov_offset = 0;
 	struct cifs_sb_info *cifs_sb;
-- 
1.7.1


  parent reply	other threads:[~2011-01-31 12:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-31  2:30 linux-next: build warning after merge of the cifs tree Stephen Rothwell
2011-01-31 10:49 ` Suresh Jayaraman
2011-01-31 11:38   ` Pavel Shilovsky
2011-01-31 11:41   ` [PATCH] cifs: fix compiler warning about incompatible pointer type (try #2) Pavel Shilovsky
2011-01-31 12:09   ` Pavel Shilovsky [this message]
2011-01-31 12:52     ` [PATCH] cifs: fix compiler warning about incompatible pointer type (try #3) Pavel Shilovsky
2011-01-31 12:29   ` linux-next: build warning after merge of the cifs tree Jeff Layton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1296475779-19357-1-git-send-email-piastry@etersoft.ru \
    --to=piastry@etersoft.ru \
    --cc=jlayton@redhat.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    --cc=sjayaraman@suse.de \
    --cc=smfrench@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).