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

Cypress: Fix unitialized memory in spi_master_write #12819

Merged
merged 1 commit into from
Apr 17, 2020

Conversation

kyle-cypress
Copy link

Summary of changes

'received' was declared as an int but populated by cyhal_spi_transfer
after being cast to to (uint8_t *), which left the upper 3 bytes
uninitialized. Instead, declare as uint8_t and let the compiler upcast
the value when it is returned.

Impact of changes

NA

Migration actions required

NA

Documentation

NA


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)
[] Covered by existing mbed-os tests (Greentea or Unittest)
[x] Tests / results supplied as part of this PR

The sleep tests and general_filesystem are known issues that are being worked on.
The failures on CY8CPROTO_064_SB are an intermittent pyocd programming failure that we are investigating.
GT_FT_KIT_062_BLE_GCC.txt
GT_FT_KIT_062_WIFI_BT_GCC.txt
GT_FT_KIT_062S2_43012_GCC.txt
GT_FT_KIT_EVB_43012_GCC.txt
GT_FT_P6S1_43012EVB_01_GCC.txt
GT_FT_PROTO_062_4343W_GCC.txt
GT_FT_PROTO_062S3_4343W.txt
GT_FT_PROTO_064_SB_GCC.txt


Reviewers

@ARMmbed/team-cypress


'received' was declared as an int but populated by cyhal_spi_transfer
after being cast to to (uint8_t *), which left the upper 3 bytes
uninitialized. Instead, declare as uint8_t and let the compiler upcast
the value when it is returned.
@ciarmcom ciarmcom requested review from maclobdell and a team April 17, 2020 01:00
@ciarmcom
Copy link
Member

@kyle-cypress, thank you for your changes.
@maclobdell @ARMmbed/mbed-os-maintainers please review.

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 17, 2020

CI started

@mergify mergify bot added needs: CI and removed needs: review labels Apr 17, 2020
@mbed-ci
Copy link

mbed-ci commented Apr 17, 2020

Test run: SUCCESS

Summary: 6 of 6 test jobs passed
Build number : 1
Build artifacts

@0xc0170 0xc0170 merged commit a1c7cf5 into ARMmbed:master Apr 17, 2020
@mergify mergify bot removed the ready for merge label Apr 17, 2020
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.

4 participants