Re: [PATCH v2] checkpatch: Add a warning for log messages that don't end in a new line

From: Logan Gunthorpe
Date: Sun Nov 26 2017 - 13:33:55 EST




On 26/11/17 11:17 AM, Julia Lawall wrote:
> The main limitation that is likely to remain in my script is that
> Coccinelle doesn't always understand ifdefs properly. So
> #ifdef
> printk("xxx");
> #else
> printk("yyy");
> #endif
> pr_cont("zzz");
>
> may give a warning about the first printk.

Yes, that's another clever corner case I didn't think of. My patch will
have the same issue. But that's terrible style[1] and I should hope it's
quite rare.

> 0-day only runs on changed files and only reports on changed code, to
> the best of my understanding, so I don't think it is a problem.

Oh, cool.

Logan

[1]
https://www.kernel.org/doc/html/latest/process/coding-style.html#conditional-compilation