staging: lustre: coding style fixes found by checkpatch.pl
PATCH 1/1 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 Simo Koskinen <[email protected]>
--- drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 2 +- drivers/staging/lustre/lnet/lnet/lib-move.c | 4 ++-- drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 4 ++-- drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c | 2 +- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 2 +- drivers/staging/lustre/lustre/lov/lov_lock.c | 4 ++-- drivers/staging/lustre/lustre/obdclass/lu_object.c | 9 +++++---- 7 files changed, 14 insertions(+), 13 deletions(-)
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c +1 -1
@@ -2936,7 +2936,7 @@ static int kiblnd_startup(struct lnet_ni *ni) net_failed:kiblnd_shutdown (ni); -CDEBUG (D_NET ,"kiblnd_startup failed\n" ); +CDEBUG (D_NET ,"%s failed\n" , __func__);return -ENETDOWN ; }
drivers/staging/lustre/lnet/lnet/lib-move.c +2 -2
@@ -2034,7 +2034,7 @@ LNetPut(lnet_nid_t self, struct lnet_handle_md mdh, enum lnet_ack_req ack,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 );
@@ -2239,7 +2239,7 @@ LNetGet(lnet_nid_t self, struct lnet_handle_md mdh,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 );
drivers/staging/lustre/lustre/ldlm/ldlm_flock.c +2 -2
@@ -90,8 +90,8 @@ ldlm_flocks_overlap(struct ldlm_lock *lock, struct ldlm_lock *new)static inline void ldlm_flock_destroy (struct ldlm_lock *lock,enum ldlm_mode mode,__u64 flags) { -LDLM_DEBUG (lock,"ldlm_flock_destroy(mode: %d, flags: 0x%llx)" , - mode, flags); +LDLM_DEBUG (lock,"%s(mode: %d, flags: 0x%llx)" , + __func__, mode, flags);/* Safe to not lock here, since it should be empty anyway */ LASSERT (hlist_unhashed (&lock->l_exp_flock_hash));
drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c +1 -1
@@ -1138,7 +1138,7 @@ int ldlm_init(void)void ldlm_exit (void ) {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);/* ldlm_lock_put() use RCU to call ldlm_lock_free, so need call * synchronize_rcu() to wait a grace period elapsed, so that
drivers/staging/lustre/lustre/ldlm/ldlm_request.c +1 -1
@@ -1663,7 +1663,7 @@ int ldlm_cli_cancel_list(struct list_head *cancels, int count,if (res <0 ) {CDEBUG_LIMIT (res == -ESHUTDOWN ?D_DLMTRACE :D_ERROR , -"ldlm_cli_cancel_list: %d\n" , res); +"%s: %d\n" , __func__, res); res = count; }
drivers/staging/lustre/lustre/lov/lov_lock.c +2 -2
@@ -264,8 +264,8 @@ static void lov_lock_cancel(const struct lu_env *env,cl_lock_cancel (subenv->lse_env, sublock); }else {CL_LOCK_DEBUG (D_ERROR , env, slice->cls_lock, -"lov_lock_cancel fails with %ld.\n" , -PTR_ERR (subenv)); +"%s fails with %ld.\n" , + __func__,PTR_ERR (subenv)); } } }
drivers/staging/lustre/lustre/obdclass/lu_object.c +5 -4
@@ -1409,9 +1409,9 @@ void lu_context_key_degister(struct lu_context_key *key)*/ while (atomic_read (&key->lct_used) >1 ) {spin_unlock (&lu_keys_guard); -CDEBUG (D_INFO ,"lu_context_key_degister: \"%s\" %p, %d\n" , - key->lct_owner ? key->lct_owner->name :"" , key, -atomic_read (&key->lct_used)); +CDEBUG (D_INFO ,"%s: \"%s\" %p, %d\n" , + __func__, key->lct_owner ? key->lct_owner->name :"" , + key,atomic_read (&key->lct_used));schedule ();spin_lock (&lu_keys_guard); }
@@ -1548,7 +1548,8 @@ void lu_context_key_quiesce(struct lu_context_key *key)*/ while (atomic_read (&lu_key_initing_cnt) >0 ) {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,atomic_read (&key->lct_used),atomic_read (&lu_key_initing_cnt));
Signature · 1 line
2.7.4