Documentation/translations/zh_CN/process/submit-checklist.rst

Source file repositories/reference/linux-study-clean/Documentation/translations/zh_CN/process/submit-checklist.rst

File Facts

System
Linux kernel
Corpus path
Documentation/translations/zh_CN/process/submit-checklist.rst
Extension
.rst
Size
5090 bytes
Lines
111
Domain
Support Tooling And Documentation
Bucket
Documentation
Inferred role
Support Tooling And Documentation: documentation
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

.. include:: ../disclaimer-zh_CN.rst

:Original: Documentation/process/submit-checklist.rst
:Translator:
 - Alex Shi <alexs@kernel.org>
 - Wu XiangCheng <bobwxc@email.cn>

.. _cn_submitchecklist:

Linux内核补丁提交检查单
~~~~~~~~~~~~~~~~~~~~~~~

如果开发人员希望看到他们的内核补丁提交更快地被接受,那么他们应该做一些基本
的事情。

这些都是在 Documentation/translations/zh_CN/process/submitting-patches.rst
和其他有关提交Linux内核补丁的文档中提供的。

1) 如果使用工具,则包括定义/声明该工具的文件。不要依赖其他头文件来引入您使用
   的头文件。

2) 干净的编译:

   a) 使用合适的 ``CONFIG`` 选项 ``=y``、``=m`` 和 ``=n`` 。没有 ``gcc``
      警告/错误,没有链接器警告/错误。

   b) 通过 ``allnoconfig`` 、 ``allmodconfig``

   c) 使用 ``O=builddir`` 时可以成功编译

   d) 任何 Doucmentation/ 下的变更都能成功构建且不引入新警告/错误。
      用 ``make htmldocs`` 或 ``make pdfdocs`` 检验构建情况并修复问题。

3) 通过使用本地交叉编译工具或其他一些构建设施在多个CPU体系结构上构建。

4) PPC64是一种很好的交叉编译检查体系结构,因为它倾向于对64位的数使用无符号
   长整型。

5) 按 Documentation/translations/zh_CN/process/coding-style.rst 所述检查您的
   补丁是否为常规样式。在提交之前使用补丁样式检查器 ``scripts/checkpatch.pl``
   检查是否有轻微的冲突。您应该能够处理您的补丁中存在的所有
   违规行为。

6) 任何新的或修改过的 ``CONFIG`` 选项都不应搞乱配置菜单,并默认为关闭,除非
   它们符合 ``Documentation/kbuild/kconfig-language.rst`` 菜单属性:默认值中
   记录的例外条件。

7) 所有新的 ``kconfig`` 选项都有帮助文本。

8) 已仔细审查了相关的 ``Kconfig`` 组合。这很难用测试来纠正——脑力在这里是有
   回报的。

9) 通过 sparse 清查。
   (参见 Documentation/translations/zh_CN/dev-tools/sparse.rst )

10) 使用 ``make checkstack`` 并修复他们发现的任何问题。

    .. note::

        ``checkstack`` 并不会明确指出问题,但是任何一个在堆栈上使用超过512
        字节的函数都可以进行更改。

11) 包括 :ref:`kernel-doc <kernel_doc_zh>` 内核文档以记录全局内核API。(静态
    函数不需要,但也可以。)使用 ``make htmldocs`` 或 ``make pdfdocs`` 检查
    :ref:`kernel-doc <kernel_doc_zh>` 并修复任何问题。

12) 通过以下选项同时启用的测试: ``CONFIG_PREEMPT``, ``CONFIG_DEBUG_PREEMPT``,
    ``CONFIG_SLUB_DEBUG``, ``CONFIG_DEBUG_PAGEALLOC``, ``CONFIG_DEBUG_MUTEXES``,
    ``CONFIG_DEBUG_SPINLOCK``, ``CONFIG_DEBUG_ATOMIC_SLEEP``,
    ``CONFIG_PROVE_RCU`` 和 ``CONFIG_DEBUG_OBJECTS_RCU_HEAD`` 。

Annotation

Implementation Notes