From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mout02.posteo.de (mout02.posteo.de [185.67.36.66]) by mx.groups.io with SMTP id smtpd.web11.21964.1662358758513479893 for ; Sun, 04 Sep 2022 23:19:19 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@posteo.de header.s=2017 header.b=kB6C6bOS; spf=pass (domain: posteo.de, ip: 185.67.36.66, mailfrom: mhaeuser@posteo.de) Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id B4907240103 for ; Mon, 5 Sep 2022 08:19:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1662358756; bh=ljm9QQ0Z1Jg+sIMjftt7GdjrSJ1U3zUqZw/UFx84ZRY=; h=From:Subject:Date:Cc:To:From; b=kB6C6bOS4ikf4SN06sCvm2f18GuKBE5QRTzeFPAWoTapbu8hoSLaBfeghXbZjnvkO xH7/ttFJ33dOZLNn/hJ46lJoa5jAypByCC5TFbfhOFKW2+7Q4r80ylmqNyG/Mlze5O 3YhiM6iPNGzwjroHSvMrl+zjL0h1RHe4QEttNL62S3MOeD1TRN5OXO0CtG/OWrNAVK XrXgUulDk4hR82KONxNRd9FGm7VkZ9pZZdIaA7gMkwc4Xe2cls1GnIrO0jaVEwViVO h2Uk4F+/hAlaWC7I5ssbLMzjXeActQlhVCnxJ8aUR1k6Em0RsGUWDJcFDMsjISZTPa 6O4HfVjqAgntg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MLddb6S5vz6tmG; Mon, 5 Sep 2022 08:19:15 +0200 (CEST) From: =?utf-8?Q?Marvin_H=C3=A4user?= Mime-Version: 1.0 (1.0) Subject: Re: [PATCH 1/1] Ext4Pkg: Fix bug in EXT4_HAS_GDT_CSUM Date: Mon, 5 Sep 2022 06:19:15 +0000 Message-Id: <34CAF6AE-E0C9-4703-9A7D-8E9E302E3833@posteo.de> References: <20220905015823.33518-1-pedro.falcato@gmail.com> Cc: devel@edk2.groups.io In-Reply-To: <20220905015823.33518-1-pedro.falcato@gmail.com> To: Pedro Falcato Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > On 5. Sep 2022, at 03:58, Pedro Falcato wrote: >=20 > =EF=BB=BFCatched when running clang-tidy on this code. Also tidies up some= logic > in BlockGroup.c Caught Reviewed-by: Marvin H=C3=A4user >=20 > Cc: Marvin H=C3=A4user > Signed-off-by: Pedro Falcato > --- > Features/Ext4Pkg/Ext4Dxe/BlockGroup.c | 4 ++-- > Features/Ext4Pkg/Ext4Dxe/Ext4Dxe.h | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) >=20 > diff --git a/Features/Ext4Pkg/Ext4Dxe/BlockGroup.c b/Features/Ext4Pkg/Ext4= Dxe/BlockGroup.c > index 572e8f60ab92..cba96cd95afc 100644 > --- a/Features/Ext4Pkg/Ext4Dxe/BlockGroup.c > +++ b/Features/Ext4Pkg/Ext4Dxe/BlockGroup.c > @@ -218,9 +218,9 @@ Ext4CalculateBlockGroupDescChecksum ( > IN UINT32 BlockGroupNum > ) > { > - if ((Partition->FeaturesRoCompat & EXT4_FEATURE_RO_COMPAT_METADATA_CSUM= ) !=3D 0) { > + if (EXT4_HAS_METADATA_CSUM (Partition)) { > return Ext4CalculateBlockGroupDescChecksumMetadataCsum (Partition, Blo= ckGroupDesc, BlockGroupNum); > - } else if ((Partition->FeaturesRoCompat & EXT4_FEATURE_RO_COMPAT_GDT_CS= UM) !=3D 0) { > + } else if (EXT4_HAS_GDT_CSUM (Partition)) { > return Ext4CalculateBlockGroupDescChecksumGdtCsum (Partition, BlockGro= upDesc, BlockGroupNum); > } >=20 > diff --git a/Features/Ext4Pkg/Ext4Dxe/Ext4Dxe.h b/Features/Ext4Pkg/Ext4Dxe= /Ext4Dxe.h > index b446488b2112..81e59a4babc9 100644 > --- a/Features/Ext4Pkg/Ext4Dxe/Ext4Dxe.h > +++ b/Features/Ext4Pkg/Ext4Dxe/Ext4Dxe.h > @@ -1095,7 +1095,7 @@ Ext4CalculateBlockGroupDescChecksum ( > @return TRUE if the gdt_csum is supported, else FALSE. > **/ > #define EXT4_HAS_GDT_CSUM(Partition) = \ > - EXT4_HAS_RO_COMPAT(Partition, EXT4_FEATURE_RO_COMPAT_METADATA_CSUM) > + EXT4_HAS_RO_COMPAT(Partition, EXT4_FEATURE_RO_COMPAT_GDT_CSUM) >=20 > /** > Retrieves the volume name. > --=20 > 2.37.3 >=20