Skip to contentSkip to conversation

ocfs2: replace remaining __PRETTY_FUNCTION__ occurrences

PATCH In review Harvey Harrison 2 participants 2 messages Apr 4, 2008 OCFS2

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ocfs2: replace remaining __PRETTY_FUNCTION__ occurrences

The kernel is written in C, not C++, use __func__

---
 fs/ocfs2/cluster/masklog.h |    2 +-
 fs/ocfs2/dlmglue.c         |    2 +-
 fs/ocfs2/super.h           |    4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)
fs/ocfs2/cluster/masklog.h +1 -1
index 597e064..8bdb182 100644
@@ -193,7 +193,7 @@ extern struct mlog_bits mlog_and_bits, mlog_not_bits;
  */
 #define __mlog_printk(level, fmt, args...)				\
 	printk(level "(%u,%lu):%s:%d " fmt, task_pid_nr(current),	\
-	       __mlog_cpu_guess, __PRETTY_FUNCTION__, __LINE__ ,	\
+	       __mlog_cpu_guess, __func__, __LINE__ ,	\
 	       ##args)
 
 #define mlog(mask, fmt, args...) do {					\
fs/ocfs2/dlmglue.c +1 -1
index 1f1873b..5a3f1f4 100644
@@ -105,7 +105,7 @@ static void ocfs2_dentry_post_unlock(struct ocfs2_super *osb,
 				     struct ocfs2_lock_res *lockres);
 
 
-#define mlog_meta_lvb(__level, __lockres) ocfs2_dump_meta_lvb_info(__level, __PRETTY_FUNCTION__, __LINE__, __lockres)
+#define mlog_meta_lvb(__level, __lockres) ocfs2_dump_meta_lvb_info(__level, __func__, __LINE__, __lockres)
 
 /* This aids in debugging situations where a bad LVB might be involved. */
 static void ocfs2_dump_meta_lvb_info(u64 level,
fs/ocfs2/super.h +2 -2
index 783f527..15e2d98 100644
@@ -36,13 +36,13 @@ void __ocfs2_error(struct super_block *sb,
 		   const char *fmt, ...)
 	__attribute__ ((format (printf, 3, 4)));
 
-#define ocfs2_error(sb, fmt, args...) __ocfs2_error(sb, __PRETTY_FUNCTION__, fmt, ##args)
+#define ocfs2_error(sb, fmt, args...) __ocfs2_error(sb, __func__, fmt, ##args)
 
 void __ocfs2_abort(struct super_block *sb,
 		   const char *function,
 		   const char *fmt, ...)
 	__attribute__ ((format (printf, 3, 4)));
 
-#define ocfs2_abort(sb, fmt, args...) __ocfs2_abort(sb, __PRETTY_FUNCTION__, fmt, ##args)
+#define ocfs2_abort(sb, fmt, args...) __ocfs2_abort(sb, __func__, fmt, ##args)
 
 #endif /* OCFS2_SUPER_H */
Signature · 1 line
1.5.5.rc1.135.g8527
Acked-by on v1 1/2
#1 lore raw
Quoted 1 line · Harvey Harrison

The kernel is written in C, not C++, use __func__

__PRETTY_FUNCTION__ is GNU C, but __func__ is still better.

Quoted 64 lines
---
 fs/ocfs2/cluster/masklog.h |    2 +-
 fs/ocfs2/dlmglue.c         |    2 +-
 fs/ocfs2/super.h           |    4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)
fs/ocfs2/cluster/masklog.h +1 -1
index 597e064..8bdb182 100644
@@ -193,7 +193,7 @@ extern struct mlog_bits mlog_and_bits, mlog_not_bits;
  */
 #define __mlog_printk(level, fmt, args...)				\
 	printk(level "(%u,%lu):%s:%d " fmt, task_pid_nr(current),	\
-	       __mlog_cpu_guess, __PRETTY_FUNCTION__, __LINE__ ,	\
+	       __mlog_cpu_guess, __func__, __LINE__ ,	\
 	       ##args)
 
 #define mlog(mask, fmt, args...) do {					\
fs/ocfs2/dlmglue.c +1 -1
index 1f1873b..5a3f1f4 100644
@@ -105,7 +105,7 @@ static void ocfs2_dentry_post_unlock(struct ocfs2_super *osb,
 				     struct ocfs2_lock_res *lockres);
 
 
-#define mlog_meta_lvb(__level, __lockres) ocfs2_dump_meta_lvb_info(__level, __PRETTY_FUNCTION__, __LINE__, __lockres)
+#define mlog_meta_lvb(__level, __lockres) ocfs2_dump_meta_lvb_info(__level, __func__, __LINE__, __lockres)
 
 /* This aids in debugging situations where a bad LVB might be involved. */
 static void ocfs2_dump_meta_lvb_info(u64 level,
fs/ocfs2/super.h +2 -2
index 783f527..15e2d98 100644
@@ -36,13 +36,13 @@ void __ocfs2_error(struct super_block *sb,
 		   const char *fmt, ...)
 	__attribute__ ((format (printf, 3, 4)));
 
-#define ocfs2_error(sb, fmt, args...) __ocfs2_error(sb, __PRETTY_FUNCTION__, fmt, ##args)
+#define ocfs2_error(sb, fmt, args...) __ocfs2_error(sb, __func__, fmt, ##args)
 
 void __ocfs2_abort(struct super_block *sb,
 		   const char *function,
 		   const char *fmt, ...)
 	__attribute__ ((format (printf, 3, 4)));
 
-#define ocfs2_abort(sb, fmt, args...) __ocfs2_abort(sb, __PRETTY_FUNCTION__, fmt, ##args)
+#define ocfs2_abort(sb, fmt, args...) __ocfs2_abort(sb, __func__, fmt, ##args)
 
 #endif /* OCFS2_SUPER_H */
Signature · 8 lines
1.5.5.rc1.135.g8527


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Signature · 9 lines
 "I'm living so far beyond my income that we may almost be said
 to be living apart."
         - e e cummings

Joel Becker
Principal Software Developer
Oracle
E-mail: [email protected]
Phone: (650) 506-8127