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

mgmt/mcumgr: Drop zephyr_ prefix from functions #49528

Merged
merged 6 commits into from Oct 18, 2022

Conversation

de-nordic
Copy link
Collaborator

@de-nordic de-nordic commented Aug 25, 2022

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.

galak
galak previously requested changes Aug 25, 2022
Copy link
Collaborator

@galak galak left a 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

@galak galak added the area: API Changes to public APIs label Aug 25, 2022
@de-nordic
Copy link
Collaborator Author

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.

@de-nordic de-nordic force-pushed the mcumgr-drop-zephyr_ branch 2 times, most recently from 3b15abd to 1ac71db Compare August 30, 2022 15:37
@galak
Copy link
Collaborator

galak commented Aug 30, 2022

Please update release notes for deprecation.

@stephanosio
Copy link
Member

Please rebase to fix CI failure

Comment on lines 155 to 168
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;
}

Copy link
Collaborator

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

nordicjm
nordicjm previously approved these changes Aug 31, 2022
* @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);
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit. alignment

@@ -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);
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit. alignment

@carlescufi
Copy link
Member

We agreed with @de-nordic to follow the stable API change procedure

@stephanosio stephanosio added the Breaking API Change Breaking changes to stable, public APIs label Sep 6, 2022
nvlsianpu
nvlsianpu previously approved these changes Oct 4, 2022
@de-nordic de-nordic removed the DNM This PR should not be merged (Do Not Merge) label Oct 4, 2022
nordicjm
nordicjm previously approved these changes Oct 6, 2022
fabiobaltieri
fabiobaltieri previously approved these changes Oct 6, 2022
carlescufi
carlescufi previously approved these changes Oct 6, 2022
@nordicjm
Copy link
Collaborator

nordicjm commented Oct 6, 2022

@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>
@zephyrbot zephyrbot added the Release Notes To be mentioned in the release notes label Oct 6, 2022
@carlescufi carlescufi merged commit 6755999 into zephyrproject-rtos:main Oct 18, 2022
@de-nordic de-nordic deleted the mcumgr-drop-zephyr_ branch October 18, 2022 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: API Changes to public APIs area: Documentation area: mcumgr Breaking API Change Breaking changes to stable, public APIs Release Notes To be mentioned in the release notes
Projects
None yet
9 participants