From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754643AbbILMNh (ORCPT ); Sat, 12 Sep 2015 08:13:37 -0400 Received: from mail-wi0-f179.google.com ([209.85.212.179]:33561 "EHLO mail-wi0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754491AbbILMNg (ORCPT ); Sat, 12 Sep 2015 08:13:36 -0400 From: Tal Shorer To: tal.shorer@gmail.com, apw@canonical.com, joe@perches.com Cc: linux-kernel@vger.kernel.org Subject: possible new false positive in checkpatch Date: Sat, 12 Sep 2015 15:13:31 +0300 Message-Id: <1442060011-3996-1-git-send-email-tal.shorer@gmail.com> X-Mailer: git-send-email 2.4.6 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since my last pull from upstream (today) , I started seeing some checkpatch warnings regarding suspect code indent I believe are false positive. Take this code for example: static int foo(void) { while (bar()) /* do nothing */; } When running checkpath on it, the following warning is emitted: tal@tal:~/Dev/lfs/linux|0 $ scripts/checkpatch.pl -f ~/tmp/foo.c WARNING: suspect code indent for conditional statements (8, 32) #3: FILE: /home/tal/tmp/foo.c:3: + while (bar()) + /* do nothing */; total: 0 errors, 1 warnings, 5 lines checked /home/tal/tmp/foo.c has style problems, please review. NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. tal@tal:~/Dev/lfs/linux|1 $ Using my limited perl knowledge, I believe the lines causing this are 3111-3133: # remove inline comments $s =~ s/$;/ /g; $c =~ s/$;/ /g; Introduced in commit 9f5af480f4554aac12e002b6f5c2b04895857700: checkpatch: improve SUSPECT_CODE_INDENT test Commenting out these lines removes the warning. This pattern exists in many places around the kernel source. Is this the intended behavior?