mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-29 14:05:19 +08:00
wcn36xx: fix coccinelle warnings
drivers/net/wireless/ath/wcn36xx/debug.c:27:11-31: WARNING opportunity for simple_open, see also structure on line 106 /c/kernel-tests/src/i386/drivers/net/wireless/ath/wcn36xx/debug.c:27:11-31: WARNING opportunity for simple_open, see also structure on line 148 This removes an open coded simple_open() function and replaces file operations references to the function with simple_open() instead. Generated by: coccinelle/api/simple_open.cocci CC: Eugene Krasnikov <k.eugene.e@gmail.com> CC: John W. Linville <linville@tuxdriver.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
7e43f3b066
commit
50d60c6322
@ -24,13 +24,6 @@
|
||||
|
||||
#ifdef CONFIG_WCN36XX_DEBUGFS
|
||||
|
||||
static int wcn36xx_debugfs_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
file->private_data = inode->i_private;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static ssize_t read_file_bool_bmps(struct file *file, char __user *user_buf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
@ -103,7 +96,7 @@ static ssize_t write_file_bool_bmps(struct file *file,
|
||||
}
|
||||
|
||||
static const struct file_operations fops_wcn36xx_bmps = {
|
||||
.open = wcn36xx_debugfs_open,
|
||||
.open = simple_open,
|
||||
.read = read_file_bool_bmps,
|
||||
.write = write_file_bool_bmps,
|
||||
};
|
||||
@ -145,7 +138,7 @@ static ssize_t write_file_dump(struct file *file,
|
||||
}
|
||||
|
||||
static const struct file_operations fops_wcn36xx_dump = {
|
||||
.open = wcn36xx_debugfs_open,
|
||||
.open = simple_open,
|
||||
.write = write_file_dump,
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user