summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkbuild test robot <lkp@intel.com>2019-04-13 11:22:51 +0800
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2019-07-23 14:57:13 -0400
commit38c3edcf04a985f16f515388b8e3e5afd2155ecf (patch)
tree5464c910a5bca06581a985bb9c2529f967b6b428
parentf711db210b782335acc40e46a423b5533216c28c (diff)
pci/switchtec: fix stream_open.cocci warnings
[ Upstream commit 9462c69e29307adc95c289f50839d5d683973891 ] drivers/pci/switch/switchtec.c:395:1-17: ERROR: switchtec_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix. Generated by: scripts/coccinelle/api/stream_open.cocci Cc: Kirill Smelkov <kirr@nexedi.com> Cc: Julia Lawall <julia.lawall@lip6.fr> Fixes: 8a29a3bae2a2 ("pci/switchtec: Don't use completion's wait queue") Cc: stable-rt@vger.kernel.org # where it applies to Link: https://lkml.kernel.org/r/alpine.DEB.2.21.1904131849350.2536@hadrien Signed-off-by: kbuild test robot <lkp@intel.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-rw-r--r--drivers/pci/switch/switchtec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/switch/switchtec.c b/drivers/pci/switch/switchtec.c
index 77d4fb86d05b..ea70bc0b06e9 100644
--- a/drivers/pci/switch/switchtec.c
+++ b/drivers/pci/switch/switchtec.c
@@ -360,7 +360,7 @@ static int switchtec_dev_open(struct inode *inode, struct file *filp)
return PTR_ERR(stuser);
filp->private_data = stuser;
- nonseekable_open(inode, filp);
+ stream_open(inode, filp);
dev_dbg(&stdev->dev, "%s: %p\n", __func__, stuser);