[PATCH v4] devtools: replace checkpatches shell wrapper with Python script

Stephen Hemminger stephen at networkplumber.org
Thu Feb 5 02:43:45 CET 2026


On Wed, 4 Feb 2026 17:32:31 +0000
Bruce Richardson <bruce.richardson at intel.com> wrote:

> On Wed, Feb 04, 2026 at 08:59:17AM -0800, Stephen Hemminger wrote:
> > Alternative to the checkpatches.sh shell script that wraps the Linux kernel's
> > checkpatch.pl with a standalone Python implementation. The new
> > dpdk-checkpatch.py script provides equivalent functionality without
> > requiring the kernel source tree or Perl.
> > 
> > Performance is significantly improved: checking a recent flow parser
> > patch series dropped from 2m23s to 0.43s (approximately 300x faster).
> >   
> Yep, it is definitely a LOT faster. Running on top 10 commits on main tree
> with old and new script:
> 
> $ time ./devtools/checkpatches.sh -n10
> 
> 10/10 valid patches
> 
> real	0m32.570s
> user	0m30.517s
> sys	0m2.256s
> 
> 
> $ time ./devtools/dpdk-checkpatch.py -n10
> 
> 10/10 valid patches
> 
> real	0m0.255s
> user	0m0.214s
> sys	0m0.040s
> 
> 32.5 seconds down to a quarter of a second is a massive gain. Looking
> forward to switching script for checking patches in future!
> 
> /Bruce

I still am finding some unintentional differences but it much
easier to fix false positives than in old code.


More information about the dev mailing list