* Re: linux-next: build warning after merge of the cifs tree
[not found] ` <4D4693CF.9090903-l3A5Bk7waGM@public.gmane.org>
@ 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 ` [PATCH] cifs: fix compiler warning about incompatible pointer type (try #3) Pavel Shilovsky
2 siblings, 0 replies; 7+ messages in thread
From: Pavel Shilovsky @ 2011-01-31 11:38 UTC (permalink / raw)
To: Suresh Jayaraman
Cc: Stephen Rothwell, Steve French,
linux-cifs-u79uwXL29TY76Z2rM5mHXA,
linux-next-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Jeff Layton
2011/1/31 Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>:
> On 01/31/2011 08:00 AM, Stephen Rothwell wrote:
>> Hi all,
>>
>> After merging the cifs tree, today's linux-next build (powerpc
>> ppc64_defconfig) produced this warning:
>>
>> fs/cifs/file.c: In function 'cifs_iovec_write':
>> fs/cifs/file.c:1740: warning: passing argument 6 of 'CIFSSMBWrite2' from incompatible pointer type
>> fs/cifs/cifsproto.h:343: note: expected 'unsigned int *' but argument is of type 'size_t *'
>>
>> Introduced by commit 72432ffcf555decbbae47f1be338e1d2f210aa69 ("CIFS:
>> Implement cifs_strict_writev (try #4)").
>>
>
> The following patch should silence that warning.
>
> From: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
> Subject: [PATCH] cifs: fix compiler warning about incompatible pointer type
>
> 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 *’
>
> Cc: Pavel Shilovsky <piastryyy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Signed-off-by: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
> ---
> fs/cifs/file.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/cifs/file.c b/fs/cifs/file.c
> index 0de17c1..2a3c5d8 100644
> --- a/fs/cifs/file.c
> +++ b/fs/cifs/file.c
> @@ -1667,7 +1667,7 @@ 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 int total_written = 0, written = 0;
> unsigned long num_pages, npages;
> size_t copied, len, cur_len, i;
> struct kvec *to_send;
>
I've just noriced another bug: that 'i' variable should be unsigned
long. I will recreate the patch with this fix.
--
Best regards,
Pavel Shilovsky.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] cifs: fix compiler warning about incompatible pointer type (try #2)
[not found] ` <4D4693CF.9090903-l3A5Bk7waGM@public.gmane.org>
2011-01-31 11:38 ` Pavel Shilovsky
@ 2011-01-31 11:41 ` Pavel Shilovsky
2011-01-31 12:09 ` [PATCH] cifs: fix compiler warning about incompatible pointer type (try #3) Pavel Shilovsky
2 siblings, 0 replies; 7+ messages in thread
From: Pavel Shilovsky @ 2011-01-31 11:41 UTC (permalink / raw)
To: Stephen Rothwell, Steve French, Suresh Jayaraman
Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA,
linux-next-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Jeff Layton
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-l3A5Bk7waGM@public.gmane.org>
Signed-off-by: Pavel Shilovsky <piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org>
---
fs/cifs/file.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 0de17c1..4940bac 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -1667,9 +1667,9 @@ 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 = 0;
+ unsigned long num_pages, npages, i;
+ size_t copied, len, cur_len, total_written = 0;
struct kvec *to_send;
struct page **pages;
struct iov_iter it;
--
1.7.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] cifs: fix compiler warning about incompatible pointer type (try #3)
[not found] ` <4D4693CF.9090903-l3A5Bk7waGM@public.gmane.org>
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
2011-01-31 12:52 ` Pavel Shilovsky
2 siblings, 1 reply; 7+ messages in thread
From: Pavel Shilovsky @ 2011-01-31 12:09 UTC (permalink / raw)
To: Stephen Rothwell, Steve French, Suresh Jayaraman
Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA,
linux-next-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Jeff Layton
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-l3A5Bk7waGM@public.gmane.org>
Signed-off-by: Pavel Shilovsky <piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org>
---
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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] cifs: fix compiler warning about incompatible pointer type (try #3)
2011-01-31 12:09 ` [PATCH] cifs: fix compiler warning about incompatible pointer type (try #3) Pavel Shilovsky
@ 2011-01-31 12:52 ` Pavel Shilovsky
0 siblings, 0 replies; 7+ messages in thread
From: Pavel Shilovsky @ 2011-01-31 12:52 UTC (permalink / raw)
To: Stephen Rothwell, Steve French, Suresh Jayaraman
Cc: linux-cifs, linux-next, linux-kernel, Jeff Layton
2011/1/31 Pavel Shilovsky <piastry@etersoft.ru>:
> 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
>
>
Let's drop this one according to [PATCH] cifs: clean up some compiler
warnings patch.
--
Best regards,
Pavel Shilovsky.
^ permalink raw reply [flat|nested] 7+ messages in thread