Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5100340yba; Wed, 8 May 2019 07:55:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqy1cK9HYfO+BYUGVjzTC54soqS4DAumdjHqak/YLMRBZy44Jm9cgIwm6mXg18DEphxQSD5/ X-Received: by 2002:a63:1d02:: with SMTP id d2mr20974405pgd.26.1557327306164; Wed, 08 May 2019 07:55:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557327306; cv=none; d=google.com; s=arc-20160816; b=qMUPXDaAd6qMQImgo9UpXwoHYz9hCkiGTYaB2BBaXkleEWPUFVo8m0OKYcoBwN6pPr 4MzmCrudqVXnXtAze+aWiLB2kHVDMBRboOg4EeQ9Z/jj6vHVzg+XybumQ7ZVUaiRF2Kl AW1FMQluUEu4DWmoHEZ0iJIfVwMWv9KMB4SLnv4kNdsoFEDfU7Tr7nH2FHovD7f8xnB5 ogMFX/x7JCsUAHr95AsHmPPpCnaFqG/fpZt1veu0I6iEHdfoFltq5zffExSCWoLTG6if wGz1JT0KthssljZxLd1YBbxnpxJoKtZmf+5sBviVrVvzacS4vrG30BOBKdNXDplooWAx y/Tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=0GAY42kYStrSFVPuQedGH/XXeU3oFxFROVKKsfo/8kk=; b=YRQicS40SgYEOBg5w707amjth/tGXqoAmKA8n9TDKBfmTEKgJNg71wcc4qcYHXOQVZ wOwB+ILQU6emiBrC02FXg4vRd9Rf0FbYF3wRCYKfWXay8d85yhtl2GKXH2b/EPbJUQZ1 kX9NSYD4NVPLAO452BxUXS0Jd332APTLBzcxYBTS2uUj7jdyYI80J9CoivaCGDgS30Ij nAmbc1/ddKIEKaMjyBOulETbgmsWomNzhMq780TJpCcN1LBLadjHnideymwjagi5K/gc fEyRPJnw4YdoN4Ns5E/86x00s9tm376qMkiI+iCbHGg4LrMB4Sb+1zFmB9Muz1ShvEU/ wVEQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 36si23732306pla.235.2019.05.08.07.54.45; Wed, 08 May 2019 07:55:06 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727589AbfEHOwt (ORCPT + 99 others); Wed, 8 May 2019 10:52:49 -0400 Received: from smtprelay0246.hostedemail.com ([216.40.44.246]:53832 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727224AbfEHOws (ORCPT ); Wed, 8 May 2019 10:52:48 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay04.hostedemail.com (Postfix) with ESMTP id 0A3E7180A814F; Wed, 8 May 2019 14:52:47 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::,RULES_HIT:41:355:379:599:960:973:982:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1540:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2687:2693:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3870:3871:3872:4250:4321:5007:7903:8603:10004:10400:10848:11232:11658:11914:12740:12760:12895:13069:13311:13357:13439:14040:14659:21080:21433:21627:30012:30054:30070:30091,0,RBL:23.242.196.136:@perches.com:.lbl8.mailshell.net-62.8.0.180 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:24,LUA_SUMMARY:none X-HE-Tag: sand63_18313cd388c03 X-Filterd-Recvd-Size: 1786 Received: from XPS-9350.home (cpe-23-242-196-136.socal.res.rr.com [23.242.196.136]) (Authenticated sender: joe@perches.com) by omf04.hostedemail.com (Postfix) with ESMTPA; Wed, 8 May 2019 14:52:46 +0000 (UTC) Message-ID: <73a79b49d0183468a63876b170d1318d38c78d73.camel@perches.com> Subject: Re: [PATCH 4/4] checkpatch: replace magic value for TAB size From: Joe Perches To: Antonio Borneo , Andy Whitcroft Cc: linux-kernel@vger.kernel.org Date: Wed, 08 May 2019 07:52:45 -0700 In-Reply-To: <20190508122721.7513-4-borneo.antonio@gmail.com> References: <20190508122721.7513-1-borneo.antonio@gmail.com> <20190508122721.7513-4-borneo.antonio@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.30.1-1build1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2019-05-08 at 14:27 +0200, Antonio Borneo wrote: > The size of 8 characters used for both TAB and indentation is > embedded as magic value allover the checkpatch script, and this > makes the script less readable. > > Replace the magic value 8 with the perl variable "$tabsize". > From the context of the code it's clear if it is used for > indentation or tabulation, so no need to use two separate > variables. > > As side benefit of this change, it makes easy to replace the TAB > size when this script is used by other projects with different > requirements in their coding style (e.g. OpenOCD [1] requires > TAB size of 4 characters [2]). > In these cases the script will be probably modified and adapted, > so there is no need (at least for the moment) to expose this > setting on the script's command line. Disagree. Probably getter to add a --tabsize= option now.