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

Bluetooth: Audio: Fix bad docs for codec helper functions #81799

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Thalley
Copy link
Collaborator

@Thalley Thalley commented Nov 22, 2024

Several of the codec helper functions used @RetVal incorrectly Several functions referenced @ccid_list incorrectly

Several of the codec helper functions used @RetVal incorrectly
Several functions referenced @ccid_list incorrectly

Signed-off-by: Emil Gydesen <[email protected]>
@Thalley Thalley self-assigned this Nov 22, 2024
@@ -845,9 +845,9 @@ int bt_audio_codec_cfg_freq_hz_to_freq(uint32_t freq_hz);
* @param codec_cfg The codec configuration to extract data from.
*
* @retval A @ref bt_audio_codec_cfg_freq value
Copy link
Collaborator

Choose a reason for hiding this comment

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

Missed this one

@@ -890,9 +890,9 @@ int bt_audio_codec_cfg_frame_dur_us_to_frame_dur(uint32_t frame_dur_us);
* @param codec_cfg The codec configuration to extract data from.
*
* @retval A @ref bt_audio_codec_cfg_frame_dur value
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ditto

* @retval -EINVAL if arguments are invalid.
* @retval The converted frequency value in Hz.
* @retval -EINVAL Arguments are invalid.
* @retval frequency The converted frequency value in Hz.
Copy link
Collaborator

@kartben kartben Nov 23, 2024

Choose a reason for hiding this comment

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

You want this one listed first I think, i.e. the most likely return value first (applies throughout the PR)

Related, and since we don't have guidelines just yet and I very much value your thoughts on this topic and the fact we can use this PR as a way to settle on best practices for documenting return values, how about the "non-distinctive" value be described using @return? Basically, this: https://docs.rtems.org/branches/master/eng/coding-doxygen.html#function-declarations

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.

2 participants