From: "Theodore Y. Ts'o" <tytso@mit.edu>
To: "zhangyi (F)" <yi.zhang@huawei.com>
Cc: <linux-ext4@vger.kernel.org>, <adilger.kernel@dilger.ca>,
<jack@suse.cz>, <miaoxie@huawei.com>
Subject: Re: [PATCH 1/2] jbd2: fix compile warning when using JBUFFER_TRACE
Date: Thu, 21 Feb 2019 11:28:18 -0500 [thread overview]
Message-ID: <20190221162818.GB10245@mit.edu> (raw)
In-Reply-To: <1547100399-127915-2-git-send-email-yi.zhang@huawei.com>
On Thu, Jan 10, 2019 at 02:06:38PM +0800, zhangyi (F) wrote:
> The jh pointer may be used uninitialized in the two cases below and the
> compiler complain about it when enabling JBUFFER_TRACE macro, fix them.
>
> In file included from fs/jbd2/transaction.c:19:0:
> fs/jbd2/transaction.c: In function ‘jbd2_journal_get_undo_access’:
> ./include/linux/jbd2.h:1637:38: warning: ‘jh’ is used uninitialized in this function [-Wuninitialized]
> #define JBUFFER_TRACE(jh, info) do { printk("%s: %d\n", __func__, jh->b_jcount);} while (0)
> ^
> fs/jbd2/transaction.c:1219:23: note: ‘jh’ was declared here
> struct journal_head *jh;
> ^
> In file included from fs/jbd2/transaction.c:19:0:
> fs/jbd2/transaction.c: In function ‘jbd2_journal_dirty_metadata’:
> ./include/linux/jbd2.h:1637:38: warning: ‘jh’ may be used uninitialized in this function [-Wmaybe-uninitialized]
> #define JBUFFER_TRACE(jh, info) do { printk("%s: %d\n", __func__, jh->b_jcount);} while (0)
> ^
> fs/jbd2/transaction.c:1332:23: note: ‘jh’ was declared here
> struct journal_head *jh;
> ^
>
> Signed-off-by: zhangyi (F) <yi.zhang@huawei.com>
> Cc: stable@vger.kernel.org
Thanks, applied.
- Ted
next prev parent reply other threads:[~2019-02-21 16:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-10 6:06 [PATCH 0/2] ext4: fix two compile problems zhangyi (F)
2019-01-10 6:06 ` [PATCH 1/2] jbd2: fix compile warning when using JBUFFER_TRACE zhangyi (F)
2019-01-10 10:28 ` Jan Kara
2019-02-21 16:28 ` Theodore Y. Ts'o [this message]
2019-01-10 6:06 ` [PATCH 2/2] ext4: fix compile error when using BUFFER_TRACE zhangyi (F)
2019-01-10 10:28 ` Jan Kara
2019-02-21 16:33 ` Theodore Y. Ts'o
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190221162818.GB10245@mit.edu \
--to=tytso@mit.edu \
--cc=adilger.kernel@dilger.ca \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=miaoxie@huawei.com \
--cc=yi.zhang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.