Welcome to the Linux Foundation Forum!

Question about the base repository for patch creation: Mainline vs. linux-next?

Hi everyone,

I am currently taking the LFD103 course, and I noticed that in the kernel configuration and compilation section, it is recommended to use the mainline repository (torvalds/linux.git) to follow along with the exercises and create the first patch.

However, reading the kernel documentation and learning about real-world workflows, I see it is very common to use linux-next (or the subsystem's development tree, such as usb-next) to ensure patches are built against the latest code and avoid conflicts with changes already queued by maintainers.

I would like to clarify the recommended best practice for both the course context and future contributions:

For LFD103 exercises and assignments: Should I standardize creating all patches against the master branch of the mainline tree?

For submitting real patches to maintainers: Is the official recommendation to always use linux-next (or the subsystem tree), or are there specific cases where patches should be created directly against mainline?

Thank you in advance!

Categories

Upcoming Training