Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp1714692ybg; Thu, 30 Jul 2020 00:12:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4AzIlG4nFaKw5CvYjJAV/GFgARHWuh0moigyiRr+3s8joHl2Ovh8WBpwVTWUDOYS/MxxV X-Received: by 2002:a17:906:82c1:: with SMTP id a1mr1296092ejy.172.1596093129496; Thu, 30 Jul 2020 00:12:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596093129; cv=none; d=google.com; s=arc-20160816; b=RW3vCZyFX50tyiiLA4q9OQem4NDtuQIBP/DeCj4Gl/0RsySlfDPkr5CM1HkGxSCu35 kk8drwGVzx2D7OL0UrBaF+0GDTER/YaeqUvi5MFMa9mWc0RB48PvALlUxyqb4UIS9Oo7 W72T1XSQbIxarW7iNURiTbzC1xYhN2s61HxkkIztIySnLNSQ7ADtO1TxwTPHi7cWg38a atdaHWj2M2m67ZTgkSYEca8MQhB0ybdq/qUsggMhbqfNwVbn6+vErPFPDfm+Akf85y/q lrjeO0X6OoWOX4fx+OD68TfgXni1FBnM0//gsZlobh6ueGeV1PLnFy7A9GLbOJlOEyNo rgkg== 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 :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=+w/sK1SsZKUn1Dn3lJ80Y6FqshMKdUhZKeHK5jUWI9U=; b=yMDAv8lc5vrgZSPvyiaXwdROOCwrXDPHhNdAqChnEeYyeAE/EVZc7X7iNOpSx6NAhg mzCST2Qiz11yoKe5d1C35xabWeyDuGefby1Mnv/A6blgL0lY2ghCMdD8VWSifwXQL6ha g8W/exiiHhzttUjiiWEiY0HmgGMLpBYkcjdP4xWmdJ/uxxcEbJB3e95s9vFpCueAbWCx yCu5ibtE5mgGYjcunLF25B/+oWmdfhpyYAfBRGikKOwaKxDEtmEFdrGefsYw+JP07ScG uo+69F7gdalknfqOBQrWRQOGXCb3thNuuwes7XNSrvdx1A5Zhigc1b/tgJFsEMn23JEa clBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=ualbdPWS; dkim=neutral (no key) header.i=@vger.kernel.org header.s=2020e header.b=pzTikaBT; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bg17si2619190ejb.16.2020.07.30.00.11.47; Thu, 30 Jul 2020 00:12:09 -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=@linutronix.de header.s=2020 header.b=ualbdPWS; dkim=neutral (no key) header.i=@vger.kernel.org header.s=2020e header.b=pzTikaBT; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728832AbgG3HKM (ORCPT + 99 others); Thu, 30 Jul 2020 03:10:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726133AbgG3HKM (ORCPT ); Thu, 30 Jul 2020 03:10:12 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67BECC061794; Thu, 30 Jul 2020 00:10:12 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1596093010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=+w/sK1SsZKUn1Dn3lJ80Y6FqshMKdUhZKeHK5jUWI9U=; b=ualbdPWSrWD9PSFYMBEowro0ByFP1H1D4BeTAwCZW4ISWnwsM5iMmiNENi5qqV4RjOyw/x R1oSCVNNteKIA5s1lUB6/vMdWwAkQ8ZAgavxGnttNkEkVQZ8vzdPCRQDFw0uG0ONKiZlGS T2rkCJcl+kcF9dsal0D6S9BuNjC7Yyd6EKfovGsM5vN8uqWQSEkLSmDkElzI4eCmzcW8TK BsHWMgLtB/HX1A4e7Ny72q/tomkBWw3SdExv+1Rdg7B779+JlgSgAu4u0rF7y9qddw00IJ V25WpzpgjaDxONHNpVkEuN9o1Segs20XrxpK6j4H31qpW7eWtITiyzhxo1yiRw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1596093010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=+w/sK1SsZKUn1Dn3lJ80Y6FqshMKdUhZKeHK5jUWI9U=; b=pzTikaBTF7mRs6nV0Yky0Nu4FOX/qXu1LiyRtHFUpxCVd5vZMZPgxyN+t23SxBmvm3qe+A Bozdd5Yp3DDSWBCA== To: Al Viro Cc: Christoph Hellwig , Linus Torvalds , Stephen Rothwell , Luis Chamberlain , Matthew Wilcox , Kees Cook , Iurii Zaikin , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 15/23] seq_file: switch over direct seq_read method calls to seq_read_iter In-Reply-To: <20200729205919.GB1236929@ZenIV.linux.org.uk> References: <20200707174801.4162712-1-hch@lst.de> <20200707174801.4162712-16-hch@lst.de> <87eep9rgqu.fsf@nanos.tec.linutronix.de> <20200729205919.GB1236929@ZenIV.linux.org.uk> Date: Thu, 30 Jul 2020 09:10:10 +0200 Message-ID: <87eeota371.fsf@nanos.tec.linutronix.de> 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 Al Viro writes: > On Fri, Jul 17, 2020 at 11:09:13PM +0200, Thomas Gleixner wrote: >> >> Needs some thought and maybe some cocci help from Julia, but that's way >> better than this brute force sed thing which results in malformed crap >> like this: >> >> static const struct file_operations debug_stats_fops = { >> .open = debug_stats_open, >> .read_iter = seq_read_iter, >> .llseek = seq_lseek, >> .release = single_release, >> }; >> >> and proliferates the copy and paste voodoo programming. > > Better copy and paste than templates, IMO; at least the former is > greppable; fucking DEFINE_..._ATRIBUTE is *NOT*, especially due > to the use of ##. Copy and paste itself is not the issue, but once the copy and paste orgy starts you end up with more subtle bugs and silly differences than copies. I spent enough time cleaning such crap up just to figure out that once you've finished a full tree sweep you can start over. grep for these things is a nuisance, but it's not rocket science to figure it out. I rather have to figure that out than staring at a gazillion of broken implementations. Thanks, tglx