rimage: select proper parse toml key functions based on data size#10251
Merged
kv2019i merged 3 commits intothesofproject:mainfrom Sep 25, 2025
Merged
rimage: select proper parse toml key functions based on data size#10251kv2019i merged 3 commits intothesofproject:mainfrom
kv2019i merged 3 commits intothesofproject:mainfrom
Conversation
Member
abonislawski
commented
Sep 22, 2025
- rimage: toml_utils: add uint8/16 parsing support for TOML keys
- rimage: select proper parse toml key functions based on data size
There was a problem hiding this comment.
Pull Request Overview
This PR enhances the TOML parsing utilities by adding support for smaller integer types (uint8 and uint16) and updates existing code to use appropriately sized parsing functions based on the data being parsed.
- Added new parsing functions for uint8 and uint16 types (both hex and regular variants)
- Updated existing code to use the most appropriate parsing function based on data size requirements
- Improved type safety by matching parser return types to the actual field types being populated
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tools/rimage/src/toml_utils.c | Implements new uint8/uint16 parsing functions for both hex and decimal values |
| tools/rimage/src/include/rimage/toml_utils.h | Adds function declarations for the new parsing utilities |
| tools/rimage/src/adsp_config.c | Updates function calls to use appropriately sized parsers instead of uint32 variants |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Extends existing parsing functionality Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
Fix errno handling Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>#
Select proper parse TOML keys functions to avoid int overflow errors Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
1b4f55b to
dfea3b9
Compare
softwarecki
approved these changes
Sep 23, 2025
Collaborator
softwarecki
left a comment
There was a problem hiding this comment.
Great work on this update!
kv2019i
approved these changes
Sep 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.