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

Checkpatch script #187

Merged
merged 4 commits into from Apr 8, 2020
Merged

Checkpatch script #187

merged 4 commits into from Apr 8, 2020

Conversation

arnopo
Copy link
Collaborator

@arnopo arnopo commented Jan 9, 2020

Introduce checkpatch script, for openamp coding rules check.
These scripts have been cherry-picked from zephyr project
some additional patches fix the code according to the do_checkpatch result

@arnopo arnopo requested review from edmooring and galak January 9, 2020 15:54
@wjliang
Copy link
Collaborator

wjliang commented Jan 10, 2020

thanks @arnopo to introduce checking tool. Will you have a following up patch to use it in the CI?
The checkpatch shell script is of Apache license, while the spelling.txt is of GPLv2 license. @galak or @edmooring can confirm if GPLv2 license is OK for the tools which will not be linked to the library.

Copy link
Contributor

@edmooring edmooring left a comment

Choose a reason for hiding this comment

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

Looks good.

@wjliang after the release, we will see about rolling this into the CI process.

@arnopo
Copy link
Collaborator Author

arnopo commented Jan 13, 2020

thanks @arnopo to introduce checking tool. Will you have a following up patch to use it in the CI?
The checkpatch shell script is of Apache license, while the spelling.txt is of GPLv2 license. @galak or @edmooring can confirm if GPLv2 license is OK for the tools which will not be linked to the library.
FYI This scripts are a copy past of the zephyr project so reuse the licenses defined for zephyr.

Initial version of checkpatch tool cloned from zephyr project.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Fix coding style reported by do_checkpatch.sh

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Fix declaration of the the function pointer type reported
by checkpatch tool.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Align coding rule with checkpatch recommendation concerning
the comparison to null.
Some comparisons in macro have not be fixed for readability.
Examples of code not updated:
  VQ_PARAM_CHK(ring == NULL, status, ERROR_VQUEUE_INVLD_PARAM);
  VQASSERT(vq, cookie != NULL, "enqueuing with no cookie");

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Copy link
Contributor

@edmooring edmooring left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@arnopo arnopo merged commit 687bd9e into OpenAMP:master Apr 8, 2020
release v2020.04 automation moved this from In progress to Done Apr 8, 2020
@arnopo arnopo deleted the checkpatch branch October 9, 2020 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants