From patchwork Tue Dec 20 17:17:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Shtylyov X-Patchwork-Id: 13078069 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 lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D0304C4332F for ; Tue, 20 Dec 2022 17:17:50 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1p7gFQ-0007ox-Ia; Tue, 20 Dec 2022 17:17:48 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1p7gFP-0007or-GI for linux-f2fs-devel@lists.sourceforge.net; Tue, 20 Dec 2022 17:17:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:Content-Type:MIME-Version :Date:Message-ID:CC:To:Subject:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=imbAOY3T7mH/tQi0uczJlXYr4gaLEeUPuGsh7bAYb8w=; b=UTrISbWqI9fSaCPE6jVI3rrYGW 5o2XbEZSlGm0pjk9ewPjxBNaeltCDaq8MGiSkMQ0svYN6Xa24RgfHymzQI6m5I9y+8DSx32xovU5I auGaMLRwqJ5VMV0fsf94rkBe9DYk9PsKBzZAT0uvgnlzM6LPf6J1S2eEp0Bke/eXn3hY=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Date:Message-ID:CC:To :Subject:From:Sender:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=imbAOY3T7mH/tQi0uczJlXYr4gaLEeUPuGsh7bAYb8w=; b=W 0pwdXLzNajQM2+UHTMuv6wFqmkMiAigrejPKZ0A3eibVObNl78uQYoXXspP9YOs31rciThrb7pMD2 CTv3N2mk4ELyaV7AdKjrxPlylVtq+DS7OTbG1gbGhjONWn5J7xqhQtAhYj8rJUMxQYPP1/euQZztV 5e/zseYY0dxGWzS4=; Received: from mx01.omp.ru ([90.154.21.10]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-SHA384:256) (Exim 4.95) id 1p7gFO-0000A8-U2 for linux-f2fs-devel@lists.sourceforge.net; Tue, 20 Dec 2022 17:17:47 +0000 Received: from [192.168.1.103] (31.173.87.192) by msexch01.omp.ru (10.188.4.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.986.14; Tue, 20 Dec 2022 20:17:32 +0300 From: Sergey Shtylyov To: Jaegeuk Kim , Chao Yu , Organization: Open Mobile Platform Message-ID: <38010b42-afd3-5394-09df-2378b7b5d10f@omp.ru> Date: Tue, 20 Dec 2022 20:17:32 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 Content-Language: en-US X-Originating-IP: [31.173.87.192] X-ClientProxiedBy: msexch01.omp.ru (10.188.4.12) To msexch01.omp.ru (10.188.4.12) X-KSE-ServerInfo: msexch01.omp.ru, 9 X-KSE-AntiSpam-Interceptor-Info: scan successful X-KSE-AntiSpam-Version: 5.9.59, Database issued on: 12/20/2022 17:00:54 X-KSE-AntiSpam-Status: KAS_STATUS_NOT_DETECTED X-KSE-AntiSpam-Method: none X-KSE-AntiSpam-Rate: 59 X-KSE-AntiSpam-Info: Lua profiles 174313 [Dec 20 2022] X-KSE-AntiSpam-Info: Version: 5.9.59.0 X-KSE-AntiSpam-Info: Envelope from: s.shtylyov@omp.ru X-KSE-AntiSpam-Info: LuaCore: 502 502 69dee8ef46717dd3cb3eeb129cb7cc8dab9e30f6 X-KSE-AntiSpam-Info: {rep_avail} X-KSE-AntiSpam-Info: {Tracking_from_domain_doesnt_match_to} X-KSE-AntiSpam-Info: {relay has no DNS name} X-KSE-AntiSpam-Info: {SMTP from is not routable} X-KSE-AntiSpam-Info: {Found in DNSBL: 31.173.87.192 in (user) b.barracudacentral.org} X-KSE-AntiSpam-Info: {Found in DNSBL: 31.173.87.192 in (user) dbl.spamhaus.org} X-KSE-AntiSpam-Info: d41d8cd98f00b204e9800998ecf8427e.com:7.1.1; 127.0.0.199:7.1.2; omp.ru:7.1.1 X-KSE-AntiSpam-Info: ApMailHostAddress: 31.173.87.192 X-KSE-AntiSpam-Info: {DNS response errors} X-KSE-AntiSpam-Info: Rate: 59 X-KSE-AntiSpam-Info: Status: not_detected X-KSE-AntiSpam-Info: Method: none X-KSE-AntiSpam-Info: Auth:dmarc=temperror header.from=omp.ru;spf=temperror smtp.mailfrom=omp.ru;dkim=none X-KSE-Antiphishing-Info: Clean X-KSE-Antiphishing-ScanningType: Heuristic X-KSE-Antiphishing-Method: None X-KSE-Antiphishing-Bases: 12/20/2022 17:03:00 X-KSE-AttachmentFiltering-Interceptor-Info: protection disabled X-KSE-Antivirus-Interceptor-Info: scan successful X-KSE-Antivirus-Info: Clean, bases: 12/20/2022 2:00:00 PM X-KSE-BulkMessagesFiltering-Scan-Result: InTheLimit X-Headers-End: 1p7gFO-0000A8-U2 Subject: [f2fs-dev] [PATCH REPOST] f2fs: file: drop useless initializer in expand_inode_data() X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvc-patches@linuxtesting.org, lvc-project@linuxtesting.org Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net In expand_inode_data(), the 'new_size' local variable is initialized to the result of i_size_read(), however this value isn't ever used, so we can drop this initializer... Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool. Signed-off-by: Sergey Shtylyov Reviewed-by: Chao Yu --- This patch is against the 'dev' branch of Jaegeuk Kim's F2FS repo... Reposting with ISP RAS mailing lists CC'ed now... fs/f2fs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: f2fs/fs/f2fs/file.c =================================================================== --- f2fs.orig/fs/f2fs/file.c +++ f2fs/fs/f2fs/file.c @@ -1697,7 +1697,7 @@ static int expand_inode_data(struct inod .err_gc_skipped = true, .nr_free_secs = 0 }; pgoff_t pg_start, pg_end; - loff_t new_size = i_size_read(inode); + loff_t new_size; loff_t off_end; block_t expanded = 0; int err;