Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp1625953ybm; Sat, 30 May 2020 15:16:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOANNLy+TGxmFaj+3jIFlGyPSefJ+3p6nYKStrotYPBmZOVia44GilQll1NOc3OgXMT2pk X-Received: by 2002:a50:bb6f:: with SMTP id y102mr15110280ede.152.1590876972237; Sat, 30 May 2020 15:16:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590876972; cv=none; d=google.com; s=arc-20160816; b=YAx0u4SeHFTAO590NHUypbhp04G/n5BkyJGygzu7ejqJ0/Tu+N8a71/gvGYBe3MLbJ q43dHp70wrErwWo0I3mH4bCL4vja3IwsH11gmtDmRWO5+aiTuy/GACLJLv+fn6sKzrdH wG1j5BAV5V9OKxArzyYHoWkt3c55ussXmZz8dxNmO8DL90JnHuqP5MtxeJI/h/zb0Mhw H1LkLOSTQ3AsizR8+2AvUH6bet2mFd+qaL6F62K4zpR2Siv6YhNkqTppEfGJBI3IeArP 3p7dm9IQm9OfarStc2JZknaRKWtRvsqzhFKNktW+cah9KM8102xlreelvSrmTBcGzocj ahHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:to:cc:in-reply-to:date:subject :mime-version:message-id:from:dkim-signature; bh=8sism75zVT9pduqsvpPRRhWEaW/18m+btjuZdwKkiCw=; b=lGNmZ8j0+DbnVnFph6R3QeZDd3aU/vtyxwso1CJ3Q0uA1uIx9R54kloyEpDbl8Yr4u LUGMBpUnR82r+KExTHLjAYmIjD0j1alRzhfkXGTiuA0RBz6wYQArWO1bK97x/YEi0B0a TgKjj1bNGxoVj1arSWvN28DWuhXK/KYD9wRdni85Tdh3k7+i2LzJvgUyijcFvsf9/scW Hfm9MSPxqtzzQRpSxdL+4OX4Yz62Quz8WBms15QXo8OnMEvGxyeg4Z3wBVR+JZYnZtPb Sm5tLk4i3Un4Jm3gk/y+u3nRlYA41/w4HgvPn2aYEWPXCu5ypZRR4EEP6Ln39xk9nMfD bEDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dilger-ca.20150623.gappssmtp.com header.s=20150623 header.b=CAKZdEQw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u14si1004370ejf.226.2020.05.30.15.15.49; Sat, 30 May 2020 15:16:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@dilger-ca.20150623.gappssmtp.com header.s=20150623 header.b=CAKZdEQw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729383AbgE3WOH (ORCPT + 99 others); Sat, 30 May 2020 18:14:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729083AbgE3WOG (ORCPT ); Sat, 30 May 2020 18:14:06 -0400 Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EAAB4C08C5CA for ; Sat, 30 May 2020 15:14:05 -0700 (PDT) Received: by mail-pl1-x641.google.com with SMTP id t16so2702806plo.7 for ; Sat, 30 May 2020 15:14:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dilger-ca.20150623.gappssmtp.com; s=20150623; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=8sism75zVT9pduqsvpPRRhWEaW/18m+btjuZdwKkiCw=; b=CAKZdEQwT0plXobzxfL58PrCDLJtv4jHFVRDD0w3EALaSlzRVsnW1FMeEpX8DKIdrr D3d3Y2C7Ks0liwfyZ0VdsBySPBJD/HpBQL/rEkhGsgOXzGktxLL+yIovSotoqoMX0paI KR3TJF41EiQx1tJMId3EV2qrifWb7SPlsi1t5GAzniipnBdE9cV+61Lm329rXhm0qf12 IvO0S01eGLQsNcoue2mhrladjTUzeDrJXwpRuXEON4617o1hN88MtzS7ANB/B+BBGpHA R1XgHVwTUhvoDFM6Dyi4XPHE8ZGNN4SeBVNDiOsmlWbDf35LiSw9pKaI09EGiNRwz4hq +jTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=8sism75zVT9pduqsvpPRRhWEaW/18m+btjuZdwKkiCw=; b=cUeiBTXC6RVZJEK4OX0+6cyi1jEPPqqL+w5EhTKvOx5gBnMMhOHZcfF7esUc26Petc BZXRsBOzqWNH18NeGMtDLDT6OLsCKtOmQVDejgCO6XSuUse65uCASZlm4+CiTO3v1/kr wfmyHY1amP3Y/E7vu/1I7ZcfgJaxeCS4gImUBGJOk5szrW+6WwbmDQaUUCO1KfEndr2L Qk9sPA2MpWjZNuLhjOL0CK59lumhhIS7UWVt1cm4OmI4M/Li6dZ7K4rok+EhiVHnoocX Umu9UraHFupecHD0y7p1TMjFqGmcITQHcWK3feSnEQwKsiUIV3RrMrNOWFMo9XynlHrj JAxw== X-Gm-Message-State: AOAM5327tI4BhqE5ILzl8IrQyURAsi0rcrPD3ziKdxQcH6OCUu/GtM0S Sj/9wW4d/b3HOpBXRilgvU9JnA== X-Received: by 2002:a17:90b:245:: with SMTP id fz5mr3098009pjb.138.1590876845267; Sat, 30 May 2020 15:14:05 -0700 (PDT) Received: from [192.168.10.160] (S0106a84e3fe4b223.cg.shawcable.net. [70.77.216.213]) by smtp.gmail.com with ESMTPSA id 140sm7528024pfy.95.2020.05.30.15.14.03 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 30 May 2020 15:14:04 -0700 (PDT) From: Andreas Dilger Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_83631672-66E3-42A2-A44C-BB2762691B7E"; protocol="application/pgp-signature"; micalg=pgp-sha256 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: [PATCH] checkpatch/coding-style: Allow 100 column lines Date: Sat, 30 May 2020 16:14:01 -0600 In-Reply-To: <9c360bfa43580ce7726dd3d9d247f1216a690ef0.camel@perches.com> Cc: Linus Torvalds , David Laight , Casey Schaufler , David Howells , Christoph Hellwig , Al Viro , Ian Kent , Linux Kernel Mailing List , linux-fsdevel , LSM List , NetFilter To: Joe Perches References: <20200528054043.621510-1-hch@lst.de> <22778.1590697055@warthog.procyon.org.uk> <3aea7a1c10e94ea2964fa837ae7d8fe2@AcuMS.aculab.com> <9c360bfa43580ce7726dd3d9d247f1216a690ef0.camel@perches.com> X-Mailer: Apple Mail (2.3273) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Apple-Mail=_83631672-66E3-42A2-A44C-BB2762691B7E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On May 29, 2020, at 5:12 PM, Joe Perches wrote: >=20 > Change the maximum allowed line length to 100 from 80. What is the benefit/motivation for changing this? The vast majority of files are wrapped at 80 columns, and if some files start being wrapped at 100 columns they will either display poorly on 80-column terminals, or a lot of dead space will show in 100-column terminals. > Miscellanea: >=20 > o to avoid unnecessary whitespace changes in files, > checkpatch will no longer emit a warning about line length > when scanning files unless --strict is also used > o Add a bit to coding-style about alignment to open parenthesis >=20 > Signed-off-by: Joe Perches > --- > Documentation/process/coding-style.rst | 25 ++++++++++++++++--------- > scripts/checkpatch.pl | 14 +++++++++----- > 2 files changed, 25 insertions(+), 14 deletions(-) >=20 > diff --git a/Documentation/process/coding-style.rst = b/Documentation/process/coding-style.rst > index acb2f1b36350..55b148e9c6b8 100644 > --- a/Documentation/process/coding-style.rst > +++ b/Documentation/process/coding-style.rst > @@ -84,15 +84,22 @@ Get a decent editor and don't leave whitespace at = the end of lines. > Coding style is all about readability and maintainability using = commonly > available tools. >=20 > -The limit on the length of lines is 80 columns and this is a strongly > -preferred limit. > - > -Statements longer than 80 columns will be broken into sensible = chunks, unless > -exceeding 80 columns significantly increases readability and does not = hide > -information. Descendants are always substantially shorter than the = parent and > -are placed substantially to the right. The same applies to function = headers > -with a long argument list. However, never break user-visible strings = such as > -printk messages, because that breaks the ability to grep for them. > +The preferred limit on the length of a single line is 80 columns. > + > +Statements longer than 80 columns should be broken into sensible = chunks, > +unless exceeding 80 columns significantly increases readability and = does > +not hide information. > + > +Statements may be up to 100 columns when appropriate. > + > +Descendants are always substantially shorter than the parent and are > +are placed substantially to the right. A very commonly used style > +is to align descendants to a function open parenthesis. > + > +These same rules are applied to function headers with a long argument = list. > + > +However, never break user-visible strings such as printk messages = because > +that breaks the ability to grep for them. >=20 >=20 > 3) Placing Braces and Spaces > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > index dd750241958b..5f00df2c3f59 100755 > --- a/scripts/checkpatch.pl > +++ b/scripts/checkpatch.pl > @@ -53,7 +53,7 @@ my %ignore_type =3D (); > my @ignore =3D (); > my $help =3D 0; > my $configuration_file =3D ".checkpatch.conf"; > -my $max_line_length =3D 80; > +my $max_line_length =3D 100; > my $ignore_perl_version =3D 0; > my $minimum_perl_version =3D 5.10.0; > my $min_conf_desc_length =3D 4; > @@ -99,9 +99,11 @@ Options: > --types TYPE(,TYPE2...) show only these comma separated message = types > --ignore TYPE(,TYPE2...) ignore various comma separated message = types > --show-types show the specific message type in the = output > - --max-line-length=3Dn set the maximum line length, if = exceeded, warn > + --max-line-length=3Dn set the maximum line length, (default = $max_line_length) > + if exceeded, warn on patches > + requires --strict for use with --file > --min-conf-desc-length=3Dn set the min description length, if = shorter, warn > - --tab-size=3Dn set the number of spaces for tab = (default 8) > + --tab-size=3Dn set the number of spaces for tab = (default $tabsize) > --root=3DPATH PATH to the kernel tree root > --no-summary suppress the per-file summary > --mailback only produce a report in case of = warnings/errors > @@ -3282,8 +3284,10 @@ sub process { >=20 > if ($msg_type ne "" && > (show_type("LONG_LINE") || = show_type($msg_type))) { > - WARN($msg_type, > - "line over $max_line_length = characters\n" . $herecurr); > + my $msg_level =3D \&WARN; > + $msg_level =3D \&CHK if ($file); > + &{$msg_level}($msg_type, > + "line length of $length = exceeds $max_line_length columns\n" . $herecurr); > } > } >=20 >=20 Cheers, Andreas --Apple-Mail=_83631672-66E3-42A2-A44C-BB2762691B7E Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iQIzBAEBCAAdFiEEDb73u6ZejP5ZMprvcqXauRfMH+AFAl7S2qkACgkQcqXauRfM H+AkRA//RZmP8frfFpi0pH85h7onJK9vtI9wxpcARaYob2jCUehjiSxeetTlAwJE +SX1+sZeCoghXelyFESfWG1p65jRiZhWjVMT7pxj5mVAd9leBVjkgwYwbALLiffz wg/SmDTR7LIGMR/1xqATTzwVDpLO1yj6nwVyAG8WDaMiiya4EEjxPtGaCGJ/Yo+K GSqY2ix/NKHhwgAdwduOjrY3OSCUziByrwibr8p7qi4jAFs2J+2vE65AqY05RLnZ vyPuh7h1bGr2tlaapHJn4b2AaWSttJ5Cj3lCBwPDv4yZE2CIY0gcw7d2txWh+hvE 5Q9SBeLVNGs0XddUV6ebvZhtaSWi1qi6OyTyjX9v7vzUPZF7kUtAIp9X3Ewx2PJu POGu2JkdbN0jzt7Ur+IyoNZY+uzidTlpACTQU/ZlfISuhAnOjgFJfFRTEHI+aD8G zs2UoawmSLKPnVSDWv8MxYtw7uH5yJw1WL7NVMK55ofBimRXFrgsTwL678A1LWZx 7OLhQUvUtduxff13+DNc03zEkgMv9iyFw8VmzQbxiwG2yWnH93RiuHOzIf1uPOdA y42Aq0KZIeF7U4yJkPFvZuRyoaKSrjuY7Y8DrGn4MD8qW0S0s64DuiuMrYrNjuCK 0n9NBCorgBVUaroHaek0MUch8N/DvsMt84yttZAoryaBqN9jDZ0= =qASh -----END PGP SIGNATURE----- --Apple-Mail=_83631672-66E3-42A2-A44C-BB2762691B7E--