Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 367
A compiler warning and cosmetic improvements#4216
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
Merged
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
cc96de3
clock: add a function to convert microseconds to ticks
lyakh 2049f1c
ll-schedule: (cosmetic) simplify a conditional
lyakh 83e34f0
zephyr: kpb: fix a compiler warning
lyakh 869bf93
ipc: simplify a confusing variable use
lyakh da6da18
schedule: (cosmetic) remove three redundant variable initialisations
lyakh 34c3c5f
ll-scheduler: no need for a safe version of list_for_item()
lyakh cd42c3a
ll-scheduler: only modify the task if it is valid
lyakh 9dee5f5
ll-scheduler: use a correct function to initialise a list head
lyakh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -168,7 +168,6 @@ static void schedule_ll_clients_enable(struct ll_schedule_data *sch) | ||
| static void schedule_ll_client_reschedule(struct ll_schedule_data *sch) | ||
| { | ||
| struct list_item *wlist; | ||
| struct list_item *tlist; | ||
| struct task *task; | ||
| struct task *task_take_dbg = NULL; | ||
| @@ -177,8 +176,8 @@ static void schedule_ll_client_reschedule(struct ll_schedule_data *sch) | ||
| /* rearm only if there is work to do */ | ||
| if (atomic_read(&sch->domain->total_num_tasks)) { | ||
| /* traverse to set timer according to the earliest task */ | ||
| list_for_item_safe(wlist, tlist, &sch->tasks) { | ||
| task = container_of(wlist, struct task, list); | ||
| list_for_item(tlist, &sch->tasks) { | ||
lgirdwood marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| task = container_of(tlist, struct task, list); | ||
| /* update to use the earlier tick */ | ||
| if (task->start < next_tick) { | ||
| @@ -444,14 +443,14 @@ static int schedule_ll_task(void *data, struct task *task, uint64_t start, | ||
| /* the assumption is that the registrable | ||
| * task has the smallest period | ||
| */ | ||
| if (pdata->period >= reg_pdata->period) { | ||
| pdata->ratio = period / reg_pdata->period; | ||
| } else { | ||
| if (pdata->period < reg_pdata->period) { | ||
| tr_err(&ll_tr, | ||
| "schedule_ll_task(): registrable task has a period longer than current task"); | ||
| ret = -EINVAL; | ||
| goto out; | ||
| } | ||
| pdata->ratio = period / reg_pdata->period; | ||
| } | ||
| } | ||
| } | ||
| @@ -479,7 +478,7 @@ int schedule_task_init_ll(struct task *task, | ||
| void *data, uint16_t core, uint32_t flags) | ||
| { | ||
| struct ll_task_pdata *ll_pdata; | ||
| int ret = 0; | ||
| int ret; | ||
| ret = schedule_task_init(task, uid, type, priority, run, data, core, | ||
| flags); | ||
| @@ -538,14 +537,15 @@ static int schedule_ll_task_cancel(void *data, struct task *task) | ||
| /* found it */ | ||
| if (curr_task == task) { | ||
| schedule_ll_domain_clear(sch, task); | ||
| /* remove work from list */ | ||
| task->state = SOF_TASK_STATE_CANCEL; | ||
| list_item_del(&task->list); | ||
| break; | ||
| } | ||
| } | ||
| /* remove work from list */ | ||
| task->state = SOF_TASK_STATE_CANCEL; | ||
| list_item_del(&task->list); | ||
| irq_local_enable(flags); | ||
| return 0; | ||
| @@ -595,8 +595,7 @@ static void scheduler_free_ll(void *data) | ||
| notifier_unregister(sch, NULL, | ||
| NOTIFIER_CLK_CHANGE_ID(sch->domain->clk)); | ||
| list_item_del(&sch->tasks); | ||
| list_init(&sch->tasks); | ||
| irq_local_enable(flags); | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
@lyakh I'm also having some warnings, on trace, when building SOF with Zephyr:
Any idea how can I get rid of them?
Do I need to do some LOGGING configuration for Zephyr?
Thanks!
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.
@iuliana-prodan in fact that looks like a bug in zephyr/include/sof/trace/trace.h to me. It should include sys/printk.h under
#ifdef __ZEPHYR__, would you like to submit a fix?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.
@lyakh ok, sure, I can do it.
Let me check it and I'll submit the fix.
Thanks!
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.
@lyakh I've check on my imx build and it's ok.
I've created a pull request #4227