Re: [PATCH] writeback: initialize m_dirty to avoid compile warning

2015-11-18 Thread Shi, Yang
On 11/18/2015 10:55 AM, Andrew Morton wrote: On Wed, 18 Nov 2015 10:39:23 -0800 "Shi, Yang" wrote: On 11/18/2015 10:33 AM, Tejun Heo wrote: Hello, On Wed, Nov 18, 2015 at 10:27:32AM -0800, Shi, Yang wrote: This was the main reason the code was structured the way it is. If cgroup writeback

Re: [PATCH] writeback: initialize m_dirty to avoid compile warning

2015-11-18 Thread Andrew Morton
On Wed, 18 Nov 2015 10:39:23 -0800 "Shi, Yang" wrote: > On 11/18/2015 10:33 AM, Tejun Heo wrote: > > Hello, > > > > On Wed, Nov 18, 2015 at 10:27:32AM -0800, Shi, Yang wrote: > >>> This was the main reason the code was structured the way it is. If > >>> cgroup writeback is not enabled, any deref

Re: [PATCH] writeback: initialize m_dirty to avoid compile warning

2015-11-18 Thread Shi, Yang
On 11/18/2015 10:33 AM, Tejun Heo wrote: Hello, On Wed, Nov 18, 2015 at 10:27:32AM -0800, Shi, Yang wrote: This was the main reason the code was structured the way it is. If cgroup writeback is not enabled, any derefs of mdtc variables should trigger warnings. Ugh... I don't know. Compiler r

Re: [PATCH] writeback: initialize m_dirty to avoid compile warning

2015-11-18 Thread Tejun Heo
Hello, On Wed, Nov 18, 2015 at 10:27:32AM -0800, Shi, Yang wrote: > >This was the main reason the code was structured the way it is. If > >cgroup writeback is not enabled, any derefs of mdtc variables should > >trigger warnings. Ugh... I don't know. Compiler really should be > >able to tell thi

Re: [PATCH] writeback: initialize m_dirty to avoid compile warning

2015-11-18 Thread Shi, Yang
On 11/18/2015 10:11 AM, Tejun Heo wrote: Hello, On Tue, Nov 17, 2015 at 03:38:55PM -0800, Andrew Morton wrote: --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -1542,7 +1542,7 @@ static void balance_dirty_pages(struct address_space *mapping, for (;;) { unsigned lo

Re: [PATCH] writeback: initialize m_dirty to avoid compile warning

2015-11-18 Thread Tejun Heo
Hello, On Tue, Nov 17, 2015 at 03:38:55PM -0800, Andrew Morton wrote: > > --- a/mm/page-writeback.c > > +++ b/mm/page-writeback.c > > @@ -1542,7 +1542,7 @@ static void balance_dirty_pages(struct address_space > > *mapping, > > for (;;) { > > unsigned long now = jiffies; > >

Re: [PATCH] writeback: initialize m_dirty to avoid compile warning

2015-11-18 Thread Shi, Yang
On 11/18/2015 1:53 AM, Arnd Bergmann wrote: On Tuesday 17 November 2015 15:38:55 Andrew Morton wrote: On Fri, 13 Nov 2015 10:26:41 -0800 Yang Shi wrote: When building kernel with gcc 5.2, the below warning is raised: mm/page-writeback.c: In function 'balance_dirty_pages.isra.10': mm/page-wri

Re: [PATCH] writeback: initialize m_dirty to avoid compile warning

2015-11-18 Thread Arnd Bergmann
On Tuesday 17 November 2015 15:38:55 Andrew Morton wrote: > On Fri, 13 Nov 2015 10:26:41 -0800 Yang Shi wrote: > > > When building kernel with gcc 5.2, the below warning is raised: > > > > mm/page-writeback.c: In function 'balance_dirty_pages.isra.10': > > mm/page-writeback.c:1545:17: warning: '

Re: [PATCH] writeback: initialize m_dirty to avoid compile warning

2015-11-17 Thread Andrew Morton
On Fri, 13 Nov 2015 10:26:41 -0800 Yang Shi wrote: > When building kernel with gcc 5.2, the below warning is raised: > > mm/page-writeback.c: In function 'balance_dirty_pages.isra.10': > mm/page-writeback.c:1545:17: warning: 'm_dirty' may be used uninitialized in > this function [-Wmaybe-uninit