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

fix STM I2C compiler inline issue #15383

Merged
merged 1 commit into from
Feb 23, 2023
Merged

fix STM I2C compiler inline issue #15383

merged 1 commit into from
Feb 23, 2023

Conversation

hallard
Copy link
Contributor

@hallard hallard commented Feb 22, 2023

Summary of changes

fixed #15379

Documentation

removed inline that trigger link issues on STM32WL as @0xc0170 proposal in #15379


Pull request type

[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[x] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers

@0xc0170 @jeromecoutant


@hallard hallard changed the title fixed compiler inline issue fixed STM I2C compiler inline issue Feb 22, 2023
@hallard hallard changed the title fixed STM I2C compiler inline issue fix STM I2C compiler inline issue Feb 22, 2023
Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

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

One slight improvement would be just mark it as static (it's internal helper as I understood

@0xc0170 0xc0170 added the release-type: patch Indentifies a PR as containing just a patch label Feb 22, 2023
@0xc0170
Copy link
Contributor

0xc0170 commented Feb 22, 2023

Let me know if you want to update it and we can test it afterwards

@mergify mergify bot added the needs: CI label Feb 22, 2023
@hallard
Copy link
Contributor Author

hallard commented Feb 22, 2023

if static won't prevent compiler to optimize it as inline it's fine for me, anyway I like the MBED_FORCEINLINE option, works for some time on my side

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 22, 2023

it should work the same way as the funciton below (

static void prep_for_restart_if_needed(struct i2c_s *obj_s) {
).

@hallard
Copy link
Contributor Author

hallard commented Feb 22, 2023

sure but as it's just a var check and return, for performance and overhead I really prefer to see it as inline (as it was when created) and avoid potential "is the compiler his doing is job correctly", as this fix is needed because it don't.

@mbed-ci
Copy link

mbed-ci commented Feb 22, 2023

Jenkins CI Test : ✔️ SUCCESS

Build Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_greentea-test ✔️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

I2C STM32WL Debug : Unable to link because inline are not inlined
6 participants