KernelNewbies
  • Comments
  • Immutable Page
  • Menu
    • Navigation
    • RecentChanges
    • FindPage
    • Local Site Map
    • Help
    • HelpContents
    • HelpOnMoinWikiSyntax
    • Display
    • Attachments
    • Info
    • Raw Text
    • Print View
    • Edit
    • Load
    • Save
  • Login

Kernel Hacking

  • Frontpage

  • Kernel Hacking

  • Kernel Documentation

  • Kernel Glossary

  • FAQ

  • Found a bug?

  • Kernel Changelog

  • Upstream Merge Guide

Projects

  • KernelJanitors

  • KernelMentors

  • KernelProjects

Community

  • Why a community?

  • Regional Kernelnewbies

  • Personal Pages

  • Upcoming Events

References

  • Mailing Lists

  • Related Sites

  • Programming Links

Wiki

  • Recent Changes

  • Site Editors

  • Side Bar

  • Tips for Editors

  • Hosted by WikiWall

Navigation

  • RecentChanges
  • FindPage
  • HelpContents

Upload page content

You can upload content for the page named below. If you change the page name, you can also upload content for another page. If the page name is empty, we derive the page name from the file name.

File to load page content from
Page name
Comment

KernelNewbies:
  • HowToWriteAChangelog

When creating a patch for submission to the Linux kernel there are specific guidlines you should follow.

Subject

The subject line of your commit should be prefixed with the subsystem:

staging: ks7010: remove local variable foo

You can get some hint on which prefix to use by checking the commit history of a specific file:

git log --pretty=oneline --abbrev-commit path/to/file

There may be multiple prefixes used previously, you may need to check other files in the subsystem to see the preferred style.

Subject lines not longer than approximately 50 characters ease later development.

The subject should use imperative mood. For an explanation of imperative mood see the kernel documentation (Describe your changes, linked below).

Body

You may like to wrap text in the body of the changelog at approximately 72 characters.

How to write the body of a changelog is addressed in the kernel tree documentation. Specifically Section 2 of Describe your changes.

While there are plenty of examples of how not to do this on LKML it will greatly help with getting your patches merged if you take time to thoroughly and correctly write the changelog. This also helps reviewers and maintainers review your patches. It also helps future developers if they view your patches while bug hunting.

Writing clean, bug free, code includes writing descriptive and technically correct changelog messages. The process of writing changelog messages has the added advantage of greatly improving ones written skills and ones knowledge of the kernel, the C programming language, and programming technique in general.

See also first kernel patch, git tips and patch tips and tricks.

  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01