[PATCH v9 0/2] modularize Rust lints and add RUST_UNWRAP check

Jason Hall posted 2 patches 11 hours ago
MAINTAINERS                |  6 ++++++
scripts/checkpatch.pl      | 14 ++++++++++++++
scripts/rust_checkpatch.pl | 30 ++++++++++++++++++++++++++++++
3 files changed, 50 insertions(+)
create mode 100644 scripts/rust_checkpatch.pl
[PATCH v9 0/2] modularize Rust lints and add RUST_UNWRAP check
Posted by Jason Hall 11 hours ago
This series moves Rust-specific linting logic into a separate file to
prevent further growth of the main scripts/checkpatch.pl script and
introduces a new lint to enforce safety standards.

The first patch creates the infrastructure for scripts/rust_checkpatch.pl
and adds a conditional loading hook in the main checkpatch script. It
also updates the MAINTAINERS file to track this new file.

The second patch introduces the  RUST_UNWRAP lint, which warns against
the use of .unwrap() and .expect() unless they are accompanied by a 
'// PANIC:' justification comment.

Jason Hall (2):
  scripts: checkpatch: move Rust-specific lints to separate file
  scripts: checkpatch: add RUST_UNWRAP lint

 MAINTAINERS                |  6 ++++++
 scripts/checkpatch.pl      | 14 ++++++++++++++
 scripts/rust_checkpatch.pl | 30 ++++++++++++++++++++++++++++++
 3 files changed, 50 insertions(+)
 create mode 100644 scripts/rust_checkpatch.pl

-- 
2.43.0
Re: [PATCH v9 0/2] modularize Rust lints and add RUST_UNWRAP check
Posted by Greg KH 4 hours ago
On Sat, Feb 07, 2026 at 03:49:05PM -0700, Jason Hall wrote:
> This series moves Rust-specific linting logic into a separate file to
> prevent further growth of the main scripts/checkpatch.pl script and
> introduces a new lint to enforce safety standards.
> 
> The first patch creates the infrastructure for scripts/rust_checkpatch.pl
> and adds a conditional loading hook in the main checkpatch script. It
> also updates the MAINTAINERS file to track this new file.
> 
> The second patch introduces the  RUST_UNWRAP lint, which warns against
> the use of .unwrap() and .expect() unless they are accompanied by a 
> '// PANIC:' justification comment.
> 
> Jason Hall (2):
>   scripts: checkpatch: move Rust-specific lints to separate file
>   scripts: checkpatch: add RUST_UNWRAP lint
> 
>  MAINTAINERS                |  6 ++++++
>  scripts/checkpatch.pl      | 14 ++++++++++++++
>  scripts/rust_checkpatch.pl | 30 ++++++++++++++++++++++++++++++
>  3 files changed, 50 insertions(+)
>  create mode 100644 scripts/rust_checkpatch.pl
> 
> -- 
> 2.43.0
> 
> 

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- This looks like a new version of a previously submitted patch, but you
  did not list below the --- line any changes from the previous version.
  Please read the section entitled "The canonical patch format" in the
  kernel file, Documentation/process/submitting-patches.rst for what
  needs to be done here to properly describe this.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot