LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* linux-next: build warning after merge of the cifs tree
@ 2011-01-31 2:30 Stephen Rothwell
2011-01-31 10:49 ` Suresh Jayaraman
0 siblings, 1 reply; 7+ messages in thread
From: Stephen Rothwell @ 2011-01-31 2:30 UTC (permalink / raw)
To: Steve French, linux-cifs
Cc: linux-next, linux-kernel, Pavel Shilovsky, Jeff Layton
[-- Attachment #1: Type: text/plain, Size: 584 bytes --]
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)").
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: linux-next: build warning after merge of the cifs tree
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
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Suresh Jayaraman @ 2011-01-31 10:49 UTC (permalink / raw)
To: Stephen Rothwell, Steve French
Cc: linux-cifs, linux-next, linux-kernel, Pavel Shilovsky, Jeff Layton
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@suse.de>
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@gmail.com>
Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de>
---
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;
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: linux-next: build warning after merge of the cifs tree
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
` (2 subsequent siblings)
3 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, linux-next,
linux-kernel, Jeff Layton
2011/1/31 Suresh Jayaraman <sjayaraman@suse.de>:
> 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@suse.de>
> 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@gmail.com>
> Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de>
> ---
> 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)
2011-01-31 10:49 ` Suresh Jayaraman
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
2011-01-31 12:29 ` linux-next: build warning after merge of the cifs tree Jeff Layton
3 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, linux-next, linux-kernel, 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@suse.de>
Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
---
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 [flat|nested] 7+ messages in thread
* [PATCH] cifs: fix compiler warning about incompatible pointer type (try #3)
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
2011-01-31 12:52 ` Pavel Shilovsky
2011-01-31 12:29 ` linux-next: build warning after merge of the cifs tree Jeff Layton
3 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, linux-next, linux-kernel, 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@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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: linux-next: build warning after merge of the cifs tree
2011-01-31 10:49 ` Suresh Jayaraman
` (2 preceding siblings ...)
2011-01-31 12:09 ` [PATCH] cifs: fix compiler warning about incompatible pointer type (try #3) Pavel Shilovsky
@ 2011-01-31 12:29 ` Jeff Layton
3 siblings, 0 replies; 7+ messages in thread
From: Jeff Layton @ 2011-01-31 12:29 UTC (permalink / raw)
To: Suresh Jayaraman
Cc: Stephen Rothwell, Steve French, linux-cifs, linux-next,
linux-kernel, Pavel Shilovsky
On Mon, 31 Jan 2011 16:19:51 +0530
Suresh Jayaraman <sjayaraman@suse.de> wrote:
> 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@suse.de>
> 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@gmail.com>
> Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de>
> ---
> 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;
> --
> To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
I fixed this a few days ago along with a number of other compiler
warnings in:
[PATCH] cifs: clean up some compiler warnings
...just waiting for Steve to merge it.
--
Jeff Layton <jlayton@redhat.com>
^ permalink raw reply [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
end of thread, other threads:[~2011-01-31 12:52 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH] cifs: fix compiler warning about incompatible pointer type (try #3) Pavel Shilovsky
2011-01-31 12:52 ` Pavel Shilovsky
2011-01-31 12:29 ` linux-next: build warning after merge of the cifs tree Jeff Layton
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).