Thread (63 messages) 63 messages, 6 authors, 2019-06-27
STALE2555d

[PATCH] ionic: fix simple_open.cocci warnings

From: kbuild test robot <hidden>
Date: 2019-06-21 09:27:54

From: kbuild test robot <redacted>

drivers/net/ethernet/pensando/ionic/ionic_debugfs.c:12:11-20: WARNING opportunity for simple_open, see also structure on line 56

 Remove an open coded simple_open() function
 and replace file operations references to the function
 with simple_open() instead.

Generated by: scripts/coccinelle/api/simple_open.cocci

Fixes: fb4f52d18a75 ("ionic: Add hardware init and device commands")
CC: Shannon Nelson <redacted>
Signed-off-by: kbuild test robot <redacted>
---

url:    https://github.com/0day-ci/linux/commits/Shannon-Nelson/ionic-Add-basic-framework-for-IONIC-Network-device-driver/20190621-110046

 ionic_debugfs.c |    8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
--- a/drivers/net/ethernet/pensando/ionic/ionic_debugfs.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_debugfs.c
@@ -9,12 +9,6 @@
 
 #ifdef CONFIG_DEBUG_FS
 
-static int blob_open(struct inode *inode, struct file *filp)
-{
-	filp->private_data = inode->i_private;
-	return 0;
-}
-
 static ssize_t blob_read(struct file *filp, char __user *buffer,
 			 size_t count, loff_t *ppos)
 {
@@ -53,7 +47,7 @@ static ssize_t blob_write(struct file *f
 
 static const struct file_operations blob_fops = {
 	.owner = THIS_MODULE,
-	.open = blob_open,
+	.open = simple_open,
 	.read = blob_read,
 	.write = blob_write,
 };
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help