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

tests: work_queue: fix few mismatched CONTAINER_OF #62018

Merged
merged 1 commit into from
Aug 30, 2023
Merged
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
6 changes: 4 additions & 2 deletions tests/kernel/workq/work_queue/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,9 @@ ZTEST(workqueue_delayed, test_delayed)

static void triggered_work_handler(struct k_work *work)
{
struct k_work_poll *pwork = CONTAINER_OF(work, struct k_work_poll, work);
struct triggered_test_item *ti =
CONTAINER_OF(work, struct triggered_test_item, work);
CONTAINER_OF(pwork, struct triggered_test_item, work);

TC_PRINT(" - Running triggered test item %d\n", ti->key);

Expand Down Expand Up @@ -545,8 +546,9 @@ ZTEST(workqueue_triggered, test_already_triggered)

static void triggered_resubmit_work_handler(struct k_work *work)
{
struct k_work_poll *pwork = CONTAINER_OF(work, struct k_work_poll, work);
struct triggered_test_item *ti =
CONTAINER_OF(work, struct triggered_test_item, work);
CONTAINER_OF(pwork, struct triggered_test_item, work);

results[num_results++] = ti->key;

Expand Down