diff options
author | Arnd Bergmann <arnd@arndb.de> | 2017-04-21 16:41:10 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-04-30 06:49:14 +0300 |
commit | e9bf6fcfeb37ac9d6bce176a59b79234c9e79d2b (patch) | |
tree | f43e8caf21a8c93c8d5e4f4f62ba53f023474bad /drivers/md | |
parent | 279b8b78a229ad47aadfba6d3b46ea9f72a58512 (diff) | |
download | linux-e9bf6fcfeb37ac9d6bce176a59b79234c9e79d2b.tar.xz |
dm bufio: hide bogus warning
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@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/dm-bufio.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/dm-bufio.c b/drivers/md/dm-bufio.c index ecbd3ffcf359..91fe43b98c96 100644 --- a/drivers/md/dm-bufio.c +++ b/drivers/md/dm-bufio.c @@ -349,6 +349,7 @@ static void *alloc_buffer_data(struct dm_bufio_client *c, gfp_t gfp_mask, * as if GFP_NOIO was specified. */ + noio_flag = 0; if (gfp_mask & __GFP_NORETRY) noio_flag = memalloc_noio_save(); |