Commit 0e0594ed authored by Simo Koskinen's avatar Simo Koskinen Committed by Greg Kroah-Hartman

staging: lustre: coding style fixes found by checkpatch.pl

The patch removes "WARNING: Prefer using '"%s...", __func__'
to using 'xxxxxxxx', this function's name, in a string" warnings
reported by checkpatch.pl script.
Signed-off-by: default avatarSimo Koskinen <koskisoft@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent db3edb13
...@@ -2936,7 +2936,7 @@ static int kiblnd_startup(struct lnet_ni *ni) ...@@ -2936,7 +2936,7 @@ static int kiblnd_startup(struct lnet_ni *ni)
net_failed: net_failed:
kiblnd_shutdown(ni); kiblnd_shutdown(ni);
CDEBUG(D_NET, "kiblnd_startup failed\n"); CDEBUG(D_NET, "%s failed\n", __func__);
return -ENETDOWN; return -ENETDOWN;
} }
......
...@@ -2034,7 +2034,7 @@ LNetPut(lnet_nid_t self, struct lnet_handle_md mdh, enum lnet_ack_req ack, ...@@ -2034,7 +2034,7 @@ LNetPut(lnet_nid_t self, struct lnet_handle_md mdh, enum lnet_ack_req ack,
return -ENOENT; return -ENOENT;
} }
CDEBUG(D_NET, "LNetPut -> %s\n", libcfs_id2str(target)); CDEBUG(D_NET, "%s -> %s\n", __func__, libcfs_id2str(target));
lnet_msg_attach_md(msg, md, 0, 0); lnet_msg_attach_md(msg, md, 0, 0);
...@@ -2239,7 +2239,7 @@ LNetGet(lnet_nid_t self, struct lnet_handle_md mdh, ...@@ -2239,7 +2239,7 @@ LNetGet(lnet_nid_t self, struct lnet_handle_md mdh,
return -ENOENT; return -ENOENT;
} }
CDEBUG(D_NET, "LNetGet -> %s\n", libcfs_id2str(target)); CDEBUG(D_NET, "%s -> %s\n", __func__, libcfs_id2str(target));
lnet_msg_attach_md(msg, md, 0, 0); lnet_msg_attach_md(msg, md, 0, 0);
......
...@@ -90,8 +90,8 @@ ldlm_flocks_overlap(struct ldlm_lock *lock, struct ldlm_lock *new) ...@@ -90,8 +90,8 @@ ldlm_flocks_overlap(struct ldlm_lock *lock, struct ldlm_lock *new)
static inline void static inline void
ldlm_flock_destroy(struct ldlm_lock *lock, enum ldlm_mode mode, __u64 flags) ldlm_flock_destroy(struct ldlm_lock *lock, enum ldlm_mode mode, __u64 flags)
{ {
LDLM_DEBUG(lock, "ldlm_flock_destroy(mode: %d, flags: 0x%llx)", LDLM_DEBUG(lock, "%s(mode: %d, flags: 0x%llx)",
mode, flags); __func__, mode, flags);
/* Safe to not lock here, since it should be empty anyway */ /* Safe to not lock here, since it should be empty anyway */
LASSERT(hlist_unhashed(&lock->l_exp_flock_hash)); LASSERT(hlist_unhashed(&lock->l_exp_flock_hash));
......
...@@ -1138,7 +1138,7 @@ int ldlm_init(void) ...@@ -1138,7 +1138,7 @@ int ldlm_init(void)
void ldlm_exit(void) void ldlm_exit(void)
{ {
if (ldlm_refcount) if (ldlm_refcount)
CERROR("ldlm_refcount is %d in ldlm_exit!\n", ldlm_refcount); CERROR("ldlm_refcount is %d in %s!\n", ldlm_refcount, __func__);
kmem_cache_destroy(ldlm_resource_slab); kmem_cache_destroy(ldlm_resource_slab);
/* ldlm_lock_put() use RCU to call ldlm_lock_free, so need call /* ldlm_lock_put() use RCU to call ldlm_lock_free, so need call
* synchronize_rcu() to wait a grace period elapsed, so that * synchronize_rcu() to wait a grace period elapsed, so that
......
...@@ -1663,7 +1663,7 @@ int ldlm_cli_cancel_list(struct list_head *cancels, int count, ...@@ -1663,7 +1663,7 @@ int ldlm_cli_cancel_list(struct list_head *cancels, int count,
if (res < 0) { if (res < 0) {
CDEBUG_LIMIT(res == -ESHUTDOWN ? D_DLMTRACE : D_ERROR, CDEBUG_LIMIT(res == -ESHUTDOWN ? D_DLMTRACE : D_ERROR,
"ldlm_cli_cancel_list: %d\n", res); "%s: %d\n", __func__, res);
res = count; res = count;
} }
......
...@@ -264,8 +264,8 @@ static void lov_lock_cancel(const struct lu_env *env, ...@@ -264,8 +264,8 @@ static void lov_lock_cancel(const struct lu_env *env,
cl_lock_cancel(subenv->lse_env, sublock); cl_lock_cancel(subenv->lse_env, sublock);
} else { } else {
CL_LOCK_DEBUG(D_ERROR, env, slice->cls_lock, CL_LOCK_DEBUG(D_ERROR, env, slice->cls_lock,
"lov_lock_cancel fails with %ld.\n", "%s fails with %ld.\n",
PTR_ERR(subenv)); __func__, PTR_ERR(subenv));
} }
} }
} }
......
...@@ -1409,9 +1409,9 @@ void lu_context_key_degister(struct lu_context_key *key) ...@@ -1409,9 +1409,9 @@ void lu_context_key_degister(struct lu_context_key *key)
*/ */
while (atomic_read(&key->lct_used) > 1) { while (atomic_read(&key->lct_used) > 1) {
spin_unlock(&lu_keys_guard); spin_unlock(&lu_keys_guard);
CDEBUG(D_INFO, "lu_context_key_degister: \"%s\" %p, %d\n", CDEBUG(D_INFO, "%s: \"%s\" %p, %d\n",
key->lct_owner ? key->lct_owner->name : "", key, __func__, key->lct_owner ? key->lct_owner->name : "",
atomic_read(&key->lct_used)); key, atomic_read(&key->lct_used));
schedule(); schedule();
spin_lock(&lu_keys_guard); spin_lock(&lu_keys_guard);
} }
...@@ -1548,7 +1548,8 @@ void lu_context_key_quiesce(struct lu_context_key *key) ...@@ -1548,7 +1548,8 @@ void lu_context_key_quiesce(struct lu_context_key *key)
*/ */
while (atomic_read(&lu_key_initing_cnt) > 0) { while (atomic_read(&lu_key_initing_cnt) > 0) {
spin_unlock(&lu_keys_guard); spin_unlock(&lu_keys_guard);
CDEBUG(D_INFO, "lu_context_key_quiesce: \"%s\" %p, %d (%d)\n", CDEBUG(D_INFO, "%s: \"%s\" %p, %d (%d)\n",
__func__,
key->lct_owner ? key->lct_owner->name : "", key->lct_owner ? key->lct_owner->name : "",
key, atomic_read(&key->lct_used), key, atomic_read(&key->lct_used),
atomic_read(&lu_key_initing_cnt)); atomic_read(&lu_key_initing_cnt));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment