* [PATCH 1/1] Ext4Pkg: Fix bug in EXT4_HAS_GDT_CSUM
@ 2022-09-05 1:58 Pedro Falcato
2022-09-05 6:19 ` Marvin Häuser
0 siblings, 1 reply; 3+ messages in thread
From: Pedro Falcato @ 2022-09-05 1:58 UTC (permalink / raw)
To: devel; +Cc: Pedro Falcato, Marvin Häuser
Catched when running clang-tidy on this code. Also tidies up some logic
in BlockGroup.c
Cc: Marvin Häuser <mhaeuser@posteo.de>
Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
---
Features/Ext4Pkg/Ext4Dxe/BlockGroup.c | 4 ++--
Features/Ext4Pkg/Ext4Dxe/Ext4Dxe.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Features/Ext4Pkg/Ext4Dxe/BlockGroup.c b/Features/Ext4Pkg/Ext4Dxe/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) != 0) {
+ if (EXT4_HAS_METADATA_CSUM (Partition)) {
return Ext4CalculateBlockGroupDescChecksumMetadataCsum (Partition, BlockGroupDesc, BlockGroupNum);
- } else if ((Partition->FeaturesRoCompat & EXT4_FEATURE_RO_COMPAT_GDT_CSUM) != 0) {
+ } else if (EXT4_HAS_GDT_CSUM (Partition)) {
return Ext4CalculateBlockGroupDescChecksumGdtCsum (Partition, BlockGroupDesc, BlockGroupNum);
}
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)
/**
Retrieves the volume name.
--
2.37.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] Ext4Pkg: Fix bug in EXT4_HAS_GDT_CSUM
2022-09-05 1:58 [PATCH 1/1] Ext4Pkg: Fix bug in EXT4_HAS_GDT_CSUM Pedro Falcato
@ 2022-09-05 6:19 ` Marvin Häuser
2022-09-05 22:37 ` Pedro Falcato
0 siblings, 1 reply; 3+ messages in thread
From: Marvin Häuser @ 2022-09-05 6:19 UTC (permalink / raw)
To: Pedro Falcato; +Cc: devel
> On 5. Sep 2022, at 03:58, Pedro Falcato <pedro.falcato@gmail.com> wrote:
>
> Catched when running clang-tidy on this code. Also tidies up some logic
> in BlockGroup.c
Caught
Reviewed-by: Marvin Häuser <mhaeuser@posteo.de>
>
> Cc: Marvin Häuser <mhaeuser@posteo.de>
> Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
> ---
> Features/Ext4Pkg/Ext4Dxe/BlockGroup.c | 4 ++--
> Features/Ext4Pkg/Ext4Dxe/Ext4Dxe.h | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/Features/Ext4Pkg/Ext4Dxe/BlockGroup.c b/Features/Ext4Pkg/Ext4Dxe/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) != 0) {
> + if (EXT4_HAS_METADATA_CSUM (Partition)) {
> return Ext4CalculateBlockGroupDescChecksumMetadataCsum (Partition, BlockGroupDesc, BlockGroupNum);
> - } else if ((Partition->FeaturesRoCompat & EXT4_FEATURE_RO_COMPAT_GDT_CSUM) != 0) {
> + } else if (EXT4_HAS_GDT_CSUM (Partition)) {
> return Ext4CalculateBlockGroupDescChecksumGdtCsum (Partition, BlockGroupDesc, BlockGroupNum);
> }
>
> 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)
>
> /**
> Retrieves the volume name.
> --
> 2.37.3
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] Ext4Pkg: Fix bug in EXT4_HAS_GDT_CSUM
2022-09-05 6:19 ` Marvin Häuser
@ 2022-09-05 22:37 ` Pedro Falcato
0 siblings, 0 replies; 3+ messages in thread
From: Pedro Falcato @ 2022-09-05 22:37 UTC (permalink / raw)
To: Marvin Häuser; +Cc: edk2-devel-groups-io
[-- Attachment #1: Type: text/plain, Size: 2297 bytes --]
Pushed as bcad50b
<https://github.com/tianocore/edk2-platforms/commit/bcad50b813efc0552163ca76441bbe8221afb68c>
On Mon, Sep 5, 2022 at 7:19 AM Marvin Häuser <mhaeuser@posteo.de> wrote:
>
>
> > On 5. Sep 2022, at 03:58, Pedro Falcato <pedro.falcato@gmail.com> wrote:
> >
> > Catched when running clang-tidy on this code. Also tidies up some logic
> > in BlockGroup.c
>
> Caught
>
> Reviewed-by: Marvin Häuser <mhaeuser@posteo.de>
>
> >
> > Cc: Marvin Häuser <mhaeuser@posteo.de>
> > Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
> > ---
> > Features/Ext4Pkg/Ext4Dxe/BlockGroup.c | 4 ++--
> > Features/Ext4Pkg/Ext4Dxe/Ext4Dxe.h | 2 +-
> > 2 files changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/Features/Ext4Pkg/Ext4Dxe/BlockGroup.c
> b/Features/Ext4Pkg/Ext4Dxe/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) != 0) {
> > + if (EXT4_HAS_METADATA_CSUM (Partition)) {
> > return Ext4CalculateBlockGroupDescChecksumMetadataCsum (Partition,
> BlockGroupDesc, BlockGroupNum);
> > - } else if ((Partition->FeaturesRoCompat &
> EXT4_FEATURE_RO_COMPAT_GDT_CSUM) != 0) {
> > + } else if (EXT4_HAS_GDT_CSUM (Partition)) {
> > return Ext4CalculateBlockGroupDescChecksumGdtCsum (Partition,
> BlockGroupDesc, BlockGroupNum);
> > }
> >
> > 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)
> >
> > /**
> > Retrieves the volume name.
> > --
> > 2.37.3
> >
>
>
--
Pedro Falcato
[-- Attachment #2: Type: text/html, Size: 3353 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-09-05 22:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-05 1:58 [PATCH 1/1] Ext4Pkg: Fix bug in EXT4_HAS_GDT_CSUM Pedro Falcato
2022-09-05 6:19 ` Marvin Häuser
2022-09-05 22:37 ` Pedro Falcato
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox