From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f195.google.com (mail-wr0-f195.google.com [209.85.128.195]) by mail09.linbit.com (LINBIT Mail Daemon) with ESMTP id 368B91057589 for ; Fri, 20 Apr 2018 00:39:04 +0200 (CEST) Received: by mail-wr0-f195.google.com with SMTP id h3-v6so18031738wrh.5 for ; Thu, 19 Apr 2018 15:39:04 -0700 (PDT) Received: from soda.linbit ([86.59.100.100]) by smtp.gmail.com with ESMTPSA id c124sm102434wmd.36.2018.04.19.15.39.02 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 15:39:03 -0700 (PDT) Resent-Message-ID: <20180419223902.GI3821@soda.linbit> Received: from mail-wr0-f170.google.com (mail-wr0-f170.google.com [209.85.128.170]) by mail09.linbit.com (LINBIT Mail Daemon) with ESMTP id ACBA31057335 for ; Thu, 19 Apr 2018 20:51:24 +0200 (CEST) Received: by mail-wr0-f170.google.com with SMTP id w3-v6so16698292wrg.2 for ; Thu, 19 Apr 2018 11:51:24 -0700 (PDT) Date: Thu, 19 Apr 2018 21:44:04 +0300 From: Alexey Dobriyan To: Christoph Hellwig Message-ID: <20180419184404.GB2066@avx2> References: <20180419124140.9309-1-hch@lst.de> <20180419124140.9309-15-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180419124140.9309-15-hch@lst.de> Cc: linux-rtc@vger.kernel.org, Alessandro Zummo , Alexandre Belloni , devel@driverdev.osuosl.org, linux-scsi@vger.kernel.org, Corey Minyard , linux-ide@vger.kernel.org, Greg Kroah-Hartman , jfs-discussion@lists.sourceforge.net, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, netdev@vger.kernel.org, netfilter-devel@vger.kernel.org, Alexander Viro , Jiri Slaby , Andrew Morton , linux-ext4@vger.kernel.org, linux-afs@lists.infradead.org, megaraidlinux.pdl@broadcom.com, drbd-dev@lists.linbit.com Subject: Re: [Drbd-dev] [PATCH 14/39] proc: introduce proc_create_net_single List-Id: "*Coordination* of development, patches, contributions -- *Questions* \(even to developers\) go to drbd-user, please." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Thu, Apr 19, 2018 at 02:41:15PM +0200, Christoph Hellwig wrote: > Variant of proc_create_data that directly take a seq_file show > +struct proc_dir_entry *proc_create_net_single(const char *name, umode_t mode, > + struct proc_dir_entry *parent, > + int (*show)(struct seq_file *, void *), void *data) > +{ > + struct proc_dir_entry *p; > + > + p = proc_create_data(name, mode, parent, &proc_net_single_fops, data); > + if (p) > + p->single_show = show; > + return p; > +} Ditto, should be oopsable.