commit f94d05ce10d869c418d3271bd028fc33bfd25e6f Author: Ian Kumlien Date: Tue Jul 22 20:57:50 2014 +0200 Initialize the to and from fields While compliling the 3.16-rc6 kernel I saw this: fs/direct-io.c: In function ‘do_blockdev_direct_IO’: fs/direct-io.c:1022:29: warning: ‘from’ may be used uninitialized in this function [-Wmaybe-uninitialized] ret = submit_page_section(dio, sdio, page, ^ fs/direct-io.c:913:10: note: ‘from’ was declared here size_t from, to; ^ fs/direct-io.c:1011:12: warning: ‘to’ may be used uninitialized in this function [-Wmaybe-uninitialized] u = (to - from) >> blkbits; ^ fs/direct-io.c:913:16: note: ‘to’ was declared here size_t from, to; ^ --- This small changes makes sure that the values are initialized. Signed-off-by: Ian Kumlien diff --git a/fs/direct-io.c b/fs/direct-io.c index 98040ba..64a8286 100644 --- a/fs/direct-io.c +++ b/fs/direct-io.c @@ -910,7 +910,7 @@ static int do_direct_IO(struct dio *dio, struct dio_submit *sdio, while (sdio->block_in_file < sdio->final_block_in_request) { struct page *page; - size_t from, to; + size_t from, to = {0}; page = dio_get_page(dio, sdio, &from, &to); if (IS_ERR(page)) { ret = PTR_ERR(page);