Commit ca927221 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] fix ext3 __FUNCTION__ warnings

Patch from Anton Blanchard which replaces

	printk(KERN_FOO __FUNCTION__ ": msg");

with
	printk(KERN_FOO "%s: msg", __FUNCTION__);

in ext3.
parent 124d8831
...@@ -2476,7 +2476,7 @@ ext3_mark_iloc_dirty(handle_t *handle, ...@@ -2476,7 +2476,7 @@ ext3_mark_iloc_dirty(handle_t *handle,
/* ext3_do_update_inode() does journal_dirty_metadata */ /* ext3_do_update_inode() does journal_dirty_metadata */
brelse(iloc->bh); brelse(iloc->bh);
} else { } else {
printk(KERN_EMERG __FUNCTION__ ": called with no handle!\n"); printk(KERN_EMERG "%s: called with no handle!\n", __FUNCTION__);
} }
return err; return err;
} }
...@@ -2564,7 +2564,8 @@ void ext3_dirty_inode(struct inode *inode) ...@@ -2564,7 +2564,8 @@ void ext3_dirty_inode(struct inode *inode)
if (current_handle && if (current_handle &&
current_handle->h_transaction != handle->h_transaction) { current_handle->h_transaction != handle->h_transaction) {
/* This task has a transaction open against a different fs */ /* This task has a transaction open against a different fs */
printk(KERN_EMERG __FUNCTION__": transactions do not match!\n"); printk(KERN_EMERG "%s: transactions do not match!\n",
__FUNCTION__);
} else { } else {
jbd_debug(5, "marking dirty. outer handle=%p\n", jbd_debug(5, "marking dirty. outer handle=%p\n",
current_handle); current_handle);
......
...@@ -892,17 +892,17 @@ static void ext3_orphan_cleanup (struct super_block * sb, ...@@ -892,17 +892,17 @@ static void ext3_orphan_cleanup (struct super_block * sb,
list_add(&EXT3_I(inode)->i_orphan, &EXT3_SB(sb)->s_orphan); list_add(&EXT3_I(inode)->i_orphan, &EXT3_SB(sb)->s_orphan);
if (inode->i_nlink) { if (inode->i_nlink) {
printk(KERN_DEBUG __FUNCTION__ printk(KERN_DEBUG
": truncating inode %ld to %Ld bytes\n", "%s: truncating inode %ld to %Ld bytes\n",
inode->i_ino, inode->i_size); __FUNCTION__, inode->i_ino, inode->i_size);
jbd_debug(2, "truncating inode %ld to %Ld bytes\n", jbd_debug(2, "truncating inode %ld to %Ld bytes\n",
inode->i_ino, inode->i_size); inode->i_ino, inode->i_size);
ext3_truncate(inode); ext3_truncate(inode);
nr_truncates++; nr_truncates++;
} else { } else {
printk(KERN_DEBUG __FUNCTION__ printk(KERN_DEBUG
": deleting unreferenced inode %ld\n", "%s: deleting unreferenced inode %ld\n",
inode->i_ino); __FUNCTION__, inode->i_ino);
jbd_debug(2, "deleting unreferenced inode %ld\n", jbd_debug(2, "deleting unreferenced inode %ld\n",
inode->i_ino); inode->i_ino);
nr_orphans++; nr_orphans++;
......
...@@ -466,9 +466,8 @@ int journal_write_metadata_buffer(transaction_t *transaction, ...@@ -466,9 +466,8 @@ int journal_write_metadata_buffer(transaction_t *transaction,
do { do {
new_bh = alloc_buffer_head(0); new_bh = alloc_buffer_head(0);
if (!new_bh) { if (!new_bh) {
printk (KERN_NOTICE __FUNCTION__ printk (KERN_NOTICE "%s: ENOMEM at alloc_buffer_head, "
": ENOMEM at alloc_buffer_head, " "trying again.\n", __FUNCTION__);
"trying again.\n");
yield(); yield();
} }
} while (!new_bh); } while (!new_bh);
...@@ -593,9 +592,9 @@ void log_wait_commit (journal_t *journal, tid_t tid) ...@@ -593,9 +592,9 @@ void log_wait_commit (journal_t *journal, tid_t tid)
#ifdef CONFIG_JBD_DEBUG #ifdef CONFIG_JBD_DEBUG
lock_journal(journal); lock_journal(journal);
if (!tid_geq(journal->j_commit_request, tid)) { if (!tid_geq(journal->j_commit_request, tid)) {
printk(KERN_EMERG __FUNCTION__ printk(KERN_EMERG
": error: j_commit_request=%d, tid=%d\n", "%s: error: j_commit_request=%d, tid=%d\n",
journal->j_commit_request, tid); __FUNCTION__, journal->j_commit_request, tid);
} }
unlock_journal(journal); unlock_journal(journal);
#endif #endif
...@@ -644,9 +643,9 @@ int journal_bmap(journal_t *journal, unsigned long blocknr, ...@@ -644,9 +643,9 @@ int journal_bmap(journal_t *journal, unsigned long blocknr,
if (ret) if (ret)
*retp = ret; *retp = ret;
else { else {
printk (KERN_ALERT __FUNCTION__ printk(KERN_ALERT "%s: journal block not found "
": journal block not found " "at offset %lu on %s\n",
"at offset %lu on %s\n", __FUNCTION__,
blocknr, blocknr,
bdevname(journal->j_dev)); bdevname(journal->j_dev));
err = -EIO; err = -EIO;
...@@ -792,8 +791,8 @@ journal_t * journal_init_inode (struct inode *inode) ...@@ -792,8 +791,8 @@ journal_t * journal_init_inode (struct inode *inode)
err = journal_bmap(journal, 0, &blocknr); err = journal_bmap(journal, 0, &blocknr);
/* If that failed, give up */ /* If that failed, give up */
if (err) { if (err) {
printk(KERN_ERR __FUNCTION__ ": Cannnot locate journal " printk(KERN_ERR "%s: Cannnot locate journal superblock\n",
"superblock\n"); __FUNCTION__);
kfree(journal); kfree(journal);
return NULL; return NULL;
} }
...@@ -879,8 +878,9 @@ int journal_create (journal_t *journal) ...@@ -879,8 +878,9 @@ int journal_create (journal_t *journal)
/* /*
* We don't know what block to start at! * We don't know what block to start at!
*/ */
printk(KERN_EMERG __FUNCTION__ printk(KERN_EMERG
": creation of journal on external device!\n"); "%s: creation of journal on external device!\n",
__FUNCTION__);
BUG(); BUG();
} }
...@@ -1601,8 +1601,8 @@ static struct journal_head *journal_alloc_journal_head(void) ...@@ -1601,8 +1601,8 @@ static struct journal_head *journal_alloc_journal_head(void)
if (ret == 0) { if (ret == 0) {
jbd_debug(1, "out of memory for journal_head\n"); jbd_debug(1, "out of memory for journal_head\n");
if (time_after(jiffies, last_warning + 5*HZ)) { if (time_after(jiffies, last_warning + 5*HZ)) {
printk(KERN_NOTICE "ENOMEM in " __FUNCTION__ printk(KERN_NOTICE "ENOMEM in %s, retrying.\n",
", retrying.\n"); __FUNCTION__);
last_warning = jiffies; last_warning = jiffies;
} }
while (ret == 0) { while (ret == 0) {
......
...@@ -709,8 +709,9 @@ do_get_write_access(handle_t *handle, struct journal_head *jh, int force_copy) ...@@ -709,8 +709,9 @@ do_get_write_access(handle_t *handle, struct journal_head *jh, int force_copy)
GFP_NOFS); GFP_NOFS);
lock_journal(journal); lock_journal(journal);
if (!frozen_buffer) { if (!frozen_buffer) {
printk(KERN_EMERG __FUNCTION__ printk(KERN_EMERG
"OOM for frozen_buffer\n"); "%s: OOM for frozen_buffer\n",
__FUNCTION__);
JBUFFER_TRACE(jh, "oom!"); JBUFFER_TRACE(jh, "oom!");
error = -ENOMEM; error = -ENOMEM;
spin_lock(&journal_datalist_lock); spin_lock(&journal_datalist_lock);
...@@ -906,8 +907,9 @@ int journal_get_undo_access (handle_t *handle, struct buffer_head *bh) ...@@ -906,8 +907,9 @@ int journal_get_undo_access (handle_t *handle, struct buffer_head *bh)
jh->b_committed_data = jbd_kmalloc(jh2bh(jh)->b_size, jh->b_committed_data = jbd_kmalloc(jh2bh(jh)->b_size,
GFP_NOFS); GFP_NOFS);
if (!jh->b_committed_data) { if (!jh->b_committed_data) {
printk(KERN_EMERG __FUNCTION__ printk(KERN_EMERG
": No memory for committed data!\n"); "%s: No memory for committed data!\n",
__FUNCTION__);
err = -ENOMEM; err = -ENOMEM;
goto out; goto out;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment