staging: lustre: use __func__ instead of __FUNCTION__
authorChristoph Jaeger <email@christophjaeger.info>
Thu, 27 Mar 2014 23:21:07 +0000 (00:21 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Apr 2014 03:21:07 +0000 (20:21 -0700)
__FUNCTION__ is gcc specific; use __func__ instead.

Signed-off-by: Christoph Jaeger <email@christophjaeger.info>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h
drivers/staging/lustre/lustre/include/linux/obd.h
drivers/staging/lustre/lustre/include/lu_ref.h
drivers/staging/lustre/lustre/include/lustre_dlm.h
drivers/staging/lustre/lustre/obdclass/cl_lock.c
drivers/staging/lustre/lustre/obdclass/genops.c
drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c

index 2bd4885ce06cb669dee19c1403d6941f4b33cc28..b270d84def98a823bbf30a5f9ce86aeb8b5763b5 100644 (file)
@@ -183,7 +183,7 @@ struct libcfs_debug_msg_data {
 do {                                                           \
        (data)->msg_subsys = DEBUG_SUBSYSTEM;                   \
        (data)->msg_file   = __FILE__;                          \
-       (data)->msg_fn     = __FUNCTION__;                      \
+       (data)->msg_fn     = __func__;                          \
        (data)->msg_line   = __LINE__;                          \
        (data)->msg_cdls   = (cdls);                            \
        (data)->msg_mask   = (mask);                            \
@@ -193,7 +193,7 @@ do {                                                                \
        static struct libcfs_debug_msg_data dataname = {        \
               .msg_subsys = DEBUG_SUBSYSTEM,                   \
               .msg_file   = __FILE__,                          \
-              .msg_fn     = __FUNCTION__,                      \
+              .msg_fn     = __func__,                          \
               .msg_line   = __LINE__,                          \
               .msg_cdls   = (cdls)      };                     \
        dataname.msg_mask   = (mask);
index dc36f75eb6353fce182dab039ecdad6155f13ed4..fea7e6cd44c303fe001ba53b702cbde6b4f0b717 100644 (file)
@@ -104,7 +104,7 @@ static inline void __client_obd_list_lock(client_obd_lock_t *lock,
 }
 
 #define client_obd_list_lock(lock) \
-       __client_obd_list_lock(lock, __FUNCTION__, __LINE__)
+       __client_obd_list_lock(lock, __func__, __LINE__)
 
 static inline void client_obd_list_unlock(client_obd_lock_t *lock)
 {
index 50a2a7f786dc5d4fbbcad62da76f63d605e14114..b451a888ca3a54c68d8c4ba60bf837a5435d1745 100644 (file)
  *
  *     // current thread acquired a temporary reference to foo.
  *     foo_get(foo);
- *     lu_ref_add(&foo->reference, __FUNCTION__, current);
+ *     lu_ref_add(&foo->reference, __func__, current);
  *
  *     ...
  *
  *     // temporary reference is released.
- *     lu_ref_del(&foo->reference, __FUNCTION__, current);
+ *     lu_ref_del(&foo->reference, __func__, current);
  *     foo_put(foo);
  * \endcode
  *
index 3e25f001c07d6889188891f3289d45acb31d7074..ed103133165e1c7d01e6b4482817e031e0fa1973 100644 (file)
@@ -1312,11 +1312,11 @@ int ldlm_lock_change_resource(struct ldlm_namespace *, struct ldlm_lock *,
                              const struct ldlm_res_id *);
 
 #define LDLM_RESOURCE_ADDREF(res) do {                           \
-       lu_ref_add_atomic(&(res)->lr_reference, __FUNCTION__, current);  \
+       lu_ref_add_atomic(&(res)->lr_reference, __func__, current);  \
 } while (0)
 
 #define LDLM_RESOURCE_DELREF(res) do {                           \
-       lu_ref_del(&(res)->lr_reference, __FUNCTION__, current);  \
+       lu_ref_del(&(res)->lr_reference, __func__, current);      \
 } while (0)
 
 /* ldlm_request.c */
index d795cef3f16452658eb6408644f1952b0010149b..8eb1785645ba0807ccc4ac94c72e763fcdcbe6ae 100644 (file)
@@ -139,7 +139,7 @@ static void cl_lock_trace0(int level, const struct lu_env *env,
               func, line);
 }
 #define cl_lock_trace(level, env, prefix, lock)                         \
-       cl_lock_trace0(level, env, prefix, lock, __FUNCTION__, __LINE__)
+       cl_lock_trace0(level, env, prefix, lock, __func__, __LINE__)
 
 #define RETIP ((unsigned long)__builtin_return_address(0))
 
index f2bdea33041da230bd5430834b055fc6bc04a4e1..350b6f079d927926dba46e3853865fa3639a992c 100644 (file)
@@ -615,13 +615,13 @@ int class_notify_sptlrpc_conf(const char *fsname, int namelen)
                if (strncmp(obd->obd_name, fsname, namelen))
                        continue;
 
-               class_incref(obd, __FUNCTION__, obd);
+               class_incref(obd, __func__, obd);
                read_unlock(&obd_dev_lock);
                rc2 = obd_set_info_async(NULL, obd->obd_self_export,
                                         sizeof(KEY_SPTLRPC_CONF),
                                         KEY_SPTLRPC_CONF, 0, NULL, NULL);
                rc = rc ? rc : rc2;
-               class_decref(obd, __FUNCTION__, obd);
+               class_decref(obd, __func__, obd);
                read_lock(&obd_dev_lock);
        }
        read_unlock(&obd_dev_lock);
index ba20776ebfa142ec36ee358ba67287d782ecdf57..e4e94cc1713d2508bb7bc87587832d783f9d9508 100644 (file)
@@ -244,7 +244,7 @@ static int obd_proc_health_seq_show(struct seq_file *m, void *v)
                if (obd->obd_stopping)
                        continue;
 
-               class_incref(obd, __FUNCTION__, current);
+               class_incref(obd, __func__, current);
                read_unlock(&obd_dev_lock);
 
                if (obd_health_check(NULL, obd)) {
@@ -252,7 +252,7 @@ static int obd_proc_health_seq_show(struct seq_file *m, void *v)
                                      obd->obd_name);
                        rc++;
                }
-               class_decref(obd, __FUNCTION__, current);
+               class_decref(obd, __func__, current);
                read_lock(&obd_dev_lock);
        }
        read_unlock(&obd_dev_lock);
index 58f1c8bf25b0b41a207dccb86186a0e7169c9dda..7a422ff759bfbd0a55263aba5ae58d57dc76f38f 100644 (file)
@@ -1190,7 +1190,7 @@ int lprocfs_wr_evict_client(struct file *file, const char *buffer,
         * the proc entries under the being destroyed export{}, so I have
         * to drop the lock at first here.
         * - jay, jxiong@clusterfs.com */
-       class_incref(obd, __FUNCTION__, current);
+       class_incref(obd, __func__, current);
 
        if (strncmp(tmpbuf, "nid:", 4) == 0)
                obd_export_evict_by_nid(obd, tmpbuf + 4);
@@ -1199,7 +1199,7 @@ int lprocfs_wr_evict_client(struct file *file, const char *buffer,
        else
                obd_export_evict_by_uuid(obd, tmpbuf);
 
-       class_decref(obd, __FUNCTION__, current);
+       class_decref(obd, __func__, current);
 
 out:
        OBD_FREE(kbuf, BUFLEN);