[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190621092723.GA96768@lkp-kbuild10>
Date: Fri, 21 Jun 2019 17:27:23 +0800
From: kbuild test robot <lkp@...el.com>
To: Shannon Nelson <snelson@...sando.io>
Cc: kbuild-all@...org, snelson@...sando.io, netdev@...r.kernel.org
Subject: [PATCH] ionic: fix simple_open.cocci warnings
From: kbuild test robot <lkp@...el.com>
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 <snelson@...sando.io>
Signed-off-by: kbuild test robot <lkp@...el.com>
---
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,
};
Powered by blists - more mailing lists