On Thu, 2020-05-07 at 15:45 -0400, Steven Rostedt wrote: > On Thu, 07 May 2020 12:06:56 -0700 > Joe Perches <j...@perches.com> wrote: > > > People describe changes as a "fix" all the time for stuff > > that isn't an actual fix for a logic defect but is instead > > an update to a particular style preference. > > > > Then the "fix" word causes the patch to be rather uselessly > > applied to stable trees by AUTOSEL. > > > > It's especially bad when the 'Fixes: <sha1> ("description")' > > tag is also added. > > > > It's a difficult thing to regulate and I don't believe a > > good mechanism would be possible to add to checkpatch or > > coccinelle to help isolate these things. > > > > git diff -w sometimes helps, but that's not really a thing > > that checkpatch could do. > > > > Any suggestions? > > I'm unfamiliar with how the coccinelle script is used, but I thought there > was some discussion some time back to have checkpatch not produces the same > kinds of warnings to code as it does to patches. > > A lot of useless updates were being submitted when people were running > checkpatch on existing kernel code and producing warnings that are not > worth "fixing", but something that new code should try to avoid.
checkpatch already has several blocks that look like if (input_is_a_patch) warn(...) else if (input_is_a_file) check(...) where by default, check() is not output. I've also suggested variations discouraging checkpatch use on files outside of drivers/staging/ multiple times https://lore.kernel.org/lkml/0753cae7829b98998ac3f5f9fcb52ba1f2475ee1.ca...@perches.com/