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

target/riscv: make mem_access_result_t enum type safe #1227

Merged
merged 2 commits into from
Feb 26, 2025

Conversation

fk-sc
Copy link
Contributor

@fk-sc fk-sc commented Feb 13, 2025

Make mem_access_result_t enum type safe and fix related problems

@fk-sc
Copy link
Contributor Author

fk-sc commented Feb 13, 2025

This MR is based on #1194, #1218 and #1224. So it has to be merged after them

@fk-sc fk-sc force-pushed the fk-sc/type-safe-enum branch 2 times, most recently from 03ccc95 to 96fd974 Compare February 14, 2025 14:15
Copy link
Collaborator

@MarekVCodasip MarekVCodasip left a comment

Choose a reason for hiding this comment

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

This style of error handling seems to be a bit unusual compared to the rest of OpenOCD codebase.

However, I understand why you did it like that and I don't mind this different style.

That being said, please could you add few comments, that explain why it is done this way. So that future readers do not have to wonder. Thanks.

@fk-sc fk-sc force-pushed the fk-sc/type-safe-enum branch from 96fd974 to 58471e5 Compare February 20, 2025 13:28
MarekVCodasip
MarekVCodasip previously approved these changes Feb 20, 2025
Set appropriate memory access result codes

Checkpatch-ignore: MACRO_ARG_PRECEDENCE, MULTISTATEMENT_MACRO_USE_DO_WHILE
Checkpatch-ignore: TRAILING_SEMICOLON
Change-Id: Ib73b5a041e5f15aef150b80fdd45f107de19d3a6
Signed-off-by: Farid Khaydari <[email protected]>
Make mem_access_result_t enum type safe and fix related problems

Checkpatch-ignore: MACRO_ARG_PRECEDENCE, MULTISTATEMENT_MACRO_USE_DO_WHILE
Checkpatch-ignore: TRAILING_SEMICOLON
Change-Id: Ie5a8c71f3a8ad803f1660114c399c5a4dd0f7414
Signed-off-by: Farid Khaydari <[email protected]>
@en-sc
Copy link
Collaborator

en-sc commented Feb 25, 2025

If nobody objects, I'll merge this one instead of #1224, since this one includes the commit from #1224.

@en-sc en-sc merged commit fa7e235 into riscv-collab:riscv Feb 26, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants