Re: [PATCH v2 19/25] docs/zh_TW: process: sync coding-style.rst with the English original

From: Weijie Yuan

Date: Wed Dec 02 2026 - 04:37:41 EST


On Mon, Nov 23, 2026 at 07:02:10PM +0800, Chen-Yu Yeh wrote:
> The translation is marked "update to
> commit 323fa4b9608b ("Documentation: Fix syntax of kmalloc_objs example
> in coding style doc")", but that commit only touched the memory
> allocation examples. A comparison against the current English text
> shows the rest of the file never picked up a number of earlier changes:
>
> - add the loop braces example from
> commit 1dbba2cf30c9 ("Documentation/CodingStyle: Add an example for
> braces")
> - add the 80-column wording from
> commit bdc48fa11e46 ("checkpatch/coding-style: deprecate 80-column
> warning") and drop the old "strongly preferred" sentence
> - add the boilerplate kernel-doc paragraph from
> commit e5880f95a979 ("docs: process: discourage pointless boilerplate
> kdoc") and use the doc_guide reference and tools/docs/kernel-doc as in
> the original
> - drop the net/ comment style removed by commit 82b8000c28b5 ("net: drop
> special comment style")
> - add the EditorConfig paragraph from commit 5a602de99797 ("Add
> .editorconfig file for basic formatting") and the clangformat
> reference from commit e3b10a02ca2f ("Docs: Move clang-format from
> process/ to dev-tools/")
> - add the function-like macro guidance from
> commit 6813216bbdba ("Documentation: coding-style: ask function-like
> macros to evaluate parameters")
> - use <linux/dev_printk.h> as in commit c04639a7d2fb ("coding-style.rst:
> trivial: fix location of driver model macros") and add the dev_dbg
> guidance from commit 5c7944ca7b13 ("coding-style: Add guidance to
> prefer dev_dbg")
> - point to array_size.h, stddef.h and minmax.h instead of kernel.h as in
> commit 197bbebd2581 ("docs: Update documentation to avoid mentioning
> of kernel.h")
> - translate section 22 "Do not crash the kernel" from
> commit 1cfd9d7e43d5 ("coding-style.rst: document BUG() and WARN()
> rules ("do not crash the kernel")")")
> - use the talk title "Kernel CodingStyle" from
> commit 775a445d9a63 ("coding-style: fix title of Greg K-H's talk")
> - remove a duplicated overflow sentence in section 14, link
> memory-allocation.rst through its label instead of the zh_CN path,
> and render "zeroed array" correctly
> - retranslate sentences whose meaning had drifted: the "deliberately
> broken" example, the trailing whitespace and patch series note,
> accessor functions, dev_dbg()/VERBOSE_DEBUG, the inline maintenance
> trade-off and the "!!" construction for bool
> - restore the English inline literals (double-indenting, help
> readability, one err bugs, classes, ...) and the English convention
> block in section 16, each followed by a Chinese rendering
> - fix cntusr(), GW-BASIC and Dennis M. Ritchie
> - localize terminology (屏幕→螢幕, 嵌套→巢狀, 操作符→運算子, 補丁→修補程式,
> 協議→協定, 設備→裝置, 分配→配置, 優先級→優先順序, 體系結構→架構, ...)
>
> update to commit 323fa4b9608b ("Documentation: Fix syntax of
> kmalloc_objs example in coding style doc")
>
> Signed-off-by: Chen-Yu Yeh <chenyou910331@xxxxxxxxx>

Nice job!

Reviewed-by: Weijie Yuan <wy@xxxxxxxxx>

Thanks.

> ---
> .../zh_TW/process/coding-style.rst | 286 +++++++++++-------
> 1 file changed, 185 insertions(+), 101 deletions(-)