checkpoint-restore / criu

Checkpoint/Restore tool
criu.org
Other
2.76k stars 560 forks source link

amdgpu_plugin: fix lint errors #2345

Closed rst0git closed 4 months ago

rst0git commented 4 months ago

This pull request fixes the following errors:

$ make lint
 ...
 # Do not append \n to pr_perror, pr_pwarn or fail
 ! git --no-pager grep -E '^\s*\<(pr_perror|pr_pwarn|fail)\>.*\\n"'
 plugins/amdgpu/amdgpu_plugin.c:        pr_perror("%s(), Can't handle VMAs of input device\n", __func__);

 ! git --no-pager grep -En '^\s*\<pr_(err|warn|msg|info|debug)\>.*);$' | grep -v '\\n'
 plugins/amdgpu/amdgpu_plugin_drm.c:45:     pr_err("Error in getting stat for: %s", path);
 plugins/amdgpu/amdgpu_plugin_util.c:77:        pr_err("Unable to read file (read:%ld buf_len:%ld)", len_read, buf_len);
 plugins/amdgpu/amdgpu_plugin_util.c:89:        pr_err("Unable to write file (wrote:%ld buf_len:%ld)", len_write, buf_len);
 plugins/amdgpu/amdgpu_plugin_util.c:120:       pr_err("%s: Failed to open for %s", path, write ? "write" : "read");
 plugins/amdgpu/amdgpu_plugin_util.c:126:       pr_err("%s: Failed get pointer for %s", path, write ? "write" : "read");
 plugins/amdgpu/amdgpu_plugin_util.c:136:       pr_err("%s:Failed to access file size", path);
 plugins/amdgpu/amdgpu_plugin_util.c:152:       pr_err("Cannot fopen %s", file_path);

 make: *** [Makefile:470: lint] Error 1
codecov-commenter commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (495081c) 70.54% compared to head (9d95929) 70.53%.

:exclamation: Current head 9d95929 differs from pull request most recent head b97be35. Consider uploading reports for the commit b97be35 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## criu-dev #2345 +/- ## ============================================ - Coverage 70.54% 70.53% -0.01% ============================================ Files 133 133 Lines 33629 33636 +7 ============================================ + Hits 23724 23726 +2 - Misses 9905 9910 +5 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.