-
Notifications
You must be signed in to change notification settings - Fork 7.4k
k_work conversion for network related components #34087
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
Conversation
ceb854d
to
eb44cd6
Compare
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.
I can't approve this officially since the commits are mostly from me, but I see no problem with these changes.
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.
The API change looks reasonable to me, there are some style issues worth fixing I guess.
@@ -1607,10 +1607,10 @@ static int dw1000_init(const struct device *dev) | |||
DWT_SYS_MASK_MRXSFDTO); | |||
|
|||
/* Initialize IRQ event work queue */ | |||
k_work_q_start(&dwt_work_queue, | |||
k_work_queue_start(&dwt_work_queue, |
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.
Not really related to the rework, but his work queue seems a bit suspicious, it doesn't actually seem to be used anywhere in the driver. CC @jfischer-no
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.
I think k_work_submit should actually be k_work_submit_to_queue(&dwt_work_queue, &ctx->irq_cb_work);
I will look through my WIP branches.
drivers/ethernet/eth_sam_gmac.c
Outdated
k_delayed_work_init(&dev_data->monitor_work, monitor_work_handler); | ||
k_delayed_work_submit(&dev_data->monitor_work, | ||
k_work_init_delayable(&dev_data->monitor_work, monitor_work_handler); | ||
k_work_reschedule(&dev_data->monitor_work, | ||
K_MSEC(CONFIG_ETH_SAM_GMAC_MONITOR_PERIOD)); |
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: there are quite a few places in this PR with broken alignment after the API change, like here, probably worth pushing the changes through some formatter.
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.
there are quite a few places in this PR with broken alignment after the API change, like here, probably worth pushing the changes through some formatter.
Yeah, there are now these style issues in the code. I went through the changes in the subsys/net/*
and manually changed those. I did not check all the changes in this PR (especially in the drivers/) as there was just so much of it. Using formatter could work except that it can change lines that we not changing in this k_work conversion, so I did not use a formatter. I think this work can be done in a separate PR if really needed.
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.
Using formatter could work except that it can change lines that we not changing in this k_work conversion, so I did not use a formatter.
I typically use git-clang-format HEAD~1
to apply the formatting only to the changes from the most recent commit, this combines well with an interactive rebase. But I now noticed that while it fixes the alignment issues I spotted it also introduce some others (like for instance changing the commit alignment from tabs to spaces which in effect doesn't look good with other lines aligned with tabs). As it's really not that important I guess it could indeed be fixed at some point in the future in a more comprehensive approach.
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.
use
git-clang-format HEAD~1
to apply the formatting only to the changes from the most recent commit
Thanks for the hint, I was not aware of this tool.
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.
As it's really not that important I guess it could indeed be fixed at some point in the future in a more comprehensive approach.
I will revisit this PR and update the code. I did not realize there was a tool for doing the work and it looked a lot of work to go through the patches manually.
Sure you can as you are not the sender of this PR. This one needs approvers and nobody seems to willing to accept the changes. |
Replace all existing deprecated API with the recommended alternative. Be aware that this does not address architectural errors in the use of the work API. Signed-off-by: Peter Bigot <[email protected]>
Replace all existing deprecated API with the recommended alternative. Be aware that this does not address architectural errors in the use of the work API. Signed-off-by: Peter Bigot <[email protected]>
Replace all existing deprecated API with the recommended alternative. Be aware that this does not address architectural errors in the use of the work API. Signed-off-by: Peter Bigot <[email protected]>
Replace all existing deprecated API with the recommended alternative. Be aware that this does not address architectural errors in the use of the work API. Signed-off-by: Peter Bigot <[email protected]> Signed-off-by: Jukka Rissanen <[email protected]>
Replace all existing deprecated API with the recommended alternative for gsm_mux and uart_mux drivers. Fixes zephyrproject-rtos#34103 Signed-off-by: Peter Bigot <[email protected]> Signed-off-by: Jukka Rissanen <[email protected]>
Replace all existing deprecated API with the recommended alternative. Signed-off-by: Peter Bigot <[email protected]> Signed-off-by: Jukka Rissanen <[email protected]>
eb44cd6
to
091bddd
Compare
Fixed the code indentation |
This is related to #33104 and takes relevant patches from #33924. I did slight changes to some of the commits from #33824, those ones have my signed-off-by added.
Only minimal testing done for those components that I could, but overall the original rote conversion by @pabigot looked good.