From: Hans Reiser <reiser@namesys.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Linus Torvalds <torvalds@transmeta.com>
Subject: [PATCH] [BK] correct __FUNCTION__ usage as string literal in reiserfs.
Date: Tue, 06 Aug 2002 16:46:38 +0400 [thread overview]
Message-ID: <3D4FC52E.7020006@namesys.com> (raw)
Hello!
You can pull this changeset from bk://thebsh.namesys.com/bk/reiser3-linux-2.5
It fixes usage of __FUNCTION__ preprocessor defines as string literals in
reiserfs code, since such usage is deprecated now.
Diffstat:
fs/reiserfs/bitmap.c | 4 ++--
fs/reiserfs/namei.c | 6 +++---
include/linux/reiserfs_fs.h | 6 +++---
3 files changed, 8 insertions(+), 8 deletions(-)
Plain text patch:
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#
ChangeSet 1.469 -> 1.470
#
fs/reiserfs/namei.c 1.40 -> 1.41
#
fs/reiserfs/bitmap.c
1.20 -> 1.21
#
include/linux/reiserfs_fs.h
1.39 -> 1.40
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/08/06 green@angband.namesys.com 1.470
# reiserfs_fs.h, namei.c, bitmap.c:
# fix __FUNCTION__ usage, since its use in string literals is deprecated now.
# --------------------------------------------
#
diff -Nru a/fs/reiserfs/bitmap.c b/fs/reiserfs/bitmap.c
--- a/fs/reiserfs/bitmap.c Tue Aug 6 10:58:15 2002
+++ b/fs/reiserfs/bitmap.c Tue Aug 6 10:58:15 2002
@@ -689,7 +689,7 @@
struct reiserfs_inode_info *ei = REISERFS_I(inode);
#ifdef CONFIG_REISERFS_CHECK
if (ei->i_prealloc_count < 0)
- reiserfs_warning("zam-4001:" __FUNCTION__ ": inode has negative prealloc
blocks count.\n");
+ reiserfs_warning("zam-4001:%s inode has negative prealloc blocks
count.\n", __FUNCTION__);
#endif
if (ei->i_prealloc_count > 0) {
__discard_prealloc(th, ei);
@@ -705,7 +705,7 @@
ei = list_entry(plist->next, struct reiserfs_inode_info, i_prealloc_list);
#ifdef CONFIG_REISERFS_CHECK
if (!ei->i_prealloc_count) {
-
reiserfs_warning("zam-4001:" __FUNCTION__ ": inode is in prealloc list but has no
preallocated blocks.\n");
+
reiserfs_warning("zam-4001:%s: inode is in prealloc list but has no preallocated
blocks.\n", __FUNCTION__);
}
#endif
__discard_prealloc(th, ei);
diff -Nru a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c
--- a/fs/reiserfs/namei.c Tue Aug 6 10:58:15 2002
+++ b/fs/reiserfs/namei.c Tue Aug 6 10:58:15 2002
@@ -296,7 +296,7 @@
while (1) {
retval = search_by_entry_key (dir->i_sb, &key_to_search, path_to_entry, de);
if (retval == IO_ERROR) {
-
reiserfs_warning ("zam-7001: io error in " __FUNCTION__ "\n");
+
reiserfs_warning ("zam-7001: io error in %s\n", __FUNCTION__);
return IO_ERROR;
}
@@ -468,8 +468,8 @@
}
if (retval != NAME_FOUND) {
-
reiserfs_warning ("zam-7002:" __FUNCTION__ ": \"reiserfs_find_entry\" has
returned"
- " unexpected value (%d)\n", retval);
+
reiserfs_warning ("zam-7002:%s: \"reiserfs_find_entry\" has returned"
+ " unexpected value (%d)\n", __FUNCTION__, retval);
}
return -EEXIST;
diff -Nru a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
--- a/include/linux/reiserfs_fs.h Tue Aug 6 10:58:15 2002
+++ b/include/linux/reiserfs_fs.h Tue Aug 6 10:58:15 2002
@@ -79,9 +79,9 @@
/** always check a condition and panic if it's false. */
#define RASSERT( cond, format, args... ) \
if( !( cond ) ) \
- reiserfs_panic( 0, "reiserfs[%i]: assertion " #cond " failed at " \
-
__FILE__ ":%i:" __FUNCTION__ ": " format "\n", \
-
in_interrupt() ? -1 : current -> pid, __LINE__ , ##args )
+ reiserfs_panic( 0, "reiserfs[%i]: assertion " #cond " failed at " \
+
__FILE__ ":%i:%s: " format "\n", \
+
in_interrupt() ? -1 : current -> pid, __LINE__ , __FUNCTION__ , ##args )
#if defined( CONFIG_REISERFS_CHECK )
#define RFALSE( cond, format, args... ) RASSERT( !( cond ), format, ##args )
Bye,
Oleg
reply other threads:[~2002-08-06 12:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3D4FC52E.7020006@namesys.com \
--to=reiser@namesys.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.