-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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: conn: Make bt_conn_lookup_addr_br() public #87186
Bluetooth: conn: Make bt_conn_lookup_addr_br() public #87186
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix the spelling in the commit message.
Bluetooth: conn: Public the function bt_conn_lookup_addr_br
"Public" cannot be used as a verb. "Make bt_conn_lookup_addr_br() public" would be better.
Move the deceleration of function
bt_conn_lookup_addr_br
from
conn_internal.h
toconn.h
.
"Move the declaration of bt_conn_lookup_addr_br()
"
or
"Move the declaration of the function bt_conn_lookup_addr_br()
..."
db73f98
to
eb44983
Compare
Updated. Thanks a lot. |
Thanks, however you still have "deceleration" misspelled (should be "declaration") |
eb44983
to
cab15f1
Compare
Thanks. Updated it. |
cab15f1
to
c1ee921
Compare
c1ee921
to
4a02cbb
Compare
4a02cbb
to
df74211
Compare
df74211
to
36bd4d5
Compare
* | ||
* @return Connection object or NULL if not found. | ||
*/ | ||
struct bt_conn *bt_conn_lookup_addr_br(const bt_addr_t *peer); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kind of odd that we have both bt_le_<something>
and bt_<something>_le
naming in our API.
Generally it would make sense to have bt_le_<something>
and bt_br_<something>
(or bt_classic if we wanted to follow the naming scheme in files and Kconfig...), but since the LE version of this funcion is bt_conn_lookup_addr_le
, then I guess it makes sense to continue with that.
As mentioned in my other review, I do think it makes equally / more sense to just use bt_conn_get_info
as that already contains this functionality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
However, for purposes that only want to obtain the peer address, calling bt_conn_get_info
is too complicated.
Because within the function bt_conn_get_info
, not only are memory read and write operations performed, but HCI access is also introduced.
Obviously, this function is not always easy to use.
For LE, I speculate that this may also be the reason for the existence of bt_conn_lookup_ addr_le
.
Move the declaration of the function `bt_conn_lookup_addr_br()` from `conn_internal.h` to `conn.h`. Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
36bd4d5
to
8e5503f
Compare
Move the declaration of the function
bt_conn_lookup_addr_br()
fromconn_internal.h
toconn.h
.