tools: run coding-style checks via codingsty_check.sh#1503
Open
NishadSaraf wants to merge 3 commits into
Open
Conversation
maxzhen
previously approved these changes
Jul 16, 2026
Collaborator
|
retest this please |
codingsty_check.sh now accepts one or more files or directories and returns a non-zero exit status when checkpatch reports any error or warning, so it can gate CI and the pre-commit hook. Point the pre-commit hook at codingsty_check.sh instead of the host-kernel checkpatch.pl, so local commits use the same latest-mainline checkpatch as CI. Signed-off-by: Nishad Saraf <nishads@amd.com>
checkpatch flags the sizeof-based kzalloc calls in amdxdna_cma_buf.c: WARNING: Prefer kzalloc_obj over kzalloc with sizeof Convert the sg_table and cmabuf_priv allocations to kzalloc_obj(), matching the type-aware allocation style already used across the accel/amdxdna driver. Signed-off-by: Nishad Saraf <nishads@amd.com>
The fw_log/fw_trace multi-watcher tests launch three xrt-smi --watch consumers, kill them, then snapshot each captured file and assert all three hold the identical set of entries. A killed xrt-smi --watch child flushes its final poll batch to stdout asynchronously, so 'wait' returning does not guarantee the redirected file is complete: a single-shot snapshot can catch one capture a few entries short and report a spurious 'total-set equality violated' even though every watcher received the identical ring content. Reproduced on a Strix Halo/npu5 board: ~40% of runs failed, and in the failing runs the three raw captures were byte-identical multisets while one .sorted snapshot was computed microseconds before that file received its final flush. Compare the deduped sets with a bounded convergence retry (watchers_converge): recompute the sort -u sets until all three match or a ~5s timeout elapses. Because the data provably converges, this clears the false failure; a genuine divergence never converges within the timeout, so the assertion keeps its teeth. Validated 0/20 failures after the change (was ~6/15 before). Signed-off-by: Nishad Saraf <nishads@amd.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
codingsty_check.sh now accepts one or more files or directories and returns a non-zero exit status when checkpatch reports any error or warning, so it can gate CI and the pre-commit hook.
Point the pre-commit hook at codingsty_check.sh instead of the host-kernel checkpatch.pl, so local commits use the same latest-mainline checkpatch as CI.