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

Moving the global variable from header file into library instances #473

Merged
merged 7 commits into from Apr 27, 2024

Conversation

kuqin12
Copy link
Contributor

@kuqin12 kuqin12 commented Apr 26, 2024

Description

The current implementation of instantiating global variables will make each c file that includes this header to carry a copy of such variable, which is space redundant.

This change removed the variable into the single module that uses it and removed the structure it defines. The function descriptions are also updated.

  • Impacts functionality?
    • Functionality - Does the change ultimately impact how firmware functions?
    • Examples: Add a new library, publish a new PPI, update an algorithm, ...
  • Impacts security?
    • Security - Does the change have a direct security impact on an application,
      flow, or firmware?
    • Examples: Crypto algorithm change, buffer overflow fix, parameter
      validation improvement, ...
  • Breaking change?
    • Breaking change - Will anyone consuming this change experience a break
      in build or boot behavior?
    • Examples: Add a new library class, move a module to a different repo, call
      a function in a new library class in a pre-existing module, ...
  • Includes tests?
    • Tests - Does the change include any explicit test code?
    • Examples: Unit tests, integration tests, robot tests, ...
  • Includes documentation?
    • Documentation - Does the change contain explicit documentation additions
      outside direct code modifications (and comments)?
    • Examples: Update readme file, add feature readme file, link to documentation
      on an a separate Web page, ...

How This Was Tested

This is a non-functional change.

Integration Instructions

N/A

@github-actions github-actions bot added impact:non-functional Does not have a functional impact type:documentation Improvements or additions to documentation labels Apr 26, 2024
@codecov-commenter
Copy link

codecov-commenter commented Apr 26, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 12.13%. Comparing base (e6308e0) to head (04ae0ce).

Files Patch % Lines
...eviceIdSupportLibNull/MfciDeviceIdSupportLibNull.c 0.00% 2 Missing ⚠️
Additional details and impacted files
@@                Coverage Diff                 @@
##           release/202311     #473      +/-   ##
==================================================
+ Coverage           12.11%   12.13%   +0.02%     
==================================================
  Files                 110      110              
  Lines               19024    18991      -33     
  Branches             1735     1756      +21     
==================================================
  Hits                 2305     2305              
+ Misses              16687    16654      -33     
  Partials               32       32              
Flag Coverage Δ
MfciPkg 39.37% <0.00%> (+0.86%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kuqin12 kuqin12 marked this pull request as draft April 26, 2024 18:23
kuqin12 and others added 2 commits April 26, 2024 13:21
Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com>
@kuqin12 kuqin12 changed the title Moving the global variable from header file into MfciDxe Moving the global variable from header file into library instances Apr 26, 2024
@kuqin12 kuqin12 marked this pull request as ready for review April 26, 2024 21:31
@kuqin12
Copy link
Contributor Author

kuqin12 commented Apr 27, 2024

Merging the change to unblock the upcoming STATIC change from basecore.

@kuqin12 kuqin12 merged commit da051c7 into microsoft:release/202311 Apr 27, 2024
29 checks passed
ProjectMuBot added a commit to microsoft/mu_tiano_platforms that referenced this pull request Apr 27, 2024
Introduces 3 new commits in [Common/MU](https://github.com/microsoft/mu_plus.git).

<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/microsoft/mu_plus/commit/cd7ce3ed8ae3ab38cdff67df6b8379a343347d52">cd7ce3</a> Relax report length requirements (<a href="https://github.com/microsoft/mu_plus/pull/455">#455</a>)</li>
<li><a href="https://github.com/microsoft/mu_plus/commit/e6308e0591505cacf9a142d4f091fd863f9f2fc8">e6308e</a> GitHub Action: Bump robinraju/release-downloader from 1.9 to 1.10 (<a href="https://github.com/microsoft/mu_plus/pull/472">#472</a>)</li>
<li><a href="https://github.com/microsoft/mu_plus/commit/da051c707f056617f8e10bf9f3cc5071bc504d83">da051c</a> Moving the global variable from header file into library instances (<a href="https://github.com/microsoft/mu_plus/pull/473">#473</a>)</li>
</ul>
</details>

Signed-off-by: Project Mu Bot <mubot@microsoft.com>
apop5 pushed a commit to microsoft/mu_tiano_platforms that referenced this pull request Apr 29, 2024
Bumps Common/MU from `2023110000.0.5` to `2023110000.0.6`


Introduces 3 new commits in
[Common/MU](https://github.com/microsoft/mu_plus.git).

<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/microsoft/mu_plus/commit/cd7ce3ed8ae3ab38cdff67df6b8379a343347d52">cd7ce3</a>
Relax report length requirements (<a
href="https://github.com/microsoft/mu_plus/pull/455">#455</a>)</li>
<li><a
href="https://github.com/microsoft/mu_plus/commit/e6308e0591505cacf9a142d4f091fd863f9f2fc8">e6308e</a>
GitHub Action: Bump robinraju/release-downloader from 1.9 to 1.10 (<a
href="https://github.com/microsoft/mu_plus/pull/472">#472</a>)</li>
<li><a
href="https://github.com/microsoft/mu_plus/commit/da051c707f056617f8e10bf9f3cc5071bc504d83">da051c</a>
Moving the global variable from header file into library instances (<a
href="https://github.com/microsoft/mu_plus/pull/473">#473</a>)</li>
</ul>
</details>

Signed-off-by: Project Mu Bot <mubot@microsoft.com>

---------

Signed-off-by: Project Mu Bot <mubot@microsoft.com>
Co-authored-by: Kun Qin <kuqin@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact:non-functional Does not have a functional impact type:documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants