From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40DD5C43460 for ; Sat, 10 Apr 2021 03:32:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 01C85611AF for ; Sat, 10 Apr 2021 03:32:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234067AbhDJDcY (ORCPT ); Fri, 9 Apr 2021 23:32:24 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:32873 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229665AbhDJDbI (ORCPT ); Fri, 9 Apr 2021 23:31:08 -0400 Received: from cwcc.thunk.org (pool-72-74-133-215.bstnma.fios.verizon.net [72.74.133.215]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 13A3UCti013647 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 9 Apr 2021 23:30:12 -0400 Received: by cwcc.thunk.org (Postfix, from userid 15806) id E0D1615C3B12; Fri, 9 Apr 2021 23:30:11 -0400 (EDT) Date: Fri, 9 Apr 2021 23:30:11 -0400 From: tytso@mit.edu To: Arnd Bergmann Cc: Andreas Dilger , Jan Kara , Arnd Bergmann , Ritesh Harjani , Harshad Shirwadkar , kernel test robot , Daejun Park , Yi Li , Jens Axboe , Johannes Thumshirn , changfengnan , Shijie Luo , linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ext4: fix debug format string warning Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210409201211.1866633-1-arnd@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 09, 2021 at 10:12:05PM +0200, Arnd Bergmann wrote: > From: Arnd Bergmann > > 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 > 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 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