From nobody Mon May 11 04:12:42 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01849C433F5 for ; Fri, 15 Apr 2022 08:49:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351533AbiDOIwP (ORCPT ); Fri, 15 Apr 2022 04:52:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232347AbiDOIwM (ORCPT ); Fri, 15 Apr 2022 04:52:12 -0400 Received: from out30-131.freemail.mail.aliyun.com (out30-131.freemail.mail.aliyun.com [115.124.30.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0461C1EEFA for ; Fri, 15 Apr 2022 01:49:43 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R901e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04423;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0VA6o-rv_1650012574; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0VA6o-rv_1650012574) by smtp.aliyun-inc.com(127.0.0.1); Fri, 15 Apr 2022 16:49:40 +0800 From: Jiapeng Chong To: jaegeuk@kernel.org Cc: chao@kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Jiapeng Chong , Abaci Robot Subject: [PATCH] f2fs: Fix signedness bugs in f2fs_gc_pinned_control functions Date: Fri, 15 Apr 2022 16:49:31 +0800 Message-Id: <20220415084931.49880-1-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Fix the following smatch warning: fs/f2fs/gc.c:688 f2fs_gc_pinned_control() warn: signedness bug returning '(-16)'. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- fs/f2fs/gc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 34c097a7821d..4c8ce02a815b 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -679,7 +679,7 @@ static void f2fs_unpin_all_sections(struct f2fs_sb_info= *sbi, bool enable) DIRTY_I(sbi)->enable_pin_section =3D enable; } =20 -static bool f2fs_gc_pinned_control(struct inode *inode, int gc_type, +static int f2fs_gc_pinned_control(struct inode *inode, int gc_type, unsigned int segno) { if (!f2fs_is_pinned_file(inode)) --=20 2.20.1.7.g153144c