mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Glauber de Oliveira Costa <gocosta@br.ibm.com>
To: ext2-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, adilger@clusterfs.com,
	akpm@osdl.org, viro@parcelfarce.linux.theplanet.co.uk
Subject: [PATCH] Cleanup while EXT3FS_DEBUG on
Date: Fri, 16 Sep 2005 13:49:00 -0300	[thread overview]
Message-ID: <20050916164900.GU23782@br.ibm.com> (raw)

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

Hi people,

When trying to gather some debugging information from ext3 runtime, (by
defining EXT3FS_DEBUG in ext3_fs.h), the ext3 code failed to compile with one
error, besides raising some warnings. 

This simple cleanup patch fix this. The code now compiles with no
warnings at all 

-- 
=====================================
Glauber de Oliveira Costa
IBM Linux Technology Center - Brazil
gocosta@br.ibm.com
=====================================

[-- Attachment #2: patch_debug_cleanup --]
[-- Type: text/plain, Size: 1764 bytes --]

diff -u linux-2.6.13-orig/fs/ext3/balloc.c linux/fs/ext3/balloc.c
--- linux-2.6.13-orig/fs/ext3/balloc.c	2005-09-16 11:30:45.000000000 -0300
+++ linux/fs/ext3/balloc.c	2005-09-16 10:57:27.000000000 -0300
@@ -1410,7 +1410,7 @@
 	unsigned long desc_count;
 	struct ext3_group_desc *gdp;
 	int i;
-	unsigned long ngroups;
+	unsigned long ngroups = EXT3_SB(sb)->s_groups_count; 
 #ifdef EXT3FS_DEBUG
 	struct ext3_super_block *es;
 	unsigned long bitmap_count, x;
@@ -1421,7 +1421,8 @@
 	desc_count = 0;
 	bitmap_count = 0;
 	gdp = NULL;
-	for (i = 0; i < EXT3_SB(sb)->s_groups_count; i++) {
+
+	for (i = 0; i < ngroups; i++) {
 		gdp = ext3_get_group_desc(sb, i, NULL);
 		if (!gdp)
 			continue;
@@ -1443,7 +1444,6 @@
 	return bitmap_count;
 #else
 	desc_count = 0;
-	ngroups = EXT3_SB(sb)->s_groups_count;
 	smp_rmb();
 	for (i = 0; i < ngroups; i++) {
 		gdp = ext3_get_group_desc(sb, i, NULL);
diff -u linux-2.6.13-orig/fs/ext3/resize.c linux/fs/ext3/resize.c
--- linux-2.6.13-orig/fs/ext3/resize.c	2005-09-16 11:30:45.000000000 -0300
+++ linux/fs/ext3/resize.c	2005-09-16 13:03:30.000000000 -0300
@@ -242,7 +242,7 @@
 	     i < sbi->s_itb_per_group; i++, bit++, block++) {
 		struct buffer_head *it;
 
-		ext3_debug("clear inode block %#04x (+%ld)\n", block, bit);
+		ext3_debug("clear inode block %#04lx (+%d)\n", block, bit);
 		if (IS_ERR(it = bclean(handle, sb, block))) {
 			err = PTR_ERR(it);
 			goto exit_bh;
@@ -643,8 +643,8 @@
 			break;
 
 		bh = sb_getblk(sb, group * bpg + blk_off);
-		ext3_debug(sb, __FUNCTION__, "update metadata backup %#04lx\n",
-			   bh->b_blocknr);
+		ext3_debug("update metadata backup %#04lx\n",
+			  (unsigned long)bh->b_blocknr);
 		if ((err = ext3_journal_get_write_access(handle, bh)))
 			break;
 		lock_buffer(bh);

                 reply	other threads:[~2005-09-16 16:37 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=20050916164900.GU23782@br.ibm.com \
    --to=gocosta@br.ibm.com \
    --cc=adilger@clusterfs.com \
    --cc=akpm@osdl.org \
    --cc=ext2-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@parcelfarce.linux.theplanet.co.uk \
    /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®