Skip to content

fix(kmod): resolve remaining checkpatch warnings #1253

@Koichi98

Description

@Koichi98

Resolve remaining checkpatch.pl warnings in agnocast_kmod/. The checkpatch CI was introduced in #1251 and EMBEDDED_FUNCTION_NAME was fixed in #1252. The following logic-related warnings still remain:

Remaining warnings

  • SPDX_LICENSE_TAG (9): Missing SPDX license identifier
  • OOM_MESSAGE (7): Unnecessary OOM messages (kernel already logs them)
  • NEEDLESS_IF (3): if (p) kfree(p)kfree(NULL) is safe
  • MEMORY_BARRIER (3): Memory barriers without explanatory comments
  • CONSTANT_COMPARISON (3): Yoda-style comparisons (0 == xx == 0)
  • ALLOC_WITH_MULTIPLY (2): Use kvcalloc instead of kvzalloc with multiply
  • GLOBAL_INITIALISERS (2): Remove redundant = 0 / = false for globals
  • CONST_STRUCT (1): struct file_operations should be const

Once all warnings are resolved, the checkpatch workflow should be made required

Reference: https://docs.kernel.org/dev-tools/checkpatch.html

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions