Skip to contentSkip to conversation

checkpatch: ERROR: Does not appear to be a unified-diff format patch

PATCH Geert Uytterhoeven 4 participants 5 messages Oct 13, 2007

lore
Share & tools
lore
#0 lore raw

scripts/checkpatch.pl doesn't seem to like this patch:

$ scripts/checkpatch.pl m68k-export-asm-cachectl-h.diff 
ERROR: Does not appear to be a unified-diff format patch

Your patch has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.

$ cat m68k-export-asm-cachectl-h.diff 
Subject: m68k: Export cachectl.h

From: Matthew Wilcox <[email protected]>

libffi in GCC 4.2 needs cachectl.h to do its cache flushing. But we don't currently export it. I believe this patch should do the trick.

---
 include/asm-m68k/Kbuild |    1 +
 1 file changed, 1 insertion(+)
include/asm-m68k/Kbuild +1 -0
@@ -1 +1,2 @@
 include include/asm-generic/Kbuild.asm
+header-y += cachectl.h

$

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#1 lore raw
Quoted 9 lines · Geert Uytterhoeven

scripts/checkpatch.pl doesn't seem to like this patch:

$ scripts/checkpatch.pl m68k-export-asm-cachectl-h.diff 
ERROR: Does not appear to be a unified-diff format patch
...
include/asm-m68k/Kbuild +0 -0
@@ -1 +1,2 @@

... ^^

Broken patch, this has to be "-1,1".

Quoted 3 lines

Gr{oetje,eeting}s,

Geert

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#2 lore raw
Quoted 12 lines · Adrian Bunk
Quoted 9 lines · Geert Uytterhoeven

scripts/checkpatch.pl doesn't seem to like this patch:

$ scripts/checkpatch.pl m68k-export-asm-cachectl-h.diff 
ERROR: Does not appear to be a unified-diff format patch
...
include/asm-m68k/Kbuild +0 -0
@@ -1 +1,2 @@

... ^^

Broken patch, this has to be "-1,1".

No, this is actually how diff outputs it.
/([-+]\d+)\b/ seems to imply /$1,1/

#3 lore raw
Quoted 15 lines · Jan Engelhardt
Quoted 12 lines · Adrian Bunk
Quoted 9 lines · Geert Uytterhoeven

scripts/checkpatch.pl doesn't seem to like this patch:

$ scripts/checkpatch.pl m68k-export-asm-cachectl-h.diff 
ERROR: Does not appear to be a unified-diff format patch
...
include/asm-m68k/Kbuild +0 -0
@@ -1 +1,2 @@

... ^^

Broken patch, this has to be "-1,1".

Quoted 2 lines

No, this is actually how diff outputs it.
...

You seem to be right.

That's a really strange part of the unidiff format - you have to write ",0" or ",2", but you can omit a ",1".

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#4 lore raw
In reply to Jan Engelhardt
Quoted 15 lines · Jan Engelhardt
Quoted 12 lines · Adrian Bunk
Quoted 9 lines · Geert Uytterhoeven

scripts/checkpatch.pl doesn't seem to like this patch:

$ scripts/checkpatch.pl m68k-export-asm-cachectl-h.diff 
ERROR: Does not appear to be a unified-diff format patch
...
include/asm-m68k/Kbuild +0 -0
@@ -1 +1,2 @@

... ^^

Broken patch, this has to be "-1,1".

Quoted 2 lines

No, this is actually how diff outputs it.
/([-+]\d+)\b/ seems to imply /$1,1/

Yep, that occurs a lot in the second parameter which we expect this and cope with it. Will fix this for the next release.

Thanks for the analysis.

-apw