mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrey Borzenkov <arvidjaar@mail.ru>
To: reiserfs-devel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: 2.6.30-rc2: format warning in fs/reiserfs/procfs.o
Date: Sat, 18 Apr 2009 08:43:08 +0400	[thread overview]
Message-ID: <200904180843.11714.arvidjaar@mail.ru> (raw)

[-- Attachment #1: Type: text/plain, Size: 2007 bytes --]

  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 */


[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

                 reply	other threads:[~2009-04-18  4: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=200904180843.11714.arvidjaar@mail.ru \
    --to=arvidjaar@mail.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=reiserfs-devel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®