[OPW,kernel,6/7] Staging: lustre: Replace __FUNCTION__ with __func__
diff mbox

Message ID 8fed99e3fea33d68944d95cf1f123c97529c0fe9.1382737168.git.rashika.kheria@gmail.com
State Superseded
Headers show

Commit Message

Rashika Oct. 25, 2013, 9:46 p.m. UTC
This patch fixes the following checkpatch.pl warning in lustre/ldlm/ldlm_request.c-
WARNING: __func__ should be used instead of gcc specific __FUNCTION__

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
---
 drivers/staging/lustre/lustre/ldlm/ldlm_request.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Waskiewicz Jr, Peter P Oct. 25, 2013, 11:48 p.m. UTC | #1
On Sat, 2013-10-26 at 03:16 +0530, Rashika Kheria wrote:
> This patch fixes the following checkpatch.pl warning in lustre/ldlm/ldlm_request.c-
> WARNING: __func__ should be used instead of gcc specific __FUNCTION__

Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>

> 
> Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
> ---
>  drivers/staging/lustre/lustre/ldlm/ldlm_request.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c
> index 21cb523..d4ae757 100644
> --- a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c
> +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c
> @@ -1652,7 +1652,7 @@ static int ldlm_prepare_lru_list(struct ldlm_namespace *ns, struct list_head *ca
>  
>  		LDLM_LOCK_GET(lock);
>  		spin_unlock(&ns->ns_lock);
> -		lu_ref_add(&lock->l_reference, __FUNCTION__, current);
> +		lu_ref_add(&lock->l_reference, __func__, current);
>  
>  		/* Pass the lock through the policy filter and see if it
>  		 * should stay in LRU.
> @@ -1670,7 +1670,7 @@ static int ldlm_prepare_lru_list(struct ldlm_namespace *ns, struct list_head *ca
>  		result = pf(ns, lock, unused, added, count);
>  		if (result == LDLM_POLICY_KEEP_LOCK) {
>  			lu_ref_del(&lock->l_reference,
> -				   __FUNCTION__, current);
> +				   __func__, current);
>  			LDLM_LOCK_RELEASE(lock);
>  			spin_lock(&ns->ns_lock);
>  			break;
> @@ -1693,7 +1693,7 @@ static int ldlm_prepare_lru_list(struct ldlm_namespace *ns, struct list_head *ca
>  			 * by itself, or the lock is no longer unused. */
>  			unlock_res_and_lock(lock);
>  			lu_ref_del(&lock->l_reference,
> -				   __FUNCTION__, current);
> +				   __func__, current);
>  			LDLM_LOCK_RELEASE(lock);
>  			spin_lock(&ns->ns_lock);
>  			continue;
> @@ -1724,7 +1724,7 @@ static int ldlm_prepare_lru_list(struct ldlm_namespace *ns, struct list_head *ca
>  		LASSERT(list_empty(&lock->l_bl_ast));
>  		list_add(&lock->l_bl_ast, cancels);
>  		unlock_res_and_lock(lock);
> -		lu_ref_del(&lock->l_reference, __FUNCTION__, current);
> +		lu_ref_del(&lock->l_reference, __func__, current);
>  		spin_lock(&ns->ns_lock);
>  		added++;
>  		unused--;
> -- 
> 1.7.9.5
>

Patch
diff mbox

diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c
index 21cb523..d4ae757 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c
@@ -1652,7 +1652,7 @@  static int ldlm_prepare_lru_list(struct ldlm_namespace *ns, struct list_head *ca
 
 		LDLM_LOCK_GET(lock);
 		spin_unlock(&ns->ns_lock);
-		lu_ref_add(&lock->l_reference, __FUNCTION__, current);
+		lu_ref_add(&lock->l_reference, __func__, current);
 
 		/* Pass the lock through the policy filter and see if it
 		 * should stay in LRU.
@@ -1670,7 +1670,7 @@  static int ldlm_prepare_lru_list(struct ldlm_namespace *ns, struct list_head *ca
 		result = pf(ns, lock, unused, added, count);
 		if (result == LDLM_POLICY_KEEP_LOCK) {
 			lu_ref_del(&lock->l_reference,
-				   __FUNCTION__, current);
+				   __func__, current);
 			LDLM_LOCK_RELEASE(lock);
 			spin_lock(&ns->ns_lock);
 			break;
@@ -1693,7 +1693,7 @@  static int ldlm_prepare_lru_list(struct ldlm_namespace *ns, struct list_head *ca
 			 * by itself, or the lock is no longer unused. */
 			unlock_res_and_lock(lock);
 			lu_ref_del(&lock->l_reference,
-				   __FUNCTION__, current);
+				   __func__, current);
 			LDLM_LOCK_RELEASE(lock);
 			spin_lock(&ns->ns_lock);
 			continue;
@@ -1724,7 +1724,7 @@  static int ldlm_prepare_lru_list(struct ldlm_namespace *ns, struct list_head *ca
 		LASSERT(list_empty(&lock->l_bl_ast));
 		list_add(&lock->l_bl_ast, cancels);
 		unlock_res_and_lock(lock);
-		lu_ref_del(&lock->l_reference, __FUNCTION__, current);
+		lu_ref_del(&lock->l_reference, __func__, current);
 		spin_lock(&ns->ns_lock);
 		added++;
 		unused--;