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
mgmt/mcumgr: Drop zephyr_ prefix from functions #49528
mgmt/mcumgr: Drop zephyr_ prefix from functions #49528
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.
This is technically a breaking API change, so should go through the API change process: https://docs.zephyrproject.org/latest/develop/api/api_lifecycle.html
OK, can follow that path, although nothing I have changed is available in public documentation, nor here https://docs.zephyrproject.org/latest/develop/api/overview.html. |
3b15abd
to
1ac71db
Compare
Please update release notes for deprecation. |
Please rebase to fix CI failure |
1ac71db
to
d48c408
Compare
d48c408
to
e872b3a
Compare
subsys/mgmt/mcumgr/smp.c
Outdated
mtu = zst->zst_get_mtu(rsp); | ||
mtu = smpt->get_mtu(rsp); | ||
if (mtu == 0U) { | ||
/* The transport cannot support a transmission right now. */ | ||
return MGMT_ERR_EUNKNOWN; | ||
} | ||
|
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.
This code can go once the other PRs are merged
e872b3a
to
aea68c0
Compare
include/zephyr/mgmt/mcumgr/smp.h
Outdated
* @param nb The net_buf to transmit. | ||
* | ||
* @return 0 on success, MGMT_ERR_[...] code on failure. | ||
*/ | ||
typedef int zephyr_smp_transport_out_fn(struct zephyr_smp_transport *zst, | ||
typedef int smp_transport_out_fn(struct smp_transport *smpt, | ||
struct net_buf *nb); |
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.
nit. alignment
subsys/mgmt/mcumgr/smp_uart.c
Outdated
@@ -91,7 +91,7 @@ static int smp_uart_init(const struct device *dev) | |||
{ | |||
ARG_UNUSED(dev); | |||
|
|||
zephyr_smp_transport_init(&smp_uart_transport, smp_uart_tx_pkt, | |||
smp_transport_init(&smp_uart_transport, smp_uart_tx_pkt, | |||
smp_uart_get_mtu, NULL, NULL); |
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.
nit. alignment
We agreed with @de-nordic to follow the stable API change procedure |
37517b7
to
49edb1c
Compare
@de-nordic please rebase |
The MCUMgr library is now part of Zephyr, so there is no point to prefix SMP functions with Zephyr. Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Cosmetic change: the zst was short for zephyr_smp_transport, now it is just smp_transport so smpt makes more sense. Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The mcumgr transport API drops zephyr_ prefixes. Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
With dropping the zephyr_ prefix, the member prefix zst_ makes no sense. Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The zephyr_ prefixed functions have been marked __deprecated. Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The commit adds note on deprecation of zephyr_ prefix in SMP API used by SMP transports, that allow MCUMgr receive and process SMP frames. Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
886ca71
49edb1c
to
886ca71
Compare
The MCUMgr library is now part of Zephyr, so there is no point
to prefix SMP functions with Zephyr.
Signed-off-by: Dominik Ermel dominik.ermel@nordicsemi.no
Closes: #49962
DNM until dependency #50904 is merged.