KernelNewbies:

A template/example KernelTaskList. This task list is related to XXXXXXX tasks (give some context on the nature of your task list.

Tasklist Maintainer

Tasklist Maintainer Information:

General Information

This tasklist is based on XXXXXXXXX (explain whether they are automated by a script, collected with other developers, you company's technical debts, etc). Detail if the changes should be checked if appropriate or not by you before, or if they need checking first (i.e. detected by an automated script)

Provide general relevant instructions/guidelines. Please, before submitting patches, read carefully the following mandatory documentation:

Copy (Cc: the tasklist maintainer when sending the patch, and also add to your commit message using the tags below according to the values specified in the task. {{{Suggested-By: Link}}}

Open Tasks

#002: Use foo() instead of bar()

A brief summary of the task. A good place to explain why foo() must be used instead of bar(), i.e., it's a more appropriate helper. Or to explain whatever is the general nature of the task.

Additional Details

The assginee is expected to properly check if the change is appropriate and submit the patch. The purpose of this change is to XXXXXXXXXXXX i.e. update the code to keep it up-to-date with internal apis.

Relevant History

When XXXXX was introduced by the patch XXXXXX (provide a link to the lore.kernel.org patch thread) it did XXXXXX using bar(). But since foo() was introduced in the patch XXXXXXXX (link to lore) this has been the most appropriate function for doing XXXXXXXX.

#003: Replace hand‑rolled min() with kernel min() macro

A brief summary of the task: find open‑coded comparisons that compute the minimum of two values (e.g. (a < b) ? a : b) and replace them with the standard min(a, b) macro. This improves readability and type safety.

Additional Details

The assignee must verify that both arguments are of compatible types and that no side effects exist (e.g., min(x++, y--) would be wrong). Pick a single file from a low‑impact subsystem (like drivers/staging/ or samples/). Submit one patch per file.

Relevant History

The min()/max() macros have been in include/linux/minmax.h (formerly kernel.h) since early 2.6 kernels. Using them avoids common mistakes with double evaluation.

Closed Tasks

#001: Use dev_err() instead of printk(KERN_ERR) in a driver

Summary

Replace three occurrences of printk(KERN_ERR "driver: ...") with dev_err(dev, "...") in drivers/foo/bar.c. The patch also added the missing #include <linux/device.h>.

Additional Details

The assignee identified that a struct device * was available in the context. After the change, the driver printed the device name automatically. No functional change was introduced.

Resolution

Patch was accepted into the driver subsystem maintainer's tree and is queued for linux-next. Task marked closed.

Link: lore.kernel.org/...

KernelNewbies: KernelTaskList Template (last edited 2026-06-15 07:56:38 by AgathaIsabelleMoreira)