Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp6568661ybc; Thu, 28 Nov 2019 01:31:39 -0800 (PST) X-Google-Smtp-Source: APXvYqyjYqS7uZAHdhOglCErxAFZql0ERmqVito5divg8Gr1hae+DW7V/820jqGHxEiyzFqPNbhH X-Received: by 2002:a17:906:31c3:: with SMTP id f3mr31160548ejf.198.1574933498966; Thu, 28 Nov 2019 01:31:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574933498; cv=none; d=google.com; s=arc-20160816; b=0U3G8fgB1UFJphibIWy5TJcS887NfL2htyC9HdcCo04xU3M8ellr1fJ7qezJs9G0DL vsOpoNwHOmHyi2aRIIJ+lqmpeQboogv4R2fBl1/JsKqrbvp6cv+41nNkAdifPMU9dPK6 FMl6jffQebYQTkSjwkcToMbhqEWcPy7rRuEAgUsfAXz38sCwTFURX/vW1S9PvP6YtC6U /uYNDE7LOex8ehQ0ra+qanZBl81jnftmSzh6lj6bIzAOdQGCr3/H09X9UmxPcF5vf3pw AWRfC+W1D7t23RkPUieSKZfrtZBKcaAfv4lw6GTHGCEJy5I/v4p6VaJBceE2Z7j87ZgJ IVOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :organization:in-reply-to:subject:cc:to:from; bh=tzJ0+V6ysRWSWCcvNRWYQM6aa/NyXaNAEz/OL9ZkUiU=; b=g6KBi0WKkNE/MgH51FhaHGLzEUAS/lBFVYuv4mkhnT4M9EbsUCZIhlhj7V2TdetYFK uFW7aT9332kSvzJ54/JcOD6wfOPz6CkrdZVH9zOKVQdQlWynLrmVrZCsE4qwdt3Nj3b3 IoRMnaMg6mMr30ephR0VSvwpGbSFLG4GCnv0jRi/eUdMrdV3pLVl3NALc9UTEfgYwN8p OQdTIIuYv3t6OIOgCcwC7D9FYH6GR6dyXXu0ey70OPeN96zcd7CjCFCK3eLOTilL+kg9 M9lk5M5ItFEfaWFGwzHYJe6i+iMLkCMgXaab8EsTtBiswC/kGSNkE6eXG53xmdnRX6Up LuEg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ay9si11617077edb.44.2019.11.28.01.31.14; Thu, 28 Nov 2019 01:31:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726698AbfK1JaC (ORCPT + 99 others); Thu, 28 Nov 2019 04:30:02 -0500 Received: from mga14.intel.com ([192.55.52.115]:35389 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726092AbfK1JaC (ORCPT ); Thu, 28 Nov 2019 04:30:02 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Nov 2019 01:30:01 -0800 X-IronPort-AV: E=Sophos;i="5.69,253,1571727600"; d="scan'208";a="199470313" Received: from jnikula-mobl3.fi.intel.com (HELO localhost) ([10.237.66.161]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Nov 2019 01:29:58 -0800 From: Jani Nikula To: Krzysztof Kozlowski , Andy Whitcroft , Joe Perches , linux-kernel@vger.kernel.org Cc: Pierre-Louis Bossart , Krzysztof Kozlowski Subject: Re: [PATCH] checkpatch: Look for Kconfig indentation errors In-Reply-To: <1574906800-19901-1-git-send-email-krzk@kernel.org> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <1574906800-19901-1-git-send-email-krzk@kernel.org> Date: Thu, 28 Nov 2019 11:29:56 +0200 Message-ID: <87a78gnyaz.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 28 Nov 2019, Krzysztof Kozlowski wrote: > Kconfig should be indented with one tab for first level and tab+2 spaces > for second level. There are many mixups of this so add a checkpatch > rule. > > Signed-off-by: Krzysztof Kozlowski I agree unifying the indentation is nice, and without something like this it'll start bitrotting before Krzysztof's done fixing them all... I think there's been quite a few fixes merged lately. I approve of the idea, but I'm clueless about the implementation. BR, Jani. > --- > scripts/checkpatch.pl | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > index e41f4adcc1be..875e862cf076 100755 > --- a/scripts/checkpatch.pl > +++ b/scripts/checkpatch.pl > @@ -3046,6 +3046,13 @@ sub process { > "Use of boolean is deprecated, please use bool instead.\n" . $herecurr); > } > > +# Kconfig has special indentation > + if ($realfile =~ /Kconfig/ && > + ($rawline =~ /^\+ +\t* *[a-zA-Z-]/) || ($rawline =~ /^\+\t( | )[a-zA-Z-]/)) { > + WARN("CONFIG_INDENTATION", > + "Kconfig uses one tab indentation, optionally followed by two spaces.\n" . $herecurr); > + } > + > if (($realfile =~ /Makefile.*/ || $realfile =~ /Kbuild.*/) && > ($line =~ /\+(EXTRA_[A-Z]+FLAGS).*/)) { > my $flag = $1; -- Jani Nikula, Intel Open Source Graphics Center