Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1806876imm; Wed, 16 May 2018 03:26:21 -0700 (PDT) X-Google-Smtp-Source: AB8JxZomoObOWf2TPIThYsRjeOsvgfSijXa/uOPVbsxBDO6eZqTTkkVXFnwvWepVZJpdIoF7RhsO X-Received: by 2002:a63:9302:: with SMTP id b2-v6mr228557pge.263.1526466381062; Wed, 16 May 2018 03:26:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526466381; cv=none; d=google.com; s=arc-20160816; b=WaiRW6Vl7MivDcSMyHpx71X2NU7wRGBLTT1V2ikj3vrNQZwufl+q2WmRWchVJVTwFY 1ybzL18QbvSS1i+I7BnPpk5ncmgVwRATRk7Rt/V7GH9qgHeU+p41Qi2762N7gaVPyt9d SbkY0RB47fWxOkuvNzZYiSfLtrjtJD9zGLUguhJPPZY/uJjoQfMFc5pdg4rU2r6OqVnN USxQM/7TYHakpRbZ2Te7XinrfMmWlnvZnjj5YNSdTC0Hb2wh/8gYXUrjTssmOd1eoeKB HW4huxw4gE3jak0kfZ5DxjYnkYVl++H+Yi7qq9kw6PifmmvMTJ1FgoJlmwuf+xecs9wB ss0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=gnr6ETqPvCt4d0Sg07csXSD3VNs3RbGdCBP+/mPO834=; b=kKSDkNaa3twZaFwyCX5SlNOeqGCPtVWb6zAZ6qWbtcq07VljafSZbcfW+B3FW/CfLP jy6zPR0KLPajrVzMNSHO7LIbSems+lZLKLXb/pSsA0PRwSzZaGssCIbayBZLX4eLdDjk Cz5FY8RqiSBCvyzYx6DrcQTa+GeZwmUv7/i7GKiTbd0/q7fMUHM2wV3eC95VrjWYjPVd RKfSVZd2as7b186lRFmUrIoNKZzmZVq7fCseNKdNVLwaZRhuScjiHortwjQCDbKHADQ9 739E05dANG5+bRqPFYpbDnwdz17DYoH184qJJrclNiivrtl+TlYCWb7926zBEohGYUQS ym3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=PwjGMvm2; 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 g10-v6si1812146pgq.302.2018.05.16.03.26.06; Wed, 16 May 2018 03:26:21 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=PwjGMvm2; 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 S1752564AbeEPJo3 (ORCPT + 99 others); Wed, 16 May 2018 05:44:29 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:46828 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751485AbeEPJoV (ORCPT ); Wed, 16 May 2018 05:44:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=gnr6ETqPvCt4d0Sg07csXSD3VNs3RbGdCBP+/mPO834=; b=PwjGMvm2pMtyMLPF7hBtM+Fmj trOc6RBxvr+FURdd4MUz1Ax4xaPIaXkkGcpf3grUfjBKjfLBkxqGj3DnF0l+WwGMzIR1rbfW2JmMI iTWY3Nt2a27yQ4Pwgp9SG+o+lWJ2zFueHDyZmynVThFXVLSgtFmlezPH4mCRQNR6pktYCgtT34OpT h9UX6Rygu++ENP7EsaPZayunYRAZi6U8wpzBMCG+N8O7Xv/Y1zQ3sexppt/E1OYROHeX8G59mtZPV S+/1k40tPIJHCzzxau65Pcwa67Q183O4brUKe2DJHlvx6R0iZRj2ownv5w6hxMDer0ePq9by2MU4S PCz3BK/7A==; Received: from 089144199016.atnat0008.highway.a1.net ([89.144.199.16] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fIsyL-0004mQ-8O; Wed, 16 May 2018 09:43:50 +0000 From: Christoph Hellwig To: Andrew Morton , Alexander Viro Cc: Alexey Dobriyan , Greg Kroah-Hartman , Jiri Slaby , Alessandro Zummo , Alexandre Belloni , linux-acpi@vger.kernel.org, drbd-dev@lists.linbit.com, linux-ide@vger.kernel.org, netdev@vger.kernel.org, linux-rtc@vger.kernel.org, megaraidlinux.pdl@broadcom.com, linux-scsi@vger.kernel.org, devel@driverdev.osuosl.org, linux-afs@lists.infradead.org, linux-ext4@vger.kernel.org, jfs-discussion@lists.sourceforge.net, netfilter-devel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: simplify procfs code for seq_file instances V3 Date: Wed, 16 May 2018 11:43:04 +0200 Message-Id: <20180516094346.20506-1-hch@lst.de> X-Mailer: git-send-email 2.17.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We currently have hundreds of proc files that implement plain, read-only seq_file based interfaces. This series consolidates them using new procfs helpers that take the seq_operations or simple show callback directly. A git tree is available at: git://git.infradead.org/users/hch/misc.git proc_create.3 Gitweb: http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/proc_create.3 Changes since V2: - use unsigned int for state_size everywhere - move state_size around in proc_dir_entry to use a struct packing hole - update SIZEOF_PDE_INLINE_NAME - added a new proc_pid_ns helper - improved a few changelogs - added back a nubus comment - minor typo fix - collected various ACKs Changes since V1: - open code proc_create_data to avoid setting not fully initialized entries live - use unsigned int for state_size - dropped the s390/cio/blacklist hunk as it has a write method - dropped the IPMI patch given that IPMI proc support is scheduled for removal.