Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp680097ybm; Thu, 28 May 2020 12:25:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJySWxaNQdbIER83f0qwduy/XkaV5FOPfEyltQNbFDHPT7Q3/vBb8fPloPu7IbgpgFTi3Y5o X-Received: by 2002:a17:906:fa84:: with SMTP id lt4mr4806451ejb.318.1590693922226; Thu, 28 May 2020 12:25:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590693922; cv=none; d=google.com; s=arc-20160816; b=TxWDY/9fJ1KjToOGn/tyUQhvl5qNLeaoPnpA21iC9pXSuqBZsEl84cW1O2SfririXf LWupdghIiYmAXYhZxsjru1uKzEM4Ti0LBdKtBCWXhKRTJUpwXCbNeD5ymGGXx9kzDhlR HWyW23+cj9qq1hnwAqiBuB9GBb/fWkSLhGYUVcga6Das9siFcSL49iQsSIwJdlOfCWEA ObXe6DPs7ybhSwNlYSYsURRBGnJn0G6CNqk3hC5QiZMjI5L42OLJxMliA/ZgomHpBTpG sEkY5g6G3R2m8zxOpY8Dz9pLSlyD6Q5tqYk8zoXwJre/G+zOQGm7v3WhSV0/aOvXtN5J OcaA== 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=iWW4IHRekCdL0PBixPrKIwQA4FeB+xPYSGLk7LTdDU8=; b=znurEkgm0GS7MWloKmbWYrYk1j0NbXsNo7BQDjCct+8E+YAK3KwUoqg7BJMdsfIpKX eJXq9L+ckX5+PFN8oH+AS1Ws1hPg0VGoMW+BWhtxz6j2A0Pugi2TvBV+ApX/9Gn3D10s Ro1ZRnsTeEjl0eCZDNh0U7VZ9ZLKRs8Vw8KpXEXIQ/dpxzVxxfd4sCqB0ksxvuxi25y+ iEOC9kkrKzo7WALLZY3I1HXNMFhNzDJMfKhFSMV2C1Pdmnh2bXN6Jx/58HSme9ll3j0u 5Hb21yHLFBeoivVj/WwTXc/nYC3r/NtPPPWHF5Ua7k0Pe7Q+I8ieea0zd0T1v3VzyiEq du1A== ARC-Authentication-Results: i=1; mx.google.com; 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 d3si1088305edn.389.2020.05.28.12.24.58; Thu, 28 May 2020 12:25:22 -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; 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 S2406481AbgE1TWq (ORCPT + 99 others); Thu, 28 May 2020 15:22:46 -0400 Received: from smtprelay0016.hostedemail.com ([216.40.44.16]:35176 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2406438AbgE1TWQ (ORCPT ); Thu, 28 May 2020 15:22:16 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay02.hostedemail.com (Postfix) with ESMTP id E2F38AE562; Thu, 28 May 2020 19:22:10 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 50,0,0,,d41d8cd98f00b204,joe@perches.com,,RULES_HIT:41:355:379:599:800:960:967:968:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1542:1593:1594:1711:1730:1747:1777:1792:2197:2198:2199:2200:2393:2525:2553:2561:2564:2682:2685:2828:2859:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3354:3622:3653:3834:3865:3866:3867:3868:3870:3871:3872:3874:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4321:4605:4823:5007:6119:6691:9025:9110:10004:10226:10400:10848:11232:11658:11914:12043:12050:12297:12555:12663:12679:12740:12760:12895:13439:14181:14659:14721:21080:21221:21324:21451:21627:21740:21788:30003:30054:30060:30070:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: whip46_381349b26d5d X-Filterd-Recvd-Size: 3543 Received: from XPS-9350.home (unknown [47.151.136.130]) (Authenticated sender: joe@perches.com) by omf13.hostedemail.com (Postfix) with ESMTPA; Thu, 28 May 2020 19:22:09 +0000 (UTC) Message-ID: Subject: Re: clean up kernel_{read,write} & friends v2 From: Joe Perches To: Linus Torvalds , Christoph Hellwig Cc: Al Viro , Ian Kent , David Howells , Linux Kernel Mailing List , linux-fsdevel , LSM List , NetFilter Date: Thu, 28 May 2020 12:22:08 -0700 In-Reply-To: References: <20200528054043.621510-1-hch@lst.de> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.36.2-0ubuntu1 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 Thu, 2020-05-28 at 11:51 -0700, Linus Torvalds wrote: > On Wed, May 27, 2020 at 10:40 PM Christoph Hellwig wrote: > > this series fixes a few issues and cleans up the helpers that read from > > or write to kernel space buffers, and ensures that we don't change the > > address limit if we are using the ->read_iter and ->write_iter methods > > that don't need the changed address limit. > > Apart from the "please don't mix irrelevant whitespace changes with > other changes" comment, this looks fine to me. > > And a rant related to that change: I'm really inclined to remove the > checkpatch check for 80 columns entirely, but it shouldn't have been > triggering for old lines even now. > > Or maybe make it check for something more reasonable, like 100 characters. > > I find it ironic and annoying how "checkpatch" warns about that silly > legacy limit, when checkpatch itself then on the very next few lines > has a line that is 124 columns wide Yeah. perl ain't c. And this discussion has been had many times. Here's one from 2009 https://lkml.org/lkml/2009/12/15/490 Another from 2012 https://lkml.org/lkml/2012/2/5/141 Line lengths checks are normally pretty silly. Hard limits at 80 really don't work well, especially with some of the 25+ character length identifiers used today. I think a line length warning at 132 is generally reasonable but it could depend on complexity and identifier lengths. > And yes, that 124 character line has a good reason for it. But that's > kind of the point. There are lots of perfectly fine reasons for longer > lines. > > I'd much rather check for "no deep indentation" or "no unnecessarily > complex conditionals" or other issues that are more likely to be > _real_ problems. That deep indentation test already exists at 6 tabs. Maybe it should be 5 instead. Or maybe even 4, but that's a pretty easy to need and common use case. Tab depth use in the kernel is more or less $ git grep -Poh '^\t+(if|do|while|for|switch)\b' | \ sed -r 's/\w+//g' | \ awk '{print length($0);}' | \ sort | uniq -c | sort -rn 903993 1 339059 2 89334 3 18216 4 3282 5 605 6 148 7 36 8 4 9 1 10 > But do we really have 80x25 terminals any more that > we'd care about? trivial btw: VT100s were 80x24 or 132x24, PCs were 80x25