Discussion:
checkpatch: ERROR: Does not appear to be a unified-diff format patch
(too old to reply)
Geert Uytterhoeven
2007-10-13 12:30:10 UTC
Permalink
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 <***@wil.cx>

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.

Signed-off-by: Matthew Wilcox <***@wil.cx>
---
include/asm-m68k/Kbuild | 1 +
1 file changed, 1 insertion(+)

--- a/include/asm-m68k/Kbuild
+++ b/include/asm-m68k/Kbuild
@@ -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 -- ***@linux-m68k.org

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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Adrian Bunk
2007-10-13 12:50:10 UTC
Permalink
Post by Geert Uytterhoeven
$ scripts/checkpatch.pl m68k-export-asm-cachectl-h.diff
ERROR: Does not appear to be a unified-diff format patch
...
--- a/include/asm-m68k/Kbuild
+++ b/include/asm-m68k/Kbuild
@@ -1 +1,2 @@
... ^^
Broken patch, this has to be "-1,1".
Post by Geert Uytterhoeven
Gr{oetje,eeting}s,
Geert
cu
Adrian
--
"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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Jan Engelhardt
2007-10-13 13:00:14 UTC
Permalink
Post by Adrian Bunk
Post by Geert Uytterhoeven
$ scripts/checkpatch.pl m68k-export-asm-cachectl-h.diff
ERROR: Does not appear to be a unified-diff format patch
...
--- a/include/asm-m68k/Kbuild
+++ b/include/asm-m68k/Kbuild
@@ -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/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Adrian Bunk
2007-10-13 14:00:27 UTC
Permalink
Post by Jan Engelhardt
Post by Adrian Bunk
Post by Geert Uytterhoeven
$ scripts/checkpatch.pl m68k-export-asm-cachectl-h.diff
ERROR: Does not appear to be a unified-diff format patch
...
--- a/include/asm-m68k/Kbuild
+++ b/include/asm-m68k/Kbuild
@@ -1 +1,2 @@
... ^^
Broken patch, this has to be "-1,1".
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
--
"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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Andy Whitcroft
2007-10-13 15:10:09 UTC
Permalink
Post by Jan Engelhardt
Post by Adrian Bunk
Post by Geert Uytterhoeven
$ scripts/checkpatch.pl m68k-export-asm-cachectl-h.diff
ERROR: Does not appear to be a unified-diff format patch
...
--- a/include/asm-m68k/Kbuild
+++ b/include/asm-m68k/Kbuild
@@ -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/
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Loading...