treewide: bluetooth: change error codes to nrf_error#437
Merged
eivindj-nordic merged 12 commits intoNov 12, 2025
Merged
Conversation
|
You can find the documentation preview for this PR here. |
965ce66 to
9081c8f
Compare
15e31c8 to
54ac6bd
Compare
ad2cee7 to
fd60847
Compare
bcbaa25 to
c12373f
Compare
anhmolt
reviewed
Nov 3, 2025
28b49c8 to
8e87716
Compare
anhmolt
approved these changes
Nov 4, 2025
Contributor
Author
|
@nrfconnect/ncs-bm-test @nrfconnect/ncs-eris Please review. |
dfe6a1c to
a38cb05
Compare
nvlsianpu
approved these changes
Nov 10, 2025
Removed a compliance warning. Signed-off-by: Eivind Jølsgard <eivind.jolsgard@nordicsemi.no>
a38cb05 to
4fe822e
Compare
Rename nrf error variables from err to nrf_err. Rename nrfx error variables to nrfx_err and use nrfx_err_t type. Align success checks for nrf_errors. Replace (nrf_err != NRF_SUCCESS) with (nrf_err). Signed-off-by: Eivind Jølsgard <eivind.jolsgard@nordicsemi.no>
Change error codes to nrf_errors. Signed-off-by: Eivind Jølsgard <eivind.jolsgard@nordicsemi.no>
Change error codes to nrf_errors. Signed-off-by: Eivind Jølsgard <eivind.jolsgard@nordicsemi.no>
Change error codes to nrf_errors. Signed-off-by: Eivind Jølsgard <eivind.jolsgard@nordicsemi.no>
Change error codes to nrf_errors. Signed-off-by: Eivind Jølsgard <eivind.jolsgard@nordicsemi.no>
Change error codes to nrf_errors. Signed-off-by: Eivind Jølsgard <eivind.jolsgard@nordicsemi.no>
Change error codes to nrf_errors. Cleanup of ble_dis header. Signed-off-by: Eivind Jølsgard <eivind.jolsgard@nordicsemi.no>
Change error codes to nrf_errors. Signed-off-by: Eivind Jølsgard <eivind.jolsgard@nordicsemi.no>
Change error codes to nrf_errors. Signed-off-by: Eivind Jølsgard <eivind.jolsgard@nordicsemi.no>
Change error codes to nrf_errors. Signed-off-by: Eivind Jølsgard <eivind.jolsgard@nordicsemi.no>
Change error codes to nrf_errors. Signed-off-by: Eivind Jølsgard <eivind.jolsgard@nordicsemi.no>
4fe822e to
c31ca29
Compare
marenges
approved these changes
Nov 12, 2025
lemrey
approved these changes
Nov 12, 2025
Comment on lines
+262
to
287
| switch (nrf_err) { | ||
| case NRF_SUCCESS: | ||
| { | ||
| return 0; | ||
| return NRF_SUCCESS; | ||
| } | ||
| case BLE_ERROR_INVALID_CONN_HANDLE: | ||
| { | ||
| return -ENOTCONN; | ||
| return NRF_ERROR_NOT_FOUND; | ||
| } | ||
| case NRF_ERROR_INVALID_STATE: | ||
| { | ||
| return -EPIPE; | ||
| return NRF_ERROR_INVALID_STATE; | ||
| } | ||
| case NRF_ERROR_RESOURCES: | ||
| { | ||
| return -EAGAIN; | ||
| return NRF_ERROR_RESOURCES; | ||
| } | ||
| case NRF_ERROR_NOT_FOUND: | ||
| { | ||
| return -EBADF; | ||
| return NRF_ERROR_NOT_FOUND; | ||
| } | ||
| default: | ||
| { | ||
| LOG_ERR("Failed to send MCUmgr data, nrf_error %#x", err); | ||
| return -EIO; | ||
| LOG_ERR("Failed to send MCUmgr data, nrf_error %#x", nrf_err); | ||
| return NRF_ERROR_INTERNAL; | ||
| } |
Contributor
There was a problem hiding this comment.
We can simplify this in a follow up PR
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.
Change error codes to nrf_errors.
Moving forward all non-BLE libraries and components will return errnos, while BLE related code as BLE services, libraries and the SoftDevice will return nrf_errors.