* [PATCH 2.6.24-rc8-mm1] checkpatch.pl -- Handle backslashes within quoted string.
@ 2008-01-18 13:21 Tetsuo Handa
2008-01-18 15:24 ` Tetsuo Handa
0 siblings, 1 reply; 3+ messages in thread
From: Tetsuo Handa @ 2008-01-18 13:21 UTC (permalink / raw)
To: apw, rdunlap, jschopp; +Cc: linux-kernel
checkpatch.pl was unable to handle \\ within quoted string.
+static void test(char *sp, char *dp)
+{
+ if (*sp == '\\') {
+ *dp++ = '\\';
+ *dp++ = '\\';
+ }
+}
I hope this patch can fix it.
But I don't know whether there is a side effect or not.
Should we use "X" rather than "\\"?
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
---
scripts/checkpatch.pl | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
--- linux-2.6-mm.orig/scripts/checkpatch.pl
+++ linux-2.6-mm/scripts/checkpatch.pl
@@ -276,6 +276,11 @@ sub sanitise_line {
my $quote = '';
foreach my $c (split(//, $line)) {
+ if ($quote && $l eq "\\" && $c eq "\\") {
+ $res .= "\\";
+ $l = '';
+ next;
+ }
if ($l ne "\\" && ($c eq "'" || $c eq '"')) {
if ($quote eq '') {
$quote = $c;
@@ -286,7 +291,7 @@ sub sanitise_line {
$quote = '';
}
}
- if ($quote && $c ne "\t") {
+ if ($quote && $c ne "\t" && $c ne "\\") {
$res .= "X";
} else {
$res .= $c;
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH 2.6.24-rc8-mm1] checkpatch.pl -- Handle backslashes within quoted string.
2008-01-18 13:21 [PATCH 2.6.24-rc8-mm1] checkpatch.pl -- Handle backslashes within quoted string Tetsuo Handa
@ 2008-01-18 15:24 ` Tetsuo Handa
2008-01-22 18:44 ` Andy Whitcroft
0 siblings, 1 reply; 3+ messages in thread
From: Tetsuo Handa @ 2008-01-18 15:24 UTC (permalink / raw)
To: apw, rdunlap, jschopp; +Cc: linux-kernel
Tetsuo Handa wrote:
> checkpatch.pl was unable to handle \\ within quoted string.
Sorry, I didn't know checkpatch 0.13 is available.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 2.6.24-rc8-mm1] checkpatch.pl -- Handle backslashes within quoted string.
2008-01-18 15:24 ` Tetsuo Handa
@ 2008-01-22 18:44 ` Andy Whitcroft
0 siblings, 0 replies; 3+ messages in thread
From: Andy Whitcroft @ 2008-01-22 18:44 UTC (permalink / raw)
To: Tetsuo Handa; +Cc: rdunlap, jschopp, linux-kernel
On Sat, Jan 19, 2008 at 12:24:41AM +0900, Tetsuo Handa wrote:
>
> Tetsuo Handa wrote:
> > checkpatch.pl was unable to handle \\ within quoted string.
>
> Sorry, I didn't know checkpatch 0.13 is available.
No problem. Thanks for trying to fix it.
:)
-apw
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-01-22 18:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-18 13:21 [PATCH 2.6.24-rc8-mm1] checkpatch.pl -- Handle backslashes within quoted string Tetsuo Handa
2008-01-18 15:24 ` Tetsuo Handa
2008-01-22 18:44 ` Andy Whitcroft
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®