From: tytso@mit.edu
To: Arnd Bergmann <arnd@kernel.org>
Cc: Andreas Dilger <adilger.kernel@dilger.ca>,
Jan Kara <jack@suse.com>, Arnd Bergmann <arnd@arndb.de>,
Ritesh Harjani <riteshh@linux.ibm.com>,
Harshad Shirwadkar <harshadshirwadkar@gmail.com>,
kernel test robot <lkp@intel.com>,
Daejun Park <daejun7.park@samsung.com>, Yi Li <yili@winhong.com>,
Jens Axboe <axboe@kernel.dk>,
Johannes Thumshirn <johannes.thumshirn@wdc.com>,
changfengnan <fengnanchang@foxmail.com>,
Shijie Luo <luoshijie1@huawei.com>,
linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ext4: fix debug format string warning
Date: Fri, 9 Apr 2021 23:30:11 -0400 [thread overview]
Message-ID: <YHEbw84HHzViYQfj@mit.edu> (raw)
In-Reply-To: <20210409201211.1866633-1-arnd@kernel.org>
On Fri, Apr 09, 2021 at 10:12:05PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> Using no_printk() for jbd_debug() revealed two warnings:
>
> fs/jbd2/recovery.c: In function 'fc_do_one_pass':
> fs/jbd2/recovery.c:256:30: error: format '%d' expects a matching 'int' argument [-Werror=format=]
> 256 | jbd_debug(3, "Processing fast commit blk with seq %d");
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> fs/ext4/fast_commit.c: In function 'ext4_fc_replay_add_range':
> fs/ext4/fast_commit.c:1732:30: error: format '%d' expects argument of type 'int', but argument 2 has type 'long unsigned int' [-Werror=format=]
> 1732 | jbd_debug(1, "Converting from %d to %d %lld",
>
> The first one was added incorrectly, and was also missing a few newlines
> in debug output, and the second one happened when the type of an
> argument changed.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Fixes: d556435156b7 ("jbd2: avoid -Wempty-body warnings")
> Fixes: 6db074618969 ("ext4: use BIT() macro for BH_** state bits")
> Fixes: 5b849b5f96b4 ("jbd2: fast commit recovery path")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Thanks, applied, with one change.
> diff --git a/fs/jbd2/recovery.c b/fs/jbd2/recovery.c
> index 69f18fe20923..60601c5779f1 100644
> --- a/fs/jbd2/recovery.c
> +++ b/fs/jbd2/recovery.c
> @@ -245,15 +245,15 @@ static int fc_do_one_pass(journal_t *journal,
> ....
>
> if (err) {
> - jbd_debug(3, "Fast commit replay: read error");
> + jbd_debug(3, "Fast commit replay: read error\n");
> break;
> }
>
> - jbd_debug(3, "Processing fast commit blk with seq %d");
> + jbd_debug(3, "Processing fast commit blk with seq\n");
This debug statement isn't adding any real value, so I just removed
it.
- Ted
prev parent reply other threads:[~2021-04-10 3:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-09 20:12 [PATCH] ext4: fix debug format string warning Arnd Bergmann
2021-04-10 3:30 ` tytso [this message]
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=YHEbw84HHzViYQfj@mit.edu \
--to=tytso@mit.edu \
--cc=adilger.kernel@dilger.ca \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=axboe@kernel.dk \
--cc=daejun7.park@samsung.com \
--cc=fengnanchang@foxmail.com \
--cc=harshadshirwadkar@gmail.com \
--cc=jack@suse.com \
--cc=johannes.thumshirn@wdc.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=luoshijie1@huawei.com \
--cc=riteshh@linux.ibm.com \
--cc=yili@winhong.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.