lkml.org 
[lkml]   [2014]   [Jun]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] checkpatch: warn on missing spaces in broken up quoted strings
On Fri, Jun 13, 2014 at 02:30:22AM -0700, Joe Perches wrote:

> > +# check for missing a space in a string concatination
> > + if ($prevrawline =~ /[^\\][a-zA-Z]"$/ && $rawline =~ /^\+[\t ]+"[a-zA-Z]/) {
> > + WARN('MISSING_SPACE',
> > + "break quoted strings at a space character\n" . $hereprev);
> > + }
>
> Probably want digits too so maybe \w instead of "[a-zA-Z]/
>

Changing it to that adds the following 6 new warnings:

./drivers/staging/media/lirc/lirc_zilog.c:806 "1) -- please upgrade to a newer driver",
- bug.

./drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c:529 "24G_A[%d] = 0x%x\n", i,
./drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c:537 "24G_C[%d] = 0x%x\n", i,
- the "24G_A" is the last 5 characters of a variable name so
this is sloppy code.

./drivers/scsi/pm8001/pm8001_ctl.c:297 "0x%08x 0x%08x\n",
./drivers/scsi/pm8001/pm8001_ctl.c:432 "0x%08x 0x%08x\n",
./drivers/scsi/qla2xxx/qla_nx2.c:1457 "0x%X 0x%X 0x%X 0x%X 0x%X 0x%X\n"
- hex false positives

I thought about doing that when I wrote my original patch but I was
worried about more hex false positives. If there are only those 3 then
it's probably not a big deal. What do you think?

regards,
dan carpenter



\
 
 \ /
  Last update: 2014-06-13 12:21    [W:0.066 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site