From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Subject: Re: [PATCH 03/39] proc: introduce proc_create_seq_private Date: Thu, 19 Apr 2018 17:18:18 +0300 Message-ID: <20180419141818.pjys7at4xmz2h6ho@mwanda> References: <20180419124140.9309-1-hch@lst.de> <20180419124140.9309-4-hch@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: linux-rtc@vger.kernel.org, Alessandro Zummo , Alexandre Belloni , devel@driverdev.osuosl.org, Corey Minyard , linux-scsi@vger.kernel.org, linux-acpi@vger.kernel.org, Greg Kroah-Hartman , Jiri Slaby , megaraidlinux.pdl@broadcom.com, linux-kernel@vger.kernel.org, Alexey Dobriyan , linux-ide@vger.kernel.org, netfilter-devel@vger.kernel.org, Alexander Viro , netdev@vger.kernel.org, Andrew Morton , linux-ext4@vger.kernel.org, linux-afs@lists.infradead.org, jfs-discussion@lists.sourceforge.net, drbd-dev@lists.linbit.com To: Christoph Hellwig Return-path: Content-Disposition: inline In-Reply-To: <20180419124140.9309-4-hch@lst.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" List-Id: netdev.vger.kernel.org On Thu, Apr 19, 2018 at 02:41:04PM +0200, Christoph Hellwig wrote: > diff --git a/drivers/s390/cio/blacklist.c b/drivers/s390/cio/blacklist.c > index 2a3f874a21d5..ad35cddcf6af 100644 > --- a/drivers/s390/cio/blacklist.c > +++ b/drivers/s390/cio/blacklist.c > @@ -391,28 +391,15 @@ static const struct seq_operations cio_ignore_proc_seq_ops = { > .show = cio_ignore_proc_seq_show, > }; > > -static int > -cio_ignore_proc_open(struct inode *inode, struct file *file) > -{ > - return seq_open_private(file, &cio_ignore_proc_seq_ops, > - sizeof(struct ccwdev_iter)); > -} > - > -static const struct file_operations cio_ignore_proc_fops = { > - .open = cio_ignore_proc_open, > - .read = seq_read, > - .llseek = seq_lseek, > - .release = seq_release_private, > - .write = cio_ignore_write, ^^^^^^^^^^^^^^^^ The cio_ignore_write() function isn't used any more so compilers will complain. > -}; > - > static int > cio_ignore_proc_init (void) > { > struct proc_dir_entry *entry; > > - entry = proc_create("cio_ignore", S_IFREG | S_IRUGO | S_IWUSR, NULL, > - &cio_ignore_proc_fops); > + entry = proc_create_seq_private("cio_ignore", > + S_IFREG | S_IRUGO | S_IWUSR, NULL, > + &cio_ignore_proc_seq_ops, sizeof(struct ccwdev_iter), > + NULL); > if (!entry) > return -ENOENT; > return 0; regards, dan carpenter