From: Ilya Dryomov Date: Wed, 25 Mar 2015 18:15:17 +0000 (+0300) Subject: libceph: simplify our debugfs attr macro X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9571eb4f9617e89b3f979a3856b1296eba277bb1;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git libceph: simplify our debugfs attr macro No need to do single_open()'s job ourselves. Signed-off-by: Ilya Dryomov --- diff --git a/include/linux/ceph/debugfs.h b/include/linux/ceph/debugfs.h index 1df086d7882d..29cf897cc5cd 100644 --- a/include/linux/ceph/debugfs.h +++ b/include/linux/ceph/debugfs.h @@ -7,13 +7,7 @@ #define CEPH_DEFINE_SHOW_FUNC(name) \ static int name##_open(struct inode *inode, struct file *file) \ { \ - struct seq_file *sf; \ - int ret; \ - \ - ret = single_open(file, name, NULL); \ - sf = file->private_data; \ - sf->private = inode->i_private; \ - return ret; \ + return single_open(file, name, inode->i_private); \ } \ \ static const struct file_operations name##_fops = { \