Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArmPlatformPkg/Driver/PL061Gpio: Error checking for pin on release build #5892

Merged
merged 2 commits into from
Jul 16, 2024

Conversation

LeviYeoReum
Copy link
Contributor

@LeviYeoReum LeviYeoReum commented Jul 9, 2024

Description

ASSERT_EFI_ERROR would be removed in release build.
This means It would trigger wrong behavior when Invalid PIN number given
to Get(), Set() and GetMode().

Adding error check routine for invalid pin number and before check the
pin number, check first other argument given to each function.

Signed-off-by: Levi Yun [email protected]

  • Breaking change?
    • Breaking change - Will this cause a break in build or boot behavior?
    • Examples: Add a new library class or move a module to a different repo.
  • Impacts security?
    • Security - Does the change have a direct security impact?
    • Examples: Crypto algorithm change or buffer overflow fix.
  • Includes tests?
    • Tests - Does the change include any explicit test code?
    • Examples: Unit tests or integration tests.

How This Was Tested

Build with release.

Integration Instructions

N/A

Copy link
Member

@ardbiesheuvel ardbiesheuvel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please replace PIN with pin - this is not a 'PIN number' but a metaphorical pin like the one you would find on a power plug, for instance.

The change itself looks fine to me.

@LeviYeoReum
Copy link
Contributor Author

Thanks, I've fixed :)

Copy link
Member

@ardbiesheuvel ardbiesheuvel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix typos: erorr -> error, nubmer -> number

ASSERT_EFI_ERROR would be removed in release build.
This means it would trigger wrong behavior when invalid pin number given
to Get(), Set() and GetMode().

Adding error check routine for invalid pin number and before check the
pin number, check first other argument given to each function.

Signed-off-by: Levi Yun <[email protected]>
@LeviYeoReum LeviYeoReum changed the title ArmPlatformPkg/Driver/PL061Gpio: Erorr checking for PIN on release build ArmPlatformPkg/Driver/PL061Gpio: Error checking for pin on release build Jul 15, 2024
@ardbiesheuvel ardbiesheuvel added the push Auto push patch series in PR if all checks pass label Jul 16, 2024
@mergify mergify bot merged commit 690f13f into tianocore:master Jul 16, 2024
127 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
push Auto push patch series in PR if all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants