From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1033851AbdD0J6O (ORCPT ); Thu, 27 Apr 2017 05:58:14 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:59102 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754414AbdD0J6F (ORCPT ); Thu, 27 Apr 2017 05:58:05 -0400 Date: Thu, 27 Apr 2017 11:57:55 +0200 From: Greg KH To: Arnd Bergmann Cc: stable@vger.kernel.org, Alasdair Kergon , Mike Snitzer , dm-devel@redhat.com, linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3.18-stable] dm bufio: hide bogus warning Message-ID: <20170427095755.GD1755@kroah.com> References: <20170421134212.2727744-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170421134212.2727744-1-arnd@arndb.de> User-Agent: Mutt/1.8.2 (2017-04-18) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Now applied, thanks. greg k-h