[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180419141818.pjys7at4xmz2h6ho@mwanda>
Date: Thu, 19 Apr 2018 17:18:18 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Christoph Hellwig <hch@....de>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
linux-rtc@...r.kernel.org, Alessandro Zummo <a.zummo@...ertech.it>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
linux-scsi@...r.kernel.org, Corey Minyard <minyard@....org>,
linux-ide@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
jfs-discussion@...ts.sourceforge.net,
linux-afs@...ts.infradead.org, linux-acpi@...r.kernel.org,
netdev@...r.kernel.org, netfilter-devel@...r.kernel.org,
Jiri Slaby <jslaby@...e.com>, linux-ext4@...r.kernel.org,
Alexey Dobriyan <adobriyan@...il.com>,
megaraidlinux.pdl@...adcom.com, drbd-dev@...ts.linbit.com
Subject: Re: [PATCH 03/39] proc: introduce proc_create_seq_private
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
Powered by blists - more mailing lists