Message ID | 20240111063656.68810-1-chentao@kylinos.cn |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-23117-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2411:b0:101:2151:f287 with SMTP id m17csp1270752dyi; Wed, 10 Jan 2024 22:55:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IFiB0ggk7c+WGhDQglJIyeq6+qkI+9dZxWhXC2/xUiyvWJesp5+KpwXHa8jP40SC89bZdwS X-Received: by 2002:a17:906:8d2:b0:a28:1c0b:eabf with SMTP id o18-20020a17090608d200b00a281c0beabfmr318761eje.94.1704956137212; Wed, 10 Jan 2024 22:55:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704956137; cv=none; d=google.com; s=arc-20160816; b=ckghQhp0os7PY1bImMErB6ke9mTMEfMza01ORfZ6Beoj88PvePzfGTMsuBPK5VtgYU N6n0dm90ualBTZaetMkXrdCZ2qEt+dro2q1ZzYkesZt2/v9yLfbTYaJ25xhuQvFFaQpx tiVHf24jfdFX9ZcUTsCC9DmhWFFOzyhLE79HK4NV2RSMh0M5+oYfDzAY1JMnT6GC8kwH H+Zso0PYu+f5oryei8metfMAXSHl01TFbfXkvu052gwdECd/j/vDJXFeJTZ4waN4prxj 82iriJ+wWhVOD+7yKDtn7bkbrRzScs1sdXu14aWjcRFjV6UVdLaS+EbZz1xqx4tp32nI 8TDQ== 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-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23117-ouuuleilei=gmail.com@vger.kernel.org" Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id j22-20020a170906255600b00a28d094f4c9si223948ejb.635.2024.01.10.22.55.37 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 22:55:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-23117-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-23117-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23117-ouuuleilei=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 am.mirrors.kernel.org (Postfix) with ESMTPS id D03F61F2380E for <ouuuleilei@gmail.com>; Thu, 11 Jan 2024 06:55:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EF5A36AD9; Thu, 11 Jan 2024 06:55:22 +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 <linux-kernel@vger.kernel.org>; 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 <chentao@kylinos.cn>) (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 <chentao@kylinos.cn> To: richard@nod.at, Artem.Bityutskiy@nokia.com Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, Kunwu Chan <chentao@kylinos.cn>, Kunwu Chan <kunwu.chan@hotmail.com>, Richard Weinberger <richard.weinberger@gmail.com> 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: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787776086562066550 X-GMAIL-MSGID: 1787776086562066550 |
Series |
[v2] ubifs: Remove unreachable code in dbg_check_ltab_lnum
|
|
Commit Message
Kunwu Chan
Jan. 11, 2024, 6:36 a.m. UTC
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 <chentao@kylinos.cn>
Cc: Kunwu Chan <kunwu.chan@hotmail.com>
Suggested-by: Richard Weinberger <richard.weinberger@gmail.com>
---
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;