| // SPDX-License-Identifier: GPL-2.0 |
| /// Remove an open coded simple_open() function |
| /// and replace file operations references to the function |
| /// with simple_open() instead. |
| // Options: --no-includes --include-headers |
| @ open depends on patch @ |
| identifier open_f != simple_open; |
| -int open_f(struct inode *i, struct file *f) |
| -f->private_data = i->i_private; |
| -f->private_data = i->i_private; |
| @ has_open depends on open @ |
| struct file_operations fops = { |
| @ openr depends on report @ |
| identifier open_f != simple_open; |
| int open_f@p(struct inode *i, struct file *f) |
| f->private_data = i->i_private; |
| f->private_data = i->i_private; |
| @ has_openr depends on openr @ |
| struct file_operations fops = { |
| coccilib.report.print_report(pf[0],"WARNING opportunity for simple_open, see also structure on line %s"%(ps[0].line)) |