Thread (25 messages) 25 messages, 3 authors, 2019-06-08

RE: [PATCH V4 04/12] misc: xilinx_sdfec: Add open, close and ioctl

From: Dragan Cvetic <hidden>
Date: 2019-06-08 19:41:03
Also in: linux-devicetree, lkml

-----Original Message-----
From: Greg KH [mailto:gregkh@linuxfoundation.org]
Sent: Friday 7 June 2019 16:58
To: Dragan Cvetic <redacted>
Cc: arnd@arndb.de; Michal Simek <redacted>; linux-arm-kernel@lists.infradead.org; robh+dt@kernel.org;
mark.rutland@arm.com; devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; Derek Kiernan [off-list ref]
Subject: Re: [PATCH V4 04/12] misc: xilinx_sdfec: Add open, close and ioctl

On Fri, Jun 07, 2019 at 10:58:34AM +0000, Dragan Cvetic wrote:
quoted
quoted
On Sat, May 25, 2019 at 12:37:17PM +0100, Dragan Cvetic wrote:
quoted
+static int xsdfec_dev_open(struct inode *iptr, struct file *fptr)
+{
+	return 0;
+}
+
+static int xsdfec_dev_release(struct inode *iptr, struct file *fptr)
+{
+	return 0;
+}
empty open/close functions are never needed, just drop them.
open() is needed to allocate file descriptor eg.
fd = open(dev_name, O_RDWR);
But you do nothing in those open/release callbacks.  Remove them and see
that the code works just fine :)
Accepted.
I will squash this commit with the first next which needs open/close, ioctal.
thanks,

greg k-h
Thanks
Dragan


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help