All of lore.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Changli Gao <xiaosuo@gmail.com>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] fs: optimize mpage_readpage()
Date: Fri, 4 Jun 2010 12:18:48 +0200	[thread overview]
Message-ID: <20100604101848.GA6367@a1.tnic> (raw)
In-Reply-To: <20100604083031.GE31073@ZenIV.linux.org.uk>

From: Al Viro <viro@ZenIV.linux.org.uk>
Date: Fri, Jun 04, 2010 at 09:30:31AM +0100

> On Fri, Jun 04, 2010 at 10:13:22AM +0200, Borislav Petkov wrote:
> > > > > -	bio = do_mpage_readpage(bio, page, 1, &last_block_in_bio,
> > > > > +	bio = do_mpage_readpage(NULL, page, 1, &last_block_in_bio,
> 
> > Right, the uninitialized warning above happens when you remove the NULL
> > assignment, i.e.
> > 
> > struct bio *bio;
> > 
> > ...
> > 
> > bio = do_mpage_readpage(bio, ...)
> 
> WTF?  His patch does *NOT* leave you with bio = do_mpage_readpage(bio, ...),
> it replaces that with bio = do_mpage_readpage(NULL, ...).
> 
> Which variant has produced a warning?
> 
> > But(!), in the mpage_readpage(), bio _absolutely_ has to be NULL because
> > it is checked if being so later in do_mpage_readpage(), so this one is a
> > complete different story.
> > 
> > To cut a long story short, you're correct, gcc is b0rked when warning
> > about passing addresses of variables to functions which only write to
> > them.
> 
> To make it even shorter, you've misapplied the patch.  Correct?

Yes.

-- 
Regards/Gruss,
Boris.

      reply	other threads:[~2010-06-04 10:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-29  1:18 [PATCH 1/2] fs: optimize mpage_readpage() Changli Gao
2010-05-29 12:10 ` Borislav Petkov
2010-05-29 13:26   ` Changli Gao
2010-05-29 13:26     ` Changli Gao
2010-05-29 13:46     ` Borislav Petkov
2010-05-29 14:17       ` Changli Gao
2010-05-29 14:17         ` Changli Gao
2010-06-04  7:19   ` Al Viro
2010-06-04  8:13     ` Borislav Petkov
2010-06-04  8:30       ` Al Viro
2010-06-04 10:18         ` Borislav Petkov [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=20100604101848.GA6367@a1.tnic \
    --to=bp@alien8.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@ZenIV.linux.org.uk \
    --cc=xiaosuo@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.