From: Andrew Morton <akpm@linux-foundation.org>
To: Maxim Patlasov <mpatlasov@parallels.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
linux-next@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: linux-next: build warnings after merge of the akpm-current tree
Date: Thu, 29 Aug 2013 12:42:08 -0700 [thread overview]
Message-ID: <20130829124208.7b97594d8a8723d45d1bad34@linux-foundation.org> (raw)
In-Reply-To: <521F2F7E.8010702@parallels.com>
On Thu, 29 Aug 2013 15:24:46 +0400 Maxim Patlasov <mpatlasov@parallels.com> wrote:
> Hi Stephen,
>
> 08/29/2013 01:47 PM, Stephen Rothwell __________:
> > Hi Andrew,
> >
> > After merging the akpm tree, today's linux-next build (sparc64 defconfig
> > and others) produced these warnings:
> >
> > mm/page-writeback.c: In function 'balance_dirty_pages_ratelimited':
> > mm/page-writeback.c:1450:13: warning: 'bdi_thresh' may be used uninitialized in this function [-Wuninitialized]
> > mm/page-writeback.c:1372:16: note: 'bdi_thresh' was declared here
> > mm/page-writeback.c:1226:16: warning: 'bdi_dirty' may be used uninitialized in this function [-Wuninitialized]
> > mm/page-writeback.c:1369:16: note: 'bdi_dirty' was declared here
> >
> > Possibly introduced by commit 34c547af1e23 ("mm/page-writeback.c: add
> > strictlimit feature"), but I am not sure anything can be done about them.
> >
>
> This looks as gcc glitch. So far as I didn't observe the warnings, the
> version of gcc does matter. May be moving the definitions of the two
> variables into for(;;){...} would help. Could you please give it a try?
Shuffling the definitions around won't help. To fix this we'll need to
add more code and I hate adding runtime overhead to address
compile-time issues. So...
--- a/mm/page-writeback.c~a
+++ a/mm/page-writeback.c
@@ -1366,10 +1366,8 @@ static void balance_dirty_pages(struct a
{
unsigned long nr_reclaimable; /* = file_dirty + unstable_nfs */
unsigned long nr_dirty; /* = file_dirty + writeback + unstable_nfs */
- unsigned long bdi_dirty;
unsigned long background_thresh;
unsigned long dirty_thresh;
- unsigned long bdi_thresh;
long period;
long pause;
long max_pause;
@@ -1385,8 +1383,10 @@ static void balance_dirty_pages(struct a
for (;;) {
unsigned long now = jiffies;
- unsigned long dirty;
+ unsigned long uninitialized_var(bdi_thresh);
unsigned long thresh;
+ unsigned long uninitialized_var(bdi_dirty);
+ unsigned long dirty;
unsigned long bg_thresh;
/*
_
next prev parent reply other threads:[~2013-08-29 19:42 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-29 9:47 linux-next: build warnings after merge of the akpm-current tree Stephen Rothwell
2013-08-29 11:24 ` Maxim Patlasov
2013-08-29 19:42 ` Andrew Morton [this message]
2014-08-26 7:22 Stephen Rothwell
2014-08-26 10:19 ` Xishi Qiu
2014-09-23 8:18 Stephen Rothwell
2014-10-03 7:30 Stephen Rothwell
2014-10-03 18:21 ` Andrew Morton
2014-10-03 19:28 ` Michal Nazarewicz
2015-01-27 8:12 Stephen Rothwell
2015-01-27 8:27 ` Vladimir Davydov
2017-03-20 5:22 Stephen Rothwell
2017-03-20 9:05 ` Dmitry Vyukov
2017-03-20 12:30 ` Jan Glauber
2017-03-20 17:06 ` Challa, Mahipal
2017-08-24 7:41 Stephen Rothwell
2017-08-24 8:15 ` Changwei Ge
2017-08-25 21:23 ` Andrew Morton
2017-08-26 1:23 ` Changwei Ge
2020-01-06 6:14 Stephen Rothwell
2020-10-06 12:05 Stephen Rothwell
2020-10-06 20:01 ` Peter Xu
2020-10-06 22:03 ` Stephen Rothwell
2021-06-15 10:50 Stephen Rothwell
2021-10-11 7:31 Stephen Rothwell
2021-10-11 17:46 ` Kees Cook
2022-02-09 6:02 Stephen Rothwell
2022-02-09 16:03 ` Hugh Dickins
2022-03-28 23:04 ` Matthew Wilcox
2022-03-29 3:32 ` Hugh Dickins
2022-03-24 7:27 ` Stephen Rothwell
2022-03-28 19:54 ` Hugh Dickins
2022-03-28 22:10 ` Matthew Wilcox
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=20130829124208.7b97594d8a8723d45d1bad34@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=mpatlasov@parallels.com \
--cc=sfr@canb.auug.org.au \
/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).