WARNING: It's generally not useful to have the filename in the file #73: FILE: lib/Kconfig:611: +source "lib/ml-lib/Kconfig" CHECK: Alignment should match open parenthesis #357: FILE: lib/ml-lib/ml_lib_main.c:227: + pr_err("ml_lib: failed to create ML model: err %d\n", + err); CHECK: braces {} should be used on all arms of this statement #383: FILE: lib/ml-lib/ml_lib_main.c:253: + if (!ml_model->model_ops || !ml_model->model_ops->init) [...] + else { [...] CHECK: Unbalanced braces around else statement #385: FILE: lib/ml-lib/ml_lib_main.c:255: + else { CHECK: Alignment should match open parenthesis #389: FILE: lib/ml-lib/ml_lib_main.c:259: + pr_err("ml_lib: failed to init ML model: err %d\n", + err); CHECK: Alignment should match open parenthesis #396: FILE: lib/ml-lib/ml_lib_main.c:266: + old_options = rcu_dereference_protected(ml_model->options, + lockdep_is_held(&ml_model->options_lock)); CHECK: Alignment should match open parenthesis #419: FILE: lib/ml-lib/ml_lib_main.c:289: + old_options = rcu_dereference_protected(ml_model->options, + lockdep_is_held(&ml_model->options_lock)); CHECK: Alignment should match open parenthesis #468: FILE: lib/ml-lib/ml_lib_main.c:338: + old_options = rcu_dereference_protected(ml_model->options, + lockdep_is_held(&ml_model->options_lock)); CHECK: Alignment should match open parenthesis #476: FILE: lib/ml-lib/ml_lib_main.c:346: + old_dataset = rcu_dereference_protected(ml_model->dataset, + lockdep_is_held(&ml_model->dataset_lock)); CHECK: braces {} should be used on all arms of this statement #481: FILE: lib/ml-lib/ml_lib_main.c:351: + if (!ml_model->dataset_ops || !ml_model->dataset_ops->destroy) { [...] + } else [...] CHECK: Unbalanced braces around else statement #485: FILE: lib/ml-lib/ml_lib_main.c:355: + } else CHECK: braces {} should be used on all arms of this statement #493: FILE: lib/ml-lib/ml_lib_main.c:363: + if (!ml_model->model_ops || !ml_model->model_ops->destroy) { [...] + } else [...] CHECK: Unbalanced braces around else statement #496: FILE: lib/ml-lib/ml_lib_main.c:366: + } else CHECK: braces {} should be used on all arms of this statement #544: FILE: lib/ml-lib/ml_lib_main.c:414: + if (!ml_model->dataset_ops || !ml_model->dataset_ops->allocate) [...] + else { [...] CHECK: Unbalanced braces around else statement #546: FILE: lib/ml-lib/ml_lib_main.c:416: + else { CHECK: Alignment should match open parenthesis #569: FILE: lib/ml-lib/ml_lib_main.c:439: + pr_err("ml_lib: Failed to init dataset: err %d\n", + err); CHECK: Alignment should match open parenthesis #584: FILE: lib/ml-lib/ml_lib_main.c:454: + pr_err("ml_lib: Failed to extract dataset: err %d\n", + err); CHECK: Alignment should match open parenthesis #591: FILE: lib/ml-lib/ml_lib_main.c:461: + old_dataset = rcu_dereference_protected(ml_model->dataset, + lockdep_is_held(&ml_model->dataset_lock)); CHECK: braces {} should be used on all arms of this statement #596: FILE: lib/ml-lib/ml_lib_main.c:466: + if (!ml_model->dataset_ops || !ml_model->dataset_ops->destroy) { [...] + } else [...] CHECK: Unbalanced braces around else statement #600: FILE: lib/ml-lib/ml_lib_main.c:470: + } else CHECK: braces {} should be used on all arms of this statement #612: FILE: lib/ml-lib/ml_lib_main.c:482: + if (!ml_model->dataset_ops || !ml_model->dataset_ops->destroy) { [...] + } else [...] CHECK: Unbalanced braces around else statement #616: FILE: lib/ml-lib/ml_lib_main.c:486: + } else CHECK: braces {} should be used on all arms of this statement #635: FILE: lib/ml-lib/ml_lib_main.c:505: + if (!ml_model->dataset_ops || !ml_model->dataset_ops->allocate) [...] + else { [...] CHECK: Unbalanced braces around else statement #637: FILE: lib/ml-lib/ml_lib_main.c:507: + else { CHECK: Alignment should match open parenthesis #654: FILE: lib/ml-lib/ml_lib_main.c:524: + old_dataset = rcu_dereference_protected(ml_model->dataset, + lockdep_is_held(&ml_model->dataset_lock)); CHECK: Alignment should match open parenthesis #696: FILE: lib/ml-lib/ml_lib_main.c:566: +int ml_model_preprocess_recommendation(struct ml_lib_model *ml_model, + struct ml_lib_user_space_recommendation *hint) CHECK: Alignment should match open parenthesis #709: FILE: lib/ml-lib/ml_lib_main.c:579: +int apply_ml_model_recommendation(struct ml_lib_model *ml_model, + struct ml_lib_user_space_recommendation *hint) CHECK: Alignment should match open parenthesis #716: FILE: lib/ml-lib/ml_lib_main.c:586: +int execute_ml_model_operation(struct ml_lib_model *ml_model, + struct ml_lib_user_space_recommendation *hint, CHECK: Alignment should match open parenthesis #724: FILE: lib/ml-lib/ml_lib_main.c:594: +int estimate_ml_model_efficiency(struct ml_lib_model *ml_model, + struct ml_lib_user_space_recommendation *hint, CHECK: Alignment should match open parenthesis #732: FILE: lib/ml-lib/ml_lib_main.c:602: +int ml_model_error_backpropagation(struct ml_lib_model *ml_model, + struct ml_lib_backpropagation_feedback *feedback, CHECK: Alignment should match open parenthesis #836: FILE: lib/ml-lib/ml_lib_main.c:706: +int generic_preprocess_recommendation(struct ml_lib_model *ml_model, + struct ml_lib_user_space_recommendation *hint) CHECK: Alignment should match open parenthesis #849: FILE: lib/ml-lib/ml_lib_main.c:719: +int generic_apply_recommendation(struct ml_lib_model *ml_model, + struct ml_lib_user_space_recommendation *hint) CHECK: Alignment should match open parenthesis #856: FILE: lib/ml-lib/ml_lib_main.c:726: +int generic_execute_operation(struct ml_lib_model *ml_model, + struct ml_lib_user_space_recommendation *hint, CHECK: Alignment should match open parenthesis #864: FILE: lib/ml-lib/ml_lib_main.c:734: +int generic_estimate_efficiency(struct ml_lib_model *ml_model, + struct ml_lib_user_space_recommendation *hint, CHECK: Alignment should match open parenthesis #872: FILE: lib/ml-lib/ml_lib_main.c:742: +int generic_error_backpropagation(struct ml_lib_model *ml_model, + struct ml_lib_backpropagation_feedback *feedback, WARNING: function definition argument 'struct ml_lib_feature_attr *' should also have an identifier name #911: FILE: lib/ml-lib/sysfs.c:17: + ssize_t (*show)(struct ml_lib_feature_attr *, WARNING: function definition argument 'struct ml_lib_model *' should also have an identifier name #911: FILE: lib/ml-lib/sysfs.c:17: + ssize_t (*show)(struct ml_lib_feature_attr *, WARNING: function definition argument 'char *' should also have an identifier name #911: FILE: lib/ml-lib/sysfs.c:17: + ssize_t (*show)(struct ml_lib_feature_attr *, WARNING: function definition argument 'struct ml_lib_feature_attr *' should also have an identifier name #914: FILE: lib/ml-lib/sysfs.c:20: + ssize_t (*store)(struct ml_lib_feature_attr *, WARNING: function definition argument 'struct ml_lib_model *' should also have an identifier name #914: FILE: lib/ml-lib/sysfs.c:20: + ssize_t (*store)(struct ml_lib_feature_attr *, WARNING: function definition argument 'const char *' should also have an identifier name #914: FILE: lib/ml-lib/sysfs.c:20: + ssize_t (*store)(struct ml_lib_feature_attr *, WARNING: function definition argument 'size_t' should also have an identifier name #914: FILE: lib/ml-lib/sysfs.c:20: + ssize_t (*store)(struct ml_lib_feature_attr *, CHECK: Alignment should match open parenthesis #915: FILE: lib/ml-lib/sysfs.c:21: + ssize_t (*store)(struct ml_lib_feature_attr *, + struct ml_lib_model *, WARNING: struct kobj_type should normally be const #1054: FILE: lib/ml-lib/sysfs.c:160: +static struct kobj_type ml_model_ktype = { WARNING: Improper SPDX comment style for 'lib/ml-lib/sysfs.h', please use '/*' instead #1088: FILE: lib/ml-lib/sysfs.h:1: +// SPDX-License-Identifier: GPL-2.0-only WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 #1088: FILE: lib/ml-lib/sysfs.h:1: +// SPDX-License-Identifier: GPL-2.0-only total: 0 errors, 11 warnings, 35 checks, 1004 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. Commit a53ed13a043a ("ml-lib: Implement PoC of Machine Learning (ML) library functionality") has style problems, please review. NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT BAD_REPORTED_BY_LINK CAMELCASE COMMIT_LOG_LONG_LINE FILE_PATH_CHANGES GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. total: 0 errors, 11 warnings, 35 checks, 1004 lines checked