lkml.org 
[lkml]   [2009]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject2.6.30-rc2: format warning in fs/reiserfs/procfs.o
Date
  CC [M]  fs/reiserfs/procfs.o
/home/bor/src/linux-git/fs/reiserfs/procfs.c: In function 'show_journal':
/home/bor/src/linux-git/fs/reiserfs/procfs.c:393: warning: format '%u'
expects type 'unsigned int', but argument 22 has type 'long unsigned int'
LD [M] fs/reiserfs/reiserfs.o


Argument 22 is journal->j_last_flush_trans_id. As far as I can tell in all
contexts where it is used it is assigned unsigned int (and journal->trans_id
itself is unsigned int as well). So is this patch appropriate? It compiles
cleanly, but I am a bit scared to test it on my sole root reiserfs :)

--

Subject: [PATCH] reiserfs: Make j_last_flush_trans_id unsigned int
From: Andrey Borzenkov <arvidjaar@mail.ru>

j_last_flush_trans_id is always assigned unsigned int value; so make it
unsigned int as well. It also removes this warning:

CC [M] fs/reiserfs/procfs.o
/home/bor/src/linux-git/fs/reiserfs/procfs.c: In function 'show_journal':
/home/bor/src/linux-git/fs/reiserfs/procfs.c:393: warning: format '%u'
expects type 'unsigned int', but argument 22 has type 'long unsigned int'

Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru>

---

include/linux/reiserfs_fs_sb.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/include/linux/reiserfs_fs_sb.h b/include/linux/reiserfs_fs_sb.h
index 5621d87..1d1594a 100644
--- a/include/linux/reiserfs_fs_sb.h
+++ b/include/linux/reiserfs_fs_sb.h
@@ -193,7 +193,7 @@ struct reiserfs_journal {
atomic_t j_wcount; /* count of writers for current commit */
unsigned long j_bcount; /* batch count. allows turning X transactions
into 1 */
unsigned long j_first_unflushed_offset; /* first unflushed transactions
offset */
- unsigned long j_last_flush_trans_id; /* last fully flushed journal
timestamp */
+ unsigned int j_last_flush_trans_id; /* last fully flushed journal
timestamp */
struct buffer_head *j_header_bh;

time_t j_trans_start_time; /* time this transaction started */
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2009-04-18 06:45    [W:0.029 / U:0.944 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site