From: Jeff Layton <jlayton@redhat.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [cifs:for-next 50/66] fs/cifs/file.c:2576:10: warning: 'page' may be used uninitialized in this
Date: Sat, 15 Sep 2012 23:29:45 +0000 [thread overview]
Message-ID: <20120915192945.687e774a@corrin.poochiereds.net> (raw)
In-Reply-To: <20120914235254.GA32569@localhost>
On Sat, 15 Sep 2012 07:52:54 +0800
Fengguang Wu <fengguang.wu@intel.com> wrote:
> Hi Jeff,
>
> FYI, there are new compile warnings show up in
>
> tree: git://git.samba.org/sfrench/cifs-2.6.git for-next
> head: c246704dfe86f2c1875b59a8d60ca69c1f48acb4
> commit: d8b9dff6bde7ef0dd13a52e0cdfa998a3545c07f [50/66] cifs: turn the pages list in cifs_readdata into an array
>
> All error/warnings:
>
> fs/cifs/file.c: In function 'cifs_uncached_readv_complete':
> fs/cifs/file.c:2576:10: warning: 'page' may be used uninitialized in this function [-Wuninitialized]
>
> vim +2576 fs/cifs/file.c
> 2566 {
> 2567 struct cifs_readdata *rdata = container_of(work,
> 2568 struct cifs_readdata, work);
> 2569 unsigned int i;
> 2570
> 2571 /* if the result is non-zero then the pages weren't kmapped */
> 2572 if (rdata->result = 0) {
> 2573 struct page *page;
> 2574
> 2575 for (i = 0; i < rdata->nr_pages; i++)
> > 2576 kunmap(page);
> 2577 }
> 2578
> 2579 complete(&rdata->done);
> 2580 kref_put(&rdata->refcount, cifs_uncached_readdata_release);
> 2581 }
> 2582
> 2583 static int
> 2584 cifs_uncached_read_marshal_iov(struct cifs_readdata *rdata,
> 2585 unsigned int remaining)
> 2586 {
>
Thanks Wu, good catch...
A stupid error on my part. The main reason I didn't catch it was that
the next patch in that series removes that code altogether. I'll respin
that patch to fix it though so we don't break bisectability.
Thanks!
--
Jeff Layton <jlayton@redhat.com>
prev parent reply other threads:[~2012-09-15 23:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-14 23:52 [cifs:for-next 50/66] fs/cifs/file.c:2576:10: warning: 'page' may be used uninitialized in this func Fengguang Wu
2012-09-15 23:29 ` Jeff Layton [this message]
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=20120915192945.687e774a@corrin.poochiereds.net \
--to=jlayton@redhat.com \
--cc=kernel-janitors@vger.kernel.org \
/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