Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1462144rdd; Wed, 10 Jan 2024 22:55:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IFo09wUChTGtv9qzccZsVnXFvlgRBoaAkPOxUC78A0ssb/F6dz0YxUW8OhZlSku7jpZOv2G X-Received: by 2002:a05:620a:2f2:b0:783:2af7:9113 with SMTP id a18-20020a05620a02f200b007832af79113mr797169qko.108.1704956128258; Wed, 10 Jan 2024 22:55:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704956128; cv=none; d=google.com; s=arc-20160816; b=waR8vd9iSiVsjVES+V5YotC0iowjuN3qRnt1nLuwTh3P1gQdttjehlT2XMfuWaqH69 D9PL7wn0Cv5YJ2wUpqK62ozm/1lge2JsBBbs7P86ycFU85iuTnIbSpZbgCPjAsiUvpe9 lKI6UBGmOG0ZsU1Eel7Tko3eWpHzZx6KIhSAwJqY6hMIDyVVVhq2qCiCm5QBaWoKsUh0 Y0ZWAIt2Co/BbLpa9pGDMNwVkCeZlxCkdFpi/6Ki1OxFb3bWl/iZ6ggl6mvIyY6U86mm MHzEWV49UEbXka0FvBT9Ork9QX1RW7SzI8ViWtHOzTBV5ANXW4xPsQb8jv/Yu7yAFLPP savQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=RITCFoAvzNQJScuU3eu9DjXR49PyNnrf61eZbYeJybI=; fh=MuRPPkErlkeor/WA/YQz0cEuPD8u03/FhPvUGJEK5o8=; b=zpe4JhtZmV7pv6Y92WrgissEJERJN3ZzZuwTgccu1sEu1VDSH4gcxP2WnPnTHIilvB rOw2FYhfxVFhCeAX0PWae5ZuATfGapKqLH57gxJot4BJhEQoMfioF2AD4WMAQxU6SOiM R7Nruv2XV1FvCIbAWxfRRhSoo6T8vHZiUsSQk1hMEJj7hZ2LCyar0bDp4Aob6YobB4Ab gowsFaSmtl/FzEMNo4L7Jkl2cv7sa6Cv/jiI7cfSIkQm1/32swqSPCDBBpe499cyEblf SkNhh8gflxk1608nkX+J+f7eUAyrhZGUSkkGutfiAT1kc/GYduWWhpGAPAjQDyNLKcU5 muAA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-23117-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23117-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id h13-20020a05620a284d00b007830a9a0219si389008qkp.112.2024.01.10.22.55.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 22:55:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-23117-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-23117-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23117-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 0C7461C22BB4 for ; Thu, 11 Jan 2024 06:55:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EB69563B9; Thu, 11 Jan 2024 06:55:21 +0000 (UTC) Received: from mailgw.kylinos.cn (mailgw.kylinos.cn [124.126.103.232]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 892CB63A0 for ; Thu, 11 Jan 2024 06:55:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kylinos.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kylinos.cn X-UUID: 06e8d5df7d514be686305328458a4511-20240111 X-CID-O-RULE: Release_Ham X-CID-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.35,REQID:83a6b7f4-26f0-4521-9e96-b36bb32f8909,IP:15, URL:0,TC:0,Content:-5,EDM:0,RT:0,SF:-9,FILE:0,BULK:0,RULE:Release_Ham,ACTI ON:release,TS:1 X-CID-INFO: VERSION:1.1.35,REQID:83a6b7f4-26f0-4521-9e96-b36bb32f8909,IP:15,UR L:0,TC:0,Content:-5,EDM:0,RT:0,SF:-9,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:1 X-CID-META: VersionHash:5d391d7,CLOUDID:5fec0b2f-1ab8-4133-9780-81938111c800,B ulkID:240111143903VJUGI1AE,BulkQuantity:0,Recheck:0,SF:66|38|24|17|19|45|1 02,TC:nil,Content:0,EDM:-3,IP:-2,URL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,CO L:0,OSI:0,OSA:0,AV:0,LES:1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-CID-FACTOR: TF_CID_SPAM_FSI,TF_CID_SPAM_SNR,TF_CID_SPAM_FAS,TF_CID_SPAM_FSD X-UUID: 06e8d5df7d514be686305328458a4511-20240111 X-User: chentao@kylinos.cn Received: from kernel.. [(116.128.244.169)] by mailgw (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 630914744; Thu, 11 Jan 2024 14:39:00 +0800 From: Kunwu Chan To: richard@nod.at, Artem.Bityutskiy@nokia.com Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, Kunwu Chan , Kunwu Chan , Richard Weinberger Subject: [PATCH v2] ubifs: Remove unreachable code in dbg_check_ltab_lnum Date: Thu, 11 Jan 2024 14:36:56 +0800 Message-Id: <20240111063656.68810-1-chentao@kylinos.cn> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Because there is no break statement in the dead loop above,it is impossible to execute the 'err=0' statement.Delete the code that will never execute. Fixes: 6fb324a4b0c3 ("UBIFS: allocate ltab checking buffer on demand") Signed-off-by: Kunwu Chan Cc: Kunwu Chan Suggested-by: Richard Weinberger --- v2: Remove the initialization of err --- fs/ubifs/lpt_commit.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/ubifs/lpt_commit.c b/fs/ubifs/lpt_commit.c index c4d079328b92..07351fdce722 100644 --- a/fs/ubifs/lpt_commit.c +++ b/fs/ubifs/lpt_commit.c @@ -1646,7 +1646,6 @@ static int dbg_check_ltab_lnum(struct ubifs_info *c, int lnum) len -= node_len; } - err = 0; out: vfree(buf); return err; -- 2.39.2