1 /// Remove an open coded simple_open() function
2 /// and replace file operations references to the function
3 /// with simple_open() instead.
7 // Options: --no-includes --include-headers
12 @ open depends on patch @
13 identifier open_f != simple_open;
16 -int open_f(struct inode *i, struct file *f)
20 -f->private_data = i->i_private;
22 -f->private_data = i->i_private;
27 @ has_open depends on open @
29 identifier open.open_f;
31 struct file_operations fops = {
38 @ openr depends on report @
39 identifier open_f != simple_open;
43 int open_f@p(struct inode *i, struct file *f)
47 f->private_data = i->i_private;
49 f->private_data = i->i_private;
54 @ has_openr depends on openr @
56 identifier openr.open_f;
59 struct file_operations fops = {
70 coccilib.report.print_report(pf[0],"WARNING opportunity for simple_open, see also structure on line %s"%(ps[0].line))