lkml.org 
[lkml]   [2020]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] checkpatch: check for missing \n at the end of logging message
On Wed, Apr 08, 2020 at 08:10:23PM -0700, Joe Perches wrote:
> Some types of false positives:
>
> o Many of the formats seem to end in a ':' or a ' '
> maybe those should be excluded
> #86: FILE: drivers/android/binder_alloc_selftest.c:86:
> + pr_err("free seq: ");
>

Yeah. I also ignored strings that end in a space in my version.

> o Split string formats should be excluded better
> as only the first string fragment is checked:
> #1001: FILE: drivers/ata/pata_octeon_cf.c:1001:
> + dev_info(&pdev->dev, "version " DRV_VERSION" %d bit%s.\n",

I ignored anything with a newline in it anywhere.

> + is_16bit ? 16 : 8,
> + cf_port->is_true_ide ? ", True IDE" : "");
>
> probably a few others, including a desire to check
> if a pr_cont is below the use within a few lines.

Seems tricky to implement... I think if you can't make it work it's
still usefull even with a some false positives.

regards,
dan carpenter

\
 
 \ /
  Last update: 2020-04-09 12:41    [W:0.128 / U:1.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site