# 发补丁

发patch是和社区交流的重要过程，这个过程也有相关的规范要遵守。比如检查代码格式和确认需要发给谁。

## 检查patch

内核代码有着自己的规范，在发patch前最好用脚本checkpatch.pl检查一下。

检查某个commit

```
./scripts/checkpatch.pl -g HEAD
```

检查某个patch文件

```
./scripts/checkpatch.pl /patch/to/patch/file
```

## 查要发给谁

写完patch后，我们需要发到社区。具体发到哪里，需要发给谁也是有讲究的。可以用get\_maintainer.pl来查看。

```
./scripts/get_maintainer.pl /patch/to/patch/file
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://richardweiyang-2.gitbook.io/kernel-exploring/handy_tools/01-patch.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
