[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170427095755.GD1755@kroah.com>
Date: Thu, 27 Apr 2017 11:57:55 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: Arnd Bergmann <arnd@...db.de>
Cc: stable@...r.kernel.org, Alasdair Kergon <agk@...hat.com>,
Mike Snitzer <snitzer@...hat.com>, dm-devel@...hat.com,
linux-raid@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3.18-stable] dm bufio: hide bogus warning
On Fri, Apr 21, 2017 at 03:41:10PM +0200, Arnd Bergmann wrote:
> mips-gcc-5.3 warns about correct code on linux-3.18 and earlier:
>
> In file included from ../include/linux/blkdev.h:4:0,
> from ../drivers/md/dm-bufio.h:12,
> from ../drivers/md/dm-bufio.c:9:
> ../drivers/md/dm-bufio.c: In function 'alloc_buffer':
> ../include/linux/sched.h:1975:56: warning: 'noio_flag' may be used uninitialized in this function [-Wmaybe-uninitialized]
> current->flags = (current->flags & ~PF_MEMALLOC_NOIO) | flags;
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
> ../drivers/md/dm-bufio.c:325:11: note: 'noio_flag' was declared here
>
> The warning disappeared on later kernels with this commit: be0c37c985ed
> ("MIPS: Rearrange PTE bits into fixed positions.") I assume this only
> happened because it changed some inlining decisions.
>
> On 3.18.y, we can shut up the warning by adding an extra initialization.
>
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
Now applied, thanks.
greg k-h
Powered by blists - more mailing lists