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

Ayush ayush at disroot.org
Sun Sep 13 20:53:20 UTC 2020


Sir,

> Yes, we should investigate that. If checkpatch.pl does not work properly
> with git ranges, we should fix that first. Otherwise, all our evaluations
> are broken...

I noticed one more issue (more likely issue with git):

If I run:

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

Output is: https://gist.githubusercontent.com/eldraco19/b979e752baa2c6fdc1776c8b65dfa21e/raw/39ad42113141929d93142d9a2962759b4b6b2e3b/checkpatch_issue.txt

which doesn't include some in-between commits like: 3dbf1ee6abbb, 69388e15f507 e.t.c.

Strangely it includes commit like 022467444515, which isn't even in the given range.

then with,

$ 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
.
.
(trimmed output for specific range)

It shows all the commits in between.

But if I run:

$ git log --no-merges v5.7..v5.8 --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
3dbf1ee6abbb pinctrl: cherryview: Add missing spinlock usage in chv_gpio_irq_handler
9f676e5313c1 gpio: mlxbf2: remove unused including <linux/version.h>
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
.
.
(trimmed output for specific range)

It shows commit 3dbf1ee6abbb but not 69388e15f507.
I confirmed both commits are present in tree from:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/log/?h=linux-5.8.y&ofs=18900


I think it is an issue with git.

Please give your opinion on this.

Thanks,
Ayush


More information about the Linux-kernel-mentees mailing list