Skip to content

Commit acba5d3

Browse files
akpm00sfrothwell
authored andcommitted
gcov-clang-support-checkpatch-fixes
WARNING: Non-standard signature: Co-authored-by: torvalds#31: Co-authored-by: Nick Desaulniers <[email protected]> WARNING: Non-standard signature: Co-authored-by: torvalds#32: Co-authored-by: Tri Vo <[email protected]> WARNING: Possible unnecessary 'out of memory' message torvalds#158: FILE: kernel/gcov/clang.c:90: + if (!info) { + pr_warn_ratelimited("failed to allocate gcov info\n"); WARNING: Possible unnecessary 'out of memory' message torvalds#193: FILE: kernel/gcov/clang.c:125: + if (!info) { + pr_warn_ratelimited("failed to allocate gcov function info for %s\n", WARNING: line over 80 characters torvalds#546: FILE: kernel/gcov/clang.c:478: + pos += store_gcov_u32(buffer, pos, fi_ptr->cfg_checksum); total: 0 errors, 5 warnings, 663 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. ./patches/gcov-clang-support.patch has style problems, please review. NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. Please run checkpatch prior to sending patches Cc: Daniel Mentz <[email protected]> Cc: Greg Hackmann <[email protected]> Cc: Nick Desaulniers <[email protected]> Cc: Peter Oberparleiter <[email protected]> Cc: Petri Gynther <[email protected]> Cc: Prasad Sodagudi <[email protected]> Cc: Trilok Soni <[email protected]> Cc: Tri Vo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Stephen Rothwell <[email protected]>
1 parent 1123702 commit acba5d3

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

kernel/gcov/clang.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,8 @@ void llvm_gcov_init(llvm_gcov_callback writeout, llvm_gcov_callback flush)
8686
{
8787
struct gcov_info *info = kzalloc(sizeof(*info), GFP_KERNEL);
8888

89-
if (!info) {
90-
pr_warn_ratelimited("failed to allocate gcov info\n");
89+
if (!info)
9190
return;
92-
}
9391

9492
INIT_LIST_HEAD(&info->head);
9593
INIT_LIST_HEAD(&info->functions);
@@ -121,11 +119,8 @@ void llvm_gcda_emit_function(u32 ident, const char *function_name,
121119
{
122120
struct gcov_fn_info *info = kzalloc(sizeof(*info), GFP_KERNEL);
123121

124-
if (!info) {
125-
pr_warn_ratelimited("failed to allocate gcov function info for %s\n",
126-
function_name ?: "UNKNOWN");
122+
if (!info)
127123
return;
128-
}
129124

130125
INIT_LIST_HEAD(&info->head);
131126
info->ident = ident;

0 commit comments

Comments
 (0)