[Linux-kernel-mentees] [PATCH v2] checkpatch: handle line break between commit and hash value

Ayush ayush at disroot.org
Thu Sep 17 14:53:31 UTC 2020


I am sorry for the late reply, my health condition was not good in last few days.

> What is the problem you encountered? What did you expect? What did you
> observe? Which lines of code are involved? What git command is called?
> Why do you expect a certain behaviour?were

When the git log is (trimmed portion of git log --no-merges --oneline):

a02254f8a676 dmaengine: ioat: Decreasing allocation chunk size 2M->512K
bd2bf302eef2 dmaengine: ioat: fixing chunk sizing macros dependency
2fea2906b5cb dmaengine: Fix misspelling of "Analog Devices"
b3cb14310eb4 dt-bindings: dma: renesas,usb-dmac: convert bindings to json-schema
cde9a96ee24f dt-bindings: dma: renesas,rcar-dmac: convert bindings to json-schema
fc6f5d0a4983 dmaengine: dw-edma: Decouple dw-edma-core.c from struct pci_dev
69388e15f507 pinctrl: cherryview: Add missing spinlock usage in chv_gpio_irq_handler
3dbf1ee6abbb pinctrl: cherryview: Add missing spinlock usage in chv_gpio_irq_handler
9f676e5313c1 gpio: mlxbf2: remove unused including <linux/version.h>
b392350ec3f2 ALSA: hda/hdmi: Add module option to disable audio component binding
4c2b54f73aba gpio: dwapb: Split out dwapb_get_irq() helper
c59042ed8965 gpio: dwapb: Drop of_match_ptr() & ACPI_PTR() calls
4f344e86c739 gpio: dwapb: Drop bogus BUG_ON()s
48ce80568346 gpio: dwapb: Switch to more usual pattern of RMW in dwapb_gpio_set_debounce()
d31275a9dc0b gpio: dwapb: Convert to use IRQ core provided macros

then to check commits in this range, I will run:

$ scripts/checkpatch.pl --show-types -g d31275a9dc0b..a02254f8a676

The output is

here we can see:
1. Not all in-between commits are checked by checkpatch.pl
2. Some new commits (which are not in the given range) are also checked by checkpatch.pl

checkpatch internally used the following command for collecting the commit log:

$ git log --no-color --no-merges --pretty=format:'%H %s' $git_range

The result of this command is not what we expect checkpatch to test.

Please correct me if I am wrong.

Also I checked other evaluation too.

I am looking into that bug and will try to fix it in v3.


More information about the Linux-kernel-mentees mailing list