From 2e33ffb6d55ede834864861a4a47122e2aa2b6e2 Mon Sep 17 00:00:00 2001 From: Shraddha Barke Date: Fri, 9 Oct 2015 22:40:07 +0530 Subject: [PATCH] Staging: lustre: obdclass: lprocfs_status: Declare local functions as static Declare lustre_attr_show and lustre_attr_store as static since they are used only in this particular file. Also remove them from corresponding header files. Signed-off-by: Shraddha Barke Signed-off-by: Greg Kroah-Hartman --- drivers/staging/lustre/lustre/include/lprocfs_status.h | 5 ----- .../staging/lustre/lustre/obdclass/lprocfs_status.c | 10 ++++------ 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lprocfs_status.h b/drivers/staging/lustre/lustre/include/lprocfs_status.h index 22f3777c72b8..6d127a0c1829 100644 --- a/drivers/staging/lustre/lustre/include/lprocfs_status.h +++ b/drivers/staging/lustre/lustre/include/lprocfs_status.h @@ -713,11 +713,6 @@ static struct lustre_attr lustre_attr_##name = __ATTR(name, mode, show, store) #define LUSTRE_RO_ATTR(name) LUSTRE_ATTR(name, 0444, name##_show, NULL) #define LUSTRE_RW_ATTR(name) LUSTRE_ATTR(name, 0644, name##_show, name##_store) -ssize_t lustre_attr_show(struct kobject *kobj, struct attribute *attr, - char *buf); -ssize_t lustre_attr_store(struct kobject *kobj, struct attribute *attr, - const char *buf, size_t len); - extern const struct sysfs_ops lustre_sysfs_ops; /* all quota proc functions */ diff --git a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c index da4afe08ca62..c8a5ff497143 100644 --- a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c +++ b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c @@ -1467,23 +1467,21 @@ void lprocfs_oh_clear(struct obd_histogram *oh) } EXPORT_SYMBOL(lprocfs_oh_clear); -ssize_t lustre_attr_show(struct kobject *kobj, - struct attribute *attr, char *buf) +static ssize_t lustre_attr_show(struct kobject *kobj, + struct attribute *attr, char *buf) { struct lustre_attr *a = container_of(attr, struct lustre_attr, attr); return a->show ? a->show(kobj, attr, buf) : 0; } -EXPORT_SYMBOL_GPL(lustre_attr_show); -ssize_t lustre_attr_store(struct kobject *kobj, struct attribute *attr, - const char *buf, size_t len) +static ssize_t lustre_attr_store(struct kobject *kobj, struct attribute *attr, + const char *buf, size_t len) { struct lustre_attr *a = container_of(attr, struct lustre_attr, attr); return a->store ? a->store(kobj, attr, buf, len) : len; } -EXPORT_SYMBOL_GPL(lustre_attr_store); const struct sysfs_ops lustre_sysfs_ops = { .show = lustre_attr_show, -- 2.20.1