The most notable change is DEFINE_SHOW_ATTRIBUTE macro split in seq_file.h. Conversion rule is: llseek => proc_lseek unlocked_ioctl => proc_ioctl xxx => proc_xxx delete ".owner = THIS_MODULE" line [akpm@linux-foundation.org: fix drivers/isdn/capi/kcapi_proc.c] [sfr@canb.auug.org.au: fix kernel/sched/psi.c] Link: http://lkml.kernel.org/r/20200122180545.36222f50@canb.auug.org.au Link: http://lkml.kernel.org/r/20191225172546.GB13378@avx2 Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing the changes to include/linux (2 of 100 files). Show all
Unified · Split
| @@ -160,6 +160,19 @@ static const struct file_operations __name ## _fops = { \ · 159 unmodified lines | ||
| 160 | 160 | .release = single_release, \ |
| 161 | 161 | } |
| 162 | 162 | |
| 163 | +#define DEFINE_PROC_SHOW_ATTRIBUTE(__name) \ | |
| 164 | +static int __name ## _open(struct inode *inode, struct file *file) \ | |
| 165 | +{ \ | |
| 166 | + return single_open(file, __name ## _show, inode->i_private); \ | |
| 167 | +} \ | |
| 168 | + \ | |
| 169 | +static const struct proc_ops __name ## _proc_ops = { \ | |
| 170 | + .proc_open = __name ## _open, \ | |
| 171 | + .proc_read = seq_read, \ | |
| 172 | + .proc_lseek = seq_lseek, \ | |
| 173 | + .proc_release = single_release, \ | |
| 174 | +} | |
| 175 | + | |
| 163 | 176 | static inline struct user_namespace *seq_user_ns(struct seq_file *seq) |
| 164 | 177 | { |
| 165 | 178 | #ifdef CONFIG_USER_NS |
| @@ -63,7 +63,7 @@ struct proc_dir_entry * rpc_proc_register(struct net *,struct rpc_stat *); · 62 unmodified lines | ||
| 63 | 63 | void rpc_proc_unregister(struct net *,const char *); |
| 64 | 64 | void rpc_proc_zero(const struct rpc_program *); |
| 65 | 65 | struct proc_dir_entry * svc_proc_register(struct net *, struct svc_stat *, |
| 66 | − const struct file_operations *); | |
| 66 | + const struct proc_ops *); | |
| 67 | 67 | void svc_proc_unregister(struct net *, const char *); |
| 68 | 68 | |
| 69 | 69 | void svc_seq_show(struct seq_file *, |
| @@ -75,7 +75,7 @@ static inline void rpc_proc_unregister(struct net *net, const char *p) {} · 5 unmodified lines | ||
| 75 | 75 | static inline void rpc_proc_zero(const struct rpc_program *p) {} |
| 76 | 76 | |
| 77 | 77 | static inline struct proc_dir_entry *svc_proc_register(struct net *net, struct svc_stat *s, |
| 78 | − const struct file_operations *f) { return NULL; } | |
| 78 | + const struct proc_ops *proc_ops) { return NULL; } | |
| 79 | 79 | static inline void svc_proc_unregister(struct net *net, const char *p) {} |
| 80 | 80 | |
| 81 | 81 | static inline void svc_seq_show(struct seq_file *seq, |