162306a36Sopenharmony_ci.. SPDX-License-Identifier: GPL-2.0
262306a36Sopenharmony_ci
362306a36Sopenharmony_ci==============================
462306a36Sopenharmony_ciFeature and driver maintainers
562306a36Sopenharmony_ci==============================
662306a36Sopenharmony_ci
762306a36Sopenharmony_ciThe term "maintainer" spans a very wide range of levels of engagement
862306a36Sopenharmony_cifrom people handling patches and pull requests as almost a full time job
962306a36Sopenharmony_cito people responsible for a small feature or a driver.
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ciUnlike most of the chapter, this section is meant for the latter (more
1262306a36Sopenharmony_cipopulous) group. It provides tips and describes the expectations and
1362306a36Sopenharmony_ciresponsibilities of maintainers of a small(ish) section of the code.
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_ciDrivers and alike most often do not have their own mailing lists and
1662306a36Sopenharmony_cigit trees but instead send and review patches on the list of a larger
1762306a36Sopenharmony_cisubsystem.
1862306a36Sopenharmony_ci
1962306a36Sopenharmony_ciResponsibilities
2062306a36Sopenharmony_ci================
2162306a36Sopenharmony_ci
2262306a36Sopenharmony_ciThe amount of maintenance work is usually proportional to the size
2362306a36Sopenharmony_ciand popularity of the code base. Small features and drivers should
2462306a36Sopenharmony_cirequire relatively small amount of care and feeding. Nonetheless
2562306a36Sopenharmony_ciwhen the work does arrive (in form of patches which need review,
2662306a36Sopenharmony_ciuser bug reports etc.) it has to be acted upon promptly.
2762306a36Sopenharmony_ciEven when a particular driver only sees one patch a month, or a quarter,
2862306a36Sopenharmony_cia subsystem could well have a hundred such drivers. Subsystem
2962306a36Sopenharmony_cimaintainers cannot afford to wait a long time to hear from reviewers.
3062306a36Sopenharmony_ci
3162306a36Sopenharmony_ciThe exact expectations on the response time will vary by subsystem.
3262306a36Sopenharmony_ciThe patch review SLA the subsystem had set for itself can sometimes
3362306a36Sopenharmony_cibe found in the subsystem documentation. Failing that as a rule of thumb
3462306a36Sopenharmony_cireviewers should try to respond quicker than what is the usual patch
3562306a36Sopenharmony_cireview delay of the subsystem maintainer. The resulting expectations
3662306a36Sopenharmony_cimay range from two working days for fast-paced subsystems (e.g. networking)
3762306a36Sopenharmony_cito as long as a few weeks in slower moving parts of the kernel.
3862306a36Sopenharmony_ci
3962306a36Sopenharmony_ciMailing list participation
4062306a36Sopenharmony_ci--------------------------
4162306a36Sopenharmony_ci
4262306a36Sopenharmony_ciLinux kernel uses mailing lists as the primary form of communication.
4362306a36Sopenharmony_ciMaintainers must be subscribed and follow the appropriate subsystem-wide
4462306a36Sopenharmony_cimailing list. Either by subscribing to the whole list or using more
4562306a36Sopenharmony_cimodern, selective setup like
4662306a36Sopenharmony_ci`lei <https://people.kernel.org/monsieuricon/lore-lei-part-1-getting-started>`_.
4762306a36Sopenharmony_ci
4862306a36Sopenharmony_ciMaintainers must know how to communicate on the list (plain text, no invasive
4962306a36Sopenharmony_cilegal footers, no top posting, etc.)
5062306a36Sopenharmony_ci
5162306a36Sopenharmony_ciReviews
5262306a36Sopenharmony_ci-------
5362306a36Sopenharmony_ci
5462306a36Sopenharmony_ciMaintainers must review *all* patches touching exclusively their drivers,
5562306a36Sopenharmony_cino matter how trivial. If the patch is a tree wide change and modifies
5662306a36Sopenharmony_cimultiple drivers - whether to provide a review is left to the maintainer.
5762306a36Sopenharmony_ci
5862306a36Sopenharmony_ciWhen there are multiple maintainers for a piece of code an ``Acked-by``
5962306a36Sopenharmony_cior ``Reviewed-by`` tag (or review comments) from a single maintainer is
6062306a36Sopenharmony_cienough to satisfy this requirement.
6162306a36Sopenharmony_ci
6262306a36Sopenharmony_ciIf the review process or validation for a particular change will take longer
6362306a36Sopenharmony_cithan the expected review timeline for the subsystem, maintainer should
6462306a36Sopenharmony_cireply to the submission indicating that the work is being done, and when
6562306a36Sopenharmony_cito expect full results.
6662306a36Sopenharmony_ci
6762306a36Sopenharmony_ciRefactoring and core changes
6862306a36Sopenharmony_ci----------------------------
6962306a36Sopenharmony_ci
7062306a36Sopenharmony_ciOccasionally core code needs to be changed to improve the maintainability
7162306a36Sopenharmony_ciof the kernel as a whole. Maintainers are expected to be present and
7262306a36Sopenharmony_cihelp guide and test changes to their code to fit the new infrastructure.
7362306a36Sopenharmony_ci
7462306a36Sopenharmony_ciBug reports
7562306a36Sopenharmony_ci-----------
7662306a36Sopenharmony_ci
7762306a36Sopenharmony_ciMaintainers must ensure severe problems in their code reported to them
7862306a36Sopenharmony_ciare resolved in a timely manner: regressions, kernel crashes, kernel warnings,
7962306a36Sopenharmony_cicompilation errors, lockups, data loss, and other bugs of similar scope.
8062306a36Sopenharmony_ci
8162306a36Sopenharmony_ciMaintainers furthermore should respond to reports about other kinds of
8262306a36Sopenharmony_cibugs as well, if the report is of reasonable quality or indicates a
8362306a36Sopenharmony_ciproblem that might be severe -- especially if they have *Supported*
8462306a36Sopenharmony_cistatus of the codebase in the MAINTAINERS file.
8562306a36Sopenharmony_ci
8662306a36Sopenharmony_ciSelecting the maintainer
8762306a36Sopenharmony_ci========================
8862306a36Sopenharmony_ci
8962306a36Sopenharmony_ciThe previous section described the expectations of the maintainer,
9062306a36Sopenharmony_cithis section provides guidance on selecting one and describes common
9162306a36Sopenharmony_cimisconceptions.
9262306a36Sopenharmony_ci
9362306a36Sopenharmony_ciThe author
9462306a36Sopenharmony_ci----------
9562306a36Sopenharmony_ci
9662306a36Sopenharmony_ciMost natural and common choice of a maintainer is the author of the code.
9762306a36Sopenharmony_ciThe author is intimately familiar with the code, so it is the best person
9862306a36Sopenharmony_cito take care of it on an ongoing basis.
9962306a36Sopenharmony_ci
10062306a36Sopenharmony_ciThat said, being a maintainer is an active role. The MAINTAINERS file
10162306a36Sopenharmony_ciis not a list of credits (in fact a separate CREDITS file exists),
10262306a36Sopenharmony_ciit is a list of those who will actively help with the code.
10362306a36Sopenharmony_ciIf the author does not have the time, interest or ability to maintain
10462306a36Sopenharmony_cithe code, a different maintainer must be selected.
10562306a36Sopenharmony_ci
10662306a36Sopenharmony_ciMultiple maintainers
10762306a36Sopenharmony_ci--------------------
10862306a36Sopenharmony_ci
10962306a36Sopenharmony_ciModern best practices dictate that there should be at least two maintainers
11062306a36Sopenharmony_cifor any piece of code, no matter how trivial. It spreads the burden, helps
11162306a36Sopenharmony_cipeople take vacations and prevents burnout, trains new members of
11262306a36Sopenharmony_cithe community etc. etc. Even when there is clearly one perfect candidate,
11362306a36Sopenharmony_cianother maintainer should be found.
11462306a36Sopenharmony_ci
11562306a36Sopenharmony_ciMaintainers must be human, therefore, it is not acceptable to add a mailing
11662306a36Sopenharmony_cilist or a group email as a maintainer. Trust and understanding are the
11762306a36Sopenharmony_cifoundation of kernel maintenance and one cannot build trust with a mailing
11862306a36Sopenharmony_cilist. Having a mailing list *in addition* to humans is perfectly fine.
11962306a36Sopenharmony_ci
12062306a36Sopenharmony_ciCorporate structures
12162306a36Sopenharmony_ci--------------------
12262306a36Sopenharmony_ci
12362306a36Sopenharmony_ciTo an outsider the Linux kernel may resemble a hierarchical organization
12462306a36Sopenharmony_ciwith Linus as the CEO. While the code flows in a hierarchical fashion,
12562306a36Sopenharmony_cithe corporate template does not apply here. Linux is an anarchy held
12662306a36Sopenharmony_citogether by (rarely expressed) mutual respect, trust and convenience.
12762306a36Sopenharmony_ci
12862306a36Sopenharmony_ciAll that is to say that managers almost never make good maintainers.
12962306a36Sopenharmony_ciThe maintainer position more closely matches an on-call rotation
13062306a36Sopenharmony_cithan a position of power.
13162306a36Sopenharmony_ci
13262306a36Sopenharmony_ciThe following characteristics of a person selected as a maintainer
13362306a36Sopenharmony_ciare clear red flags:
13462306a36Sopenharmony_ci
13562306a36Sopenharmony_ci - unknown to the community, never sent an email to the list before
13662306a36Sopenharmony_ci - did not author any of the code
13762306a36Sopenharmony_ci - (when development is contracted) works for a company which paid
13862306a36Sopenharmony_ci   for the development rather than the company which did the work
13962306a36Sopenharmony_ci
14062306a36Sopenharmony_ciNon compliance
14162306a36Sopenharmony_ci==============
14262306a36Sopenharmony_ci
14362306a36Sopenharmony_ciSubsystem maintainers may remove inactive maintainers from the MAINTAINERS
14462306a36Sopenharmony_cifile. If the maintainer was a significant author or played an important
14562306a36Sopenharmony_cirole in the development of the code, they should be moved to the CREDITS file.
14662306a36Sopenharmony_ci
14762306a36Sopenharmony_ciRemoving an inactive maintainer should not be seen as a punitive action.
14862306a36Sopenharmony_ciHaving an inactive maintainer has a real cost as all developers have
14962306a36Sopenharmony_cito remember to include the maintainers in discussions and subsystem
15062306a36Sopenharmony_cimaintainers spend brain power figuring out how to solicit feedback.
15162306a36Sopenharmony_ci
15262306a36Sopenharmony_ciSubsystem maintainers may remove code for lacking maintenance.
15362306a36Sopenharmony_ci
15462306a36Sopenharmony_ciSubsystem maintainers may refuse accepting code from companies
15562306a36Sopenharmony_ciwhich repeatedly neglected their maintainership duties.
156