Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/lib/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ struct dma *dma_get(uint32_t dir, uint32_t cap, uint32_t dev, uint32_t flags)
for (d = info->dma_array;
d < info->dma_array + info->num_dmas;
d++) {
tr_err(&dma_tr, " DMAC ID %d users %d busy channels %d",
tr_err(&dma_tr, " DMAC ID %d users %d busy channels %ld",
d->plat_data.id, d->sref,
atomic_read(&d->num_channels_busy));
tr_err(&dma_tr, " caps 0x%x dev 0x%x",
Expand Down Expand Up @@ -116,7 +116,7 @@ struct dma *dma_get(uint32_t dir, uint32_t cap, uint32_t dev, uint32_t flags)
if (!ret)
dmin->sref++;

tr_info(&dma_tr, "dma_get() ID %d sref = %d busy channels %d",
tr_info(&dma_tr, "dma_get() ID %d sref = %d busy channels %ld",
dmin->plat_data.id, dmin->sref,
atomic_read(&dmin->num_channels_busy));

Expand Down
6 changes: 3 additions & 3 deletions src/schedule/ll_schedule.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ static void schedule_ll_task_done(struct ll_schedule_data *sch,
struct task *task)
{
tr_info(&ll_tr, "task complete %p %pU", task, task->uid);
tr_info(&ll_tr, "num_tasks %d total_num_tasks %d",
tr_info(&ll_tr, "num_tasks %ld total_num_tasks %ld",
atomic_read(&sch->num_tasks),
atomic_read(&sch->domain->total_num_tasks));
}
Expand Down Expand Up @@ -304,7 +304,7 @@ static int schedule_ll_domain_set(struct ll_schedule_data *sch,
tr_info(&ll_tr, "new added task->start %u at %u",
(unsigned int)task->start,
(unsigned int)platform_timer_get_atomic(timer_get()));
tr_info(&ll_tr, "num_tasks %d total_num_tasks %d",
tr_info(&ll_tr, "num_tasks %ld total_num_tasks %ld",
atomic_read(&sch->num_tasks),
atomic_read(&domain->total_num_tasks));

Expand All @@ -331,7 +331,7 @@ static void schedule_ll_domain_clear(struct ll_schedule_data *sch,
/* unregister the task */
domain_unregister(domain, task, atomic_read(&sch->num_tasks));

tr_info(&ll_tr, "num_tasks %d total_num_tasks %d",
tr_info(&ll_tr, "num_tasks %ld total_num_tasks %ld",
atomic_read(&sch->num_tasks),
atomic_read(&domain->total_num_tasks));
Copy link
Collaborator

Choose a reason for hiding this comment

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

strictly speaking, this file isn't used with Zephyr so these changes aren't fixing Zephyr builds directly, but it's true, that we need consistency here. OTOH using %ld with 32-bit should actually generate warnings like

/tmp/p.c: In function ‘main’:
/tmp/p.c:8:19: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘int32_t’ {aka ‘int’} [-Wformat=]
    8 |  return printf("%ld\n", x);
      |                 ~~^     ~
      |                   |     |
      |                   |     int32_t {aka int}
      |                   long int
      |                 %d

in XTOS builds but since we don't use __attribute__((__format__(printf,... ,...))) with XTOS builds (so far) we shouldn't be getting these. So, so far this should be safe...


Expand Down
2 changes: 1 addition & 1 deletion src/schedule/zephyr_ll.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ static void zephyr_ll_task_done(struct zephyr_ll *sch,
task->state = SOF_TASK_STATE_FREE;

tr_info(&ll_tr, "task complete %p %pU", task, task->uid);
tr_info(&ll_tr, "num_tasks %d total_num_tasks %d",
tr_info(&ll_tr, "num_tasks %d total_num_tasks %ld",
sch->n_tasks, atomic_read(&sch->ll_domain->total_num_tasks));

/*
Expand Down