Skip to content

Conversation

MirkoCovizzi
Copy link
Contributor

@MirkoCovizzi MirkoCovizzi commented Sep 2, 2025

  • Clarifies the explicit error returned by
    the function.

  • Adds input parameter checks.

  • Adds missing include for atomic.h.

  • Updates the Doxygen to use proper parameter formatting.

  • Changes LOG_INF to LOG_ERR where errors are
    reported.

Clarifies the explicit error returned by
the function.

Signed-off-by: Mirko Covizzi <[email protected]>
@MirkoCovizzi MirkoCovizzi self-assigned this Sep 2, 2025
@MirkoCovizzi MirkoCovizzi requested review from rghaddab and a team as code owners September 2, 2025 07:41
@github-actions github-actions bot added the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Sep 2, 2025
Copy link

github-actions bot commented Sep 2, 2025

You can find the documentation preview for this PR here.

@MirkoCovizzi MirkoCovizzi requested a review from a team as a code owner September 2, 2025 07:44
@github-actions github-actions bot added the doc-required PR must not be merged without tech writer approval. label Sep 2, 2025
Adds input parameter checks.

Signed-off-by: Mirko Covizzi <[email protected]>
Adds missing include for `atomic.h`.

Signed-off-by: Mirko Covizzi <[email protected]>
@MirkoCovizzi MirkoCovizzi changed the title lib: bm_zms: check input parameters in bm_zms_register lib: bm_zms: misc cleanup Sep 2, 2025
Updates the Doxygen to use proper parameter formatting.

Signed-off-by: Mirko Covizzi <[email protected]>
Comment on lines +120 to 126
zassert_true(err == -EINVAL, "bm_zms_register unexpected failure");

err = bm_zms_register(&fixture->fs, NULL);
zassert_true(err == -EINVAL, "bm_zms_register unexpected failure");

err = bm_zms_register(&fixture->fs, &bm_zms_test_handler);
zassert_true(err == 0, "bm_zms_register call failure");
Copy link
Contributor

Choose a reason for hiding this comment

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

This file can probably be cleaned a bit like this. Could be left as a separate PR.

Suggested change
zassert_true(err == -EINVAL, "bm_zms_register unexpected failure");
err = bm_zms_register(&fixture->fs, NULL);
zassert_true(err == -EINVAL, "bm_zms_register unexpected failure");
err = bm_zms_register(&fixture->fs, &bm_zms_test_handler);
zassert_true(err == 0, "bm_zms_register call failure");
zassert_equal(-EINVAL, err);
err = bm_zms_register(&fixture->fs, NULL);
zassert_equal(-EINVAL, err);
err = bm_zms_register(&fixture->fs, &bm_zms_test_handler);
zassert_ok(err, "bm_zms_register call failure");

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, should be separate

Changes `LOG_INF` to `LOG_ERR` where errors are
reported.

Signed-off-by: Mirko Covizzi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. doc-required PR must not be merged without tech writer approval.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants