diff options
author | Fengguang Wu <fengguang.wu@intel.com> | 2013-10-11 11:30:26 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-10-14 13:39:58 -0400 |
commit | 50d60c6322f14e32bc11635732c54db1447fd3f5 (patch) | |
tree | e957cb85ee3fd9c05c4e0648011a26a67771a635 /drivers | |
parent | 7e43f3b066a26ac1b9c998f28d33e9f70d845033 (diff) |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/wcn36xx/debug.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/net/wireless/ath/wcn36xx/debug.c b/drivers/net/wireless/ath/wcn36xx/debug.c index 682bcd650f70..5b84f7ae0b1e 100644 --- a/drivers/net/wireless/ath/wcn36xx/debug.c +++ b/drivers/net/wireless/ath/wcn36xx/debug.c | |||
@@ -24,13 +24,6 @@ | |||
24 | 24 | ||
25 | #ifdef CONFIG_WCN36XX_DEBUGFS | 25 | #ifdef CONFIG_WCN36XX_DEBUGFS |
26 | 26 | ||
27 | static int wcn36xx_debugfs_open(struct inode *inode, struct file *file) | ||
28 | { | ||
29 | file->private_data = inode->i_private; | ||
30 | |||
31 | return 0; | ||
32 | } | ||
33 | |||
34 | static ssize_t read_file_bool_bmps(struct file *file, char __user *user_buf, | 27 | static ssize_t read_file_bool_bmps(struct file *file, char __user *user_buf, |
35 | size_t count, loff_t *ppos) | 28 | size_t count, loff_t *ppos) |
36 | { | 29 | { |
@@ -103,7 +96,7 @@ static ssize_t write_file_bool_bmps(struct file *file, | |||
103 | } | 96 | } |
104 | 97 | ||
105 | static const struct file_operations fops_wcn36xx_bmps = { | 98 | static const struct file_operations fops_wcn36xx_bmps = { |
106 | .open = wcn36xx_debugfs_open, | 99 | .open = simple_open, |
107 | .read = read_file_bool_bmps, | 100 | .read = read_file_bool_bmps, |
108 | .write = write_file_bool_bmps, | 101 | .write = write_file_bool_bmps, |
109 | }; | 102 | }; |
@@ -145,7 +138,7 @@ static ssize_t write_file_dump(struct file *file, | |||
145 | } | 138 | } |
146 | 139 | ||
147 | static const struct file_operations fops_wcn36xx_dump = { | 140 | static const struct file_operations fops_wcn36xx_dump = { |
148 | .open = wcn36xx_debugfs_open, | 141 | .open = simple_open, |
149 | .write = write_file_dump, | 142 | .write = write_file_dump, |
150 | }; | 143 | }; |
151 | 144 | ||