Skip to content

Fix Handler Declarations in K_WORK_DELAYABLE_DEFINE#207

Closed
GoldenBug wants to merge 1 commit into
mainfrom
fix_handlers
Closed

Fix Handler Declarations in K_WORK_DELAYABLE_DEFINE#207
GoldenBug wants to merge 1 commit into
mainfrom
fix_handlers

Conversation

@GoldenBug

Copy link
Copy Markdown
Contributor

Summary:

K_WORK_DELAYABLE_DEFINE needs a callback function with the function
parameter type of "struct k_work *"

/home/goldenbug/openbic/openbic/meta-facebook/yv35-cl/src/platform/hwmon.c:29:38: note: (near initialization for 'CatErr_work.work.handler')
   29 | K_WORK_DELAYABLE_DEFINE(CatErr_work, CatErr_handler);
      |                                      ^~~~~~~~~~~~~~
/home/goldenbug/openbic/zephyr/include/kernel.h:3482:14: note: in definition of macro 'Z_WORK_DELAYABLE_INITIALIZER'
 3482 |   .handler = work_handler, \
      |              ^~~~~~~~~~~~
/home/goldenbug/openbic/openbic/meta-facebook/yv35-cl/src/platform/hwmon.c:29:1: note: in expansion of macro 'K_WORK_DELAYABLE_DEFINE'
   29 | K_WORK_DELAYABLE_DEFINE(CatErr_work, CatErr_handler);

Test Plan:

  • Build oby35-cl
  • Pass CI

Reviewers:

Subscribers:

Tasks:

Tags: oby35-cl

Summary:

K_WORK_DELAYABLE_DEFINE needs a callback function with the function
parameter type of "struct k_work *"

```
/home/goldenbug/openbic/openbic/meta-facebook/yv35-cl/src/platform/hwmon.c:29:38: note: (near initialization for 'CatErr_work.work.handler')
   29 | K_WORK_DELAYABLE_DEFINE(CatErr_work, CatErr_handler);
      |                                      ^~~~~~~~~~~~~~
/home/goldenbug/openbic/zephyr/include/kernel.h:3482:14: note: in definition of macro 'Z_WORK_DELAYABLE_INITIALIZER'
 3482 |   .handler = work_handler, \
      |              ^~~~~~~~~~~~
/home/goldenbug/openbic/openbic/meta-facebook/yv35-cl/src/platform/hwmon.c:29:1: note: in expansion of macro 'K_WORK_DELAYABLE_DEFINE'
   29 | K_WORK_DELAYABLE_DEFINE(CatErr_work, CatErr_handler);
```

Test Plan:

- Build oby35-cl
- Pass CI

Reviewers:

Subscribers:

Tasks:

Tags:
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 15, 2022
@GoldenBug

Copy link
Copy Markdown
Contributor Author

Hi @Yi-Shum,

You were the one who originally commited this in #108.
Is there a reason that the original argu1...3 were needed?

@GoldenBug GoldenBug requested a review from Yi-Shum March 15, 2022 23:26
@GoldenBug GoldenBug self-assigned this Mar 15, 2022
@Yi-Shum

Yi-Shum commented Mar 16, 2022

Copy link
Copy Markdown
Collaborator

Hi @GoldenBug ,

In #108, these functions are created to be used by threads, and the thread function takes 3 arguments.
In #117, these functions were modified to be used workqueue instead, but I didn't change the arguments.
I made a mistake in there. Thanks for the correction.

@GoldenBug

Copy link
Copy Markdown
Contributor Author

Thanks @Yi-Shum!

Just wanted to confirm!

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@GoldenBug has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@GoldenBug GoldenBug deleted the fix_handlers branch March 22, 2022 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

3 participants