Message ID | 20220115041458.697148-1-alex.hung@canonical.com |
---|---|
State | Accepted |
Headers | show |
Series | fwts_acpica: skip unneccessary null check | expand |
On 1/15/22 12:14 PM, Alex Hung wrote: > Buglink: https://bugs.launchpad.net/bugs/1952671 > > "context" is always passed as NULL so it should not be used or checked. > > Signed-off-by: Alex Hung <alex.hung@canonical.com> > --- > src/libfwtsacpica/fwts_acpica.c | 6 ------ > 1 file changed, 6 deletions(-) > > diff --git a/src/libfwtsacpica/fwts_acpica.c b/src/libfwtsacpica/fwts_acpica.c > index a0ef1c21..50231464 100644 > --- a/src/libfwtsacpica/fwts_acpica.c > +++ b/src/libfwtsacpica/fwts_acpica.c > @@ -313,9 +313,6 @@ static ACPI_STATUS fwts_region_handler( > case AML_FIELD_ATTRIB_BYTES: > case AML_FIELD_ATTRIB_RAW_BYTES: > case AML_FIELD_ATTRIB_RAW_PROCESS_BYTES: > - if (!context) > - return AE_BAD_PARAMETER; > - length = context->AccessLength - 2; > break; > default: > break; > @@ -340,9 +337,6 @@ static ACPI_STATUS fwts_region_handler( > case AML_FIELD_ATTRIB_BYTES: > case AML_FIELD_ATTRIB_RAW_BYTES: > case AML_FIELD_ATTRIB_RAW_PROCESS_BYTES: > - if (!context) > - return AE_BAD_PARAMETER; > - length = context->AccessLength - 2; > break; > default: > break; > Acked-by: Alex Hung <alex.hung@canonical.com>
Thanks, Alex. Looks good to me. Reviewed-by: Sunny Wang <sunny.wang@arm.com> We will test the fix once we get a system. Best Regards, Sunny -----Original Message----- From: fwts-devel <fwts-devel-bounces@lists.ubuntu.com> On Behalf Of ivanhu Sent: 17 January 2022 04:05 To: fwts-devel@lists.ubuntu.com Subject: ACK: [PATCH] fwts_acpica: skip unneccessary null check On 1/15/22 12:14 PM, Alex Hung wrote: > Buglink: https://bugs.launchpad.net/bugs/1952671 > > "context" is always passed as NULL so it should not be used or checked. > > Signed-off-by: Alex Hung <alex.hung@canonical.com> > --- > src/libfwtsacpica/fwts_acpica.c | 6 ------ > 1 file changed, 6 deletions(-) > > diff --git a/src/libfwtsacpica/fwts_acpica.c b/src/libfwtsacpica/fwts_acpica.c > index a0ef1c21..50231464 100644 > --- a/src/libfwtsacpica/fwts_acpica.c > +++ b/src/libfwtsacpica/fwts_acpica.c > @@ -313,9 +313,6 @@ static ACPI_STATUS fwts_region_handler( > case AML_FIELD_ATTRIB_BYTES: > case AML_FIELD_ATTRIB_RAW_BYTES: > case AML_FIELD_ATTRIB_RAW_PROCESS_BYTES: > - if (!context) > - return AE_BAD_PARAMETER; > - length = context->AccessLength - 2; > break; > default: > break; > @@ -340,9 +337,6 @@ static ACPI_STATUS fwts_region_handler( > case AML_FIELD_ATTRIB_BYTES: > case AML_FIELD_ATTRIB_RAW_BYTES: > case AML_FIELD_ATTRIB_RAW_PROCESS_BYTES: > - if (!context) > - return AE_BAD_PARAMETER; > - length = context->AccessLength - 2; > break; > default: > break; > Acked-by: Alex Hung <alex.hung@canonical.com> -- fwts-devel mailing list fwts-devel@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/fwts-devel IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
Just got a system to run FWTS with this fix. Confirmed that the issue got fixed. Thanks again, Alex -----Original Message----- From: Sunny Wang <Sunny.Wang@arm.com> Sent: 17 January 2022 16:03 To: ivanhu <ivan.hu@canonical.com>; fwts-devel@lists.ubuntu.com Cc: G Edhaya Chandran <Edhaya.Chandran@arm.com>; Sunny Wang <Sunny.Wang@arm.com> Subject: RE: ACK: [PATCH] fwts_acpica: skip unneccessary null check Thanks, Alex. Looks good to me. Reviewed-by: Sunny Wang <sunny.wang@arm.com> We will test the fix once we get a system. Best Regards, Sunny -----Original Message----- From: fwts-devel <fwts-devel-bounces@lists.ubuntu.com> On Behalf Of ivanhu Sent: 17 January 2022 04:05 To: fwts-devel@lists.ubuntu.com Subject: ACK: [PATCH] fwts_acpica: skip unneccessary null check On 1/15/22 12:14 PM, Alex Hung wrote: > Buglink: https://bugs.launchpad.net/bugs/1952671 > > "context" is always passed as NULL so it should not be used or checked. > > Signed-off-by: Alex Hung <alex.hung@canonical.com> > --- > src/libfwtsacpica/fwts_acpica.c | 6 ------ > 1 file changed, 6 deletions(-) > > diff --git a/src/libfwtsacpica/fwts_acpica.c b/src/libfwtsacpica/fwts_acpica.c > index a0ef1c21..50231464 100644 > --- a/src/libfwtsacpica/fwts_acpica.c > +++ b/src/libfwtsacpica/fwts_acpica.c > @@ -313,9 +313,6 @@ static ACPI_STATUS fwts_region_handler( > case AML_FIELD_ATTRIB_BYTES: > case AML_FIELD_ATTRIB_RAW_BYTES: > case AML_FIELD_ATTRIB_RAW_PROCESS_BYTES: > - if (!context) > - return AE_BAD_PARAMETER; > - length = context->AccessLength - 2; > break; > default: > break; > @@ -340,9 +337,6 @@ static ACPI_STATUS fwts_region_handler( > case AML_FIELD_ATTRIB_BYTES: > case AML_FIELD_ATTRIB_RAW_BYTES: > case AML_FIELD_ATTRIB_RAW_PROCESS_BYTES: > - if (!context) > - return AE_BAD_PARAMETER; > - length = context->AccessLength - 2; > break; > default: > break; > Acked-by: Alex Hung <alex.hung@canonical.com> -- fwts-devel mailing list fwts-devel@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/fwts-devel IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
diff --git a/src/libfwtsacpica/fwts_acpica.c b/src/libfwtsacpica/fwts_acpica.c index a0ef1c21..50231464 100644 --- a/src/libfwtsacpica/fwts_acpica.c +++ b/src/libfwtsacpica/fwts_acpica.c @@ -313,9 +313,6 @@ static ACPI_STATUS fwts_region_handler( case AML_FIELD_ATTRIB_BYTES: case AML_FIELD_ATTRIB_RAW_BYTES: case AML_FIELD_ATTRIB_RAW_PROCESS_BYTES: - if (!context) - return AE_BAD_PARAMETER; - length = context->AccessLength - 2; break; default: break; @@ -340,9 +337,6 @@ static ACPI_STATUS fwts_region_handler( case AML_FIELD_ATTRIB_BYTES: case AML_FIELD_ATTRIB_RAW_BYTES: case AML_FIELD_ATTRIB_RAW_PROCESS_BYTES: - if (!context) - return AE_BAD_PARAMETER; - length = context->AccessLength - 2; break; default: break;
Buglink: https://bugs.launchpad.net/bugs/1952671 "context" is always passed as NULL so it should not be used or checked. Signed-off-by: Alex Hung <alex.hung@canonical.com> --- src/libfwtsacpica/fwts_acpica.c | 6 ------ 1 file changed, 6 deletions(-)