Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp5096944ybc; Fri, 15 Nov 2019 14:50:05 -0800 (PST) X-Google-Smtp-Source: APXvYqwLc2df2T9DceSrfmGbLzmb+sFizZHUaSGNn37AZlnYQUTj5ez1B8pQ97nXRgPnAeorCQjO X-Received: by 2002:a17:907:2070:: with SMTP id qp16mr4551064ejb.115.1573858205017; Fri, 15 Nov 2019 14:50:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1573858205; cv=pass; d=google.com; s=arc-20160816; b=T6kU08qdYnX1P2gKHfkF+hq+jXaYqy2sfF/M3NPQjspb5ADV98Zdo0o/wbhYFQCDO/ My3K6v7ETbQvWBXjyxiGQAO44K5ncDcl6rKpXbnhIAar8+qErBAAo5NIV3+bQv4WpEGi uqLuLQSD38nhO3i1Ycces01F5/XmcIR4kcSNbMYFc3w9KdRVK5mXeiC57rvRe1Rxq7UN XuFdEqrMXPXiKKsXWqh8+nG9jXetL1JhBMKvqRAnmQ+DaR0fWF2HBYDoeis3nHtbazsk fPWPUavpZhSuTlcauB1k728ZEDJrN35h8ydmS0HPLey8uRYNUWi2yjUHz5hfhUosiZVc nxLg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :date:subject:message-id:cc:to:from:dkim-signature; bh=y1I3TAKhBcX5pmmERDhysK5rgk4VFAEkUHlJcbXlPrc=; b=BQH786xlrKoZ2XCJfBj3DDuyxr+JEBFTjH8eDcWh0R0jFEFXfCnWTXbpQZvHIGYBE8 FR44q4Y5GbYgMETX01mEs5Rr66wd5VNv+BUZb88amqtMbZ8d9nF1Y/eT0xGyJXQ0D1An klL8P1l2s5YreFNiTkyrPaq/mBQeF/U/PaObAtAcF7hsy61ogwwjwL+6SVKp2JDRILGD q5Cuaz6oZ3As5eWjeZpr6s6JfVv3vTtmuYL6rhSB7ycdlF0c/U/Ow3oK3uvnSzU0nBky t4mIQKjSGc/mdUorzXgXVpc6z5qqdntdiWzLogP4C4l0oGFc32sCswUxHSP5ggsODQJ2 Gz1A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@mykernel.net header.s=zohomail header.b=L0pTRxrC; arc=pass (i=1 spf=pass spfdomain=mykernel.net dkim=pass dkdomain=mykernel.net dmarc=pass fromdomain=mykernel.net>); spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e12si6467074ejr.39.2019.11.15.14.49.27; Fri, 15 Nov 2019 14:50:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@mykernel.net header.s=zohomail header.b=L0pTRxrC; arc=pass (i=1 spf=pass spfdomain=mykernel.net dkim=pass dkdomain=mykernel.net dmarc=pass fromdomain=mykernel.net>); spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726974AbfKOWtV (ORCPT + 99 others); Fri, 15 Nov 2019 17:49:21 -0500 Received: from sender3-of-o52.zoho.com.cn ([124.251.121.247]:21963 "EHLO sender2.zoho.com.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726969AbfKOWtV (ORCPT ); Fri, 15 Nov 2019 17:49:21 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1573858153; cv=none; d=zoho.com.cn; s=zohoarc; b=eIoiCq65n5TCBlHP8EADRekrKKvTjaPaI8RZOmoFE3SJI3jJQFVzWDUnFmhMJqm3WRadG1Tq+JtDxp3mO/s7svMQ0Ujnd0HidixBJnKVrxOA41P7NYb8QAzBYNnpwl6wYxF8j7mjkKbfkRzWiUeTg9EuLgQFDvuHQszI1ORdpBI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com.cn; s=zohoarc; t=1573858153; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:MIME-Version:Message-ID:Subject:To; bh=y1I3TAKhBcX5pmmERDhysK5rgk4VFAEkUHlJcbXlPrc=; b=kcBZCTNq7rYAVOL5CC7oX/E0ISDFm73W9JH10IpQW3zxtXu/xl+oVUAmCKlf67M4mNCeBJ+/KJzyQ/Z3kUUTTrmUOY/xC0u8UMKvAUtNOX6iiwV29Er0V5D6mX/TLhm/dIZhtFyBXKlEJm6ir9hKBd9VQuMH10quGxA5FlPw4CM= ARC-Authentication-Results: i=1; mx.zoho.com.cn; dkim=pass header.i=mykernel.net; spf=pass smtp.mailfrom=cgxu519@mykernel.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1573858153; s=zohomail; d=mykernel.net; i=cgxu519@mykernel.net; h=From:To:Cc:Message-ID:Subject:Date:MIME-Version:Content-Transfer-Encoding:Content-Type; l=1111; bh=y1I3TAKhBcX5pmmERDhysK5rgk4VFAEkUHlJcbXlPrc=; b=L0pTRxrClYgKJz2GLdYFxXXnIgRiRjzFEmXHnCIej2L8VT5bldqrhK1I0PnvXSFU bswA7zYT0vx5kw0iGMgaQ/UDUt5CzVuDYmQ3vyQHBEcGlrDSyRPhUiezqgef/Z46gvi Ak8en6dCOnpz61BhEfDTXIjjnb88a3GEfZr01w04= Received: from localhost.localdomain.localdomain (113.116.50.122 [113.116.50.122]) by mx.zoho.com.cn with SMTPS id 1573858149835730.0826478198351; Sat, 16 Nov 2019 06:49:09 +0800 (CST) From: Chengguang Xu To: jack@suse.com Cc: linux-ext4@vger.kernel.org, Chengguang Xu Message-ID: <20191115224900.2613-1-cgxu519@mykernel.net> Subject: [PATCH] ext2: code cleanup for descriptor_loc() Date: Sat, 16 Nov 2019 06:49:00 +0800 X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoCNMailClient: External Content-Type: text/plain; charset=utf8 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Code cleanup by removing unnecessary variable in descriptor_loc(). Signed-off-by: Chengguang Xu --- fs/ext2/super.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/fs/ext2/super.c b/fs/ext2/super.c index 30c630d73f0f..bef607d5db28 100644 --- a/fs/ext2/super.c +++ b/fs/ext2/super.c @@ -806,7 +806,6 @@ static unsigned long descriptor_loc(struct super_block = *sb, { =09struct ext2_sb_info *sbi =3D EXT2_SB(sb); =09unsigned long bg, first_meta_bg; -=09int has_super =3D 0; =09 =09first_meta_bg =3D le32_to_cpu(sbi->s_es->s_first_meta_bg); =20 @@ -814,10 +813,8 @@ static unsigned long descriptor_loc(struct super_block= *sb, =09 nr < first_meta_bg) =09=09return (logic_sb_block + nr + 1); =09bg =3D sbi->s_desc_per_block * nr; -=09if (ext2_bg_has_super(sb, bg)) -=09=09has_super =3D 1; =20 -=09return ext2_group_first_block_no(sb, bg) + has_super; +=09return ext2_group_first_block_no(sb, bg) + ext2_bg_has_super(sb, bg); } =20 static int ext2_fill_super(struct super_block *sb, void *data, int silent) --=20 2.21.0