From: Timothy Day Date: Sun, 18 Jun 2023 04:26:48 +0000 (+0000) Subject: LU-8191 mdt: convert functions to static X-Git-Tag: 2.15.57~82 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F45%2F51345%2F2;p=fs%2Flustre-release.git LU-8191 mdt: convert functions to static Static analysis shows that a number of functions could be made static. This patch declares several functions in mdt_coordinator.c static. mdt_coordinator.c:2145:9: warning: Should this function be static? ssize_t loop_period_show(struct kobject *kobj, ^ Further patches will follow to clean up the remaining non-static functions in other subsystems. Test-Parameters: trivial Signed-off-by: Timothy Day Change-Id: I0350b0d5c88c0a8d1f1748d1d429cdf90afb96b7 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51345 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Arshad Hussain Reviewed-by: Oleg Drokin --- diff --git a/lustre/mdt/mdt_coordinator.c b/lustre/mdt/mdt_coordinator.c index 029903e..3149d37 100644 --- a/lustre/mdt/mdt_coordinator.c +++ b/lustre/mdt/mdt_coordinator.c @@ -2142,8 +2142,8 @@ out: } LDEBUGFS_SEQ_FOPS(mdt_hsm_policy); -ssize_t loop_period_show(struct kobject *kobj, struct attribute *attr, - char *buf) +static ssize_t loop_period_show(struct kobject *kobj, struct attribute *attr, + char *buf) { struct coordinator *cdt = container_of(kobj, struct coordinator, cdt_hsm_kobj); @@ -2151,8 +2151,8 @@ ssize_t loop_period_show(struct kobject *kobj, struct attribute *attr, return scnprintf(buf, PAGE_SIZE, "%u\n", cdt->cdt_loop_period); } -ssize_t loop_period_store(struct kobject *kobj, struct attribute *attr, - const char *buffer, size_t count) +static ssize_t loop_period_store(struct kobject *kobj, struct attribute *attr, + const char *buffer, size_t count) { struct coordinator *cdt = container_of(kobj, struct coordinator, cdt_hsm_kobj); @@ -2170,8 +2170,8 @@ ssize_t loop_period_store(struct kobject *kobj, struct attribute *attr, } LUSTRE_RW_ATTR(loop_period); -ssize_t grace_delay_show(struct kobject *kobj, struct attribute *attr, - char *buf) +static ssize_t grace_delay_show(struct kobject *kobj, struct attribute *attr, + char *buf) { struct coordinator *cdt = container_of(kobj, struct coordinator, cdt_hsm_kobj); @@ -2179,8 +2179,8 @@ ssize_t grace_delay_show(struct kobject *kobj, struct attribute *attr, return scnprintf(buf, PAGE_SIZE, "%u\n", cdt->cdt_grace_delay); } -ssize_t grace_delay_store(struct kobject *kobj, struct attribute *attr, - const char *buffer, size_t count) +static ssize_t grace_delay_store(struct kobject *kobj, struct attribute *attr, + const char *buffer, size_t count) { struct coordinator *cdt = container_of(kobj, struct coordinator, cdt_hsm_kobj); @@ -2198,9 +2198,9 @@ ssize_t grace_delay_store(struct kobject *kobj, struct attribute *attr, } LUSTRE_RW_ATTR(grace_delay); -ssize_t active_request_timeout_show(struct kobject *kobj, - struct attribute *attr, - char *buf) +static ssize_t active_request_timeout_show(struct kobject *kobj, + struct attribute *attr, + char *buf) { struct coordinator *cdt = container_of(kobj, struct coordinator, cdt_hsm_kobj); @@ -2208,9 +2208,9 @@ ssize_t active_request_timeout_show(struct kobject *kobj, return scnprintf(buf, PAGE_SIZE, "%d\n", cdt->cdt_active_req_timeout); } -ssize_t active_request_timeout_store(struct kobject *kobj, - struct attribute *attr, - const char *buffer, size_t count) +static ssize_t active_request_timeout_store(struct kobject *kobj, + struct attribute *attr, + const char *buffer, size_t count) { struct coordinator *cdt = container_of(kobj, struct coordinator, cdt_hsm_kobj); @@ -2228,8 +2228,8 @@ ssize_t active_request_timeout_store(struct kobject *kobj, } LUSTRE_RW_ATTR(active_request_timeout); -ssize_t max_requests_show(struct kobject *kobj, struct attribute *attr, - char *buf) +static ssize_t max_requests_show(struct kobject *kobj, struct attribute *attr, + char *buf) { struct coordinator *cdt = container_of(kobj, struct coordinator, cdt_hsm_kobj); @@ -2237,8 +2237,8 @@ ssize_t max_requests_show(struct kobject *kobj, struct attribute *attr, return scnprintf(buf, PAGE_SIZE, "%llu\n", cdt->cdt_max_requests); } -ssize_t max_requests_store(struct kobject *kobj, struct attribute *attr, - const char *buffer, size_t count) +static ssize_t max_requests_store(struct kobject *kobj, struct attribute *attr, + const char *buffer, size_t count) { struct coordinator *cdt = container_of(kobj, struct coordinator, cdt_hsm_kobj); @@ -2256,8 +2256,8 @@ ssize_t max_requests_store(struct kobject *kobj, struct attribute *attr, } LUSTRE_RW_ATTR(max_requests); -ssize_t default_archive_id_show(struct kobject *kobj, struct attribute *attr, - char *buf) +static ssize_t default_archive_id_show(struct kobject *kobj, + struct attribute *attr, char *buf) { struct coordinator *cdt = container_of(kobj, struct coordinator, cdt_hsm_kobj); @@ -2265,8 +2265,9 @@ ssize_t default_archive_id_show(struct kobject *kobj, struct attribute *attr, return scnprintf(buf, PAGE_SIZE, "%u\n", cdt->cdt_default_archive_id); } -ssize_t default_archive_id_store(struct kobject *kobj, struct attribute *attr, - const char *buffer, size_t count) +static ssize_t default_archive_id_store(struct kobject *kobj, + struct attribute *attr, + const char *buffer, size_t count) { struct coordinator *cdt = container_of(kobj, struct coordinator, cdt_hsm_kobj);