linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Compile warning fix when enable EXT_DEBUG
@ 2009-08-12 15:32 Mingming
  2009-08-12 15:47 ` Eric Sandeen
  0 siblings, 1 reply; 5+ messages in thread
From: Mingming @ 2009-08-12 15:32 UTC (permalink / raw)
  To: linux-ext4; +Cc: Theodore Tso, Eric Sandeen

When enable EXT_DEBUG I got the following compile warning on PPC64

  CC [M]  fs/ext4/inode.o
  CC [M]  fs/ext4/extents.o
fs/ext4/extents.c: In function ‘ext4_ext_rm_leaf’:
fs/ext4/extents.c:2097: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 2 has type ‘ext4_lblk_t’
fs/ext4/extents.c: In function ‘ext4_ext_get_blocks’:
fs/ext4/extents.c:2789: warning: format ‘%u’ expects type ‘unsigned int’, but argument 4 has type ‘long unsigned int’
fs/ext4/extents.c:2852: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 3 has type ‘ext4_lblk_t’
fs/ext4/extents.c:2953: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 4 has type ‘unsigned int’
  CC [M]  fs/ext4/migrate.o

The patch fixed compile warning.

Signed-off-by: Mingming Cao <cmm@us.ibm.com>

Index: linux-2.6.31-rc4/fs/ext4/extents.c
===================================================================
--- linux-2.6.31-rc4.orig/fs/ext4/extents.c
+++ linux-2.6.31-rc4/fs/ext4/extents.c
@@ -2105,7 +2105,8 @@ ext4_ext_rm_leaf(handle_t *handle, struc
 		else
 			uninitialized = 0;
 
-		ext_debug("remove ext %lu:%u\n", ex_ee_block, ex_ee_len);
+		ext_debug("remove ext %u:[%d]%d\n", ex_ee_block,
+			 ext4_ext_is_uninitialized(ex), ex_ee_len);
 		path[depth].p_ext = ex;
 
 		a = ex_ee_block > start ? ex_ee_block : start;
@@ -2798,7 +2799,7 @@ int ext4_ext_get_blocks(handle_t *handle
 	struct ext4_allocation_request ar;
 
 	__clear_bit(BH_New, &bh_result->b_state);
-	ext_debug("blocks %u/%u requested for inode %u\n",
+	ext_debug("blocks %u/%u requested for inode %lu\n",
 			iblock, max_blocks, inode->i_ino);
 
 	/* check in cache */
@@ -2861,7 +2862,7 @@ int ext4_ext_get_blocks(handle_t *handle
 			newblock = iblock - ee_block + ee_start;
 			/* number of remaining blocks in the extent */
 			allocated = ee_len - (iblock - ee_block);
-			ext_debug("%u fit into %lu:%d -> %llu\n", iblock,
+			ext_debug("%u fit into %u:%d -> %llu\n", iblock,
 					ee_block, ee_len, newblock);
 
 			/* Do not put uninitialized extent in the cache */
@@ -2962,7 +2963,7 @@ int ext4_ext_get_blocks(handle_t *handle
 	newblock = ext4_mb_new_blocks(handle, &ar, &err);
 	if (!newblock)
 		goto out2;
-	ext_debug("allocate new block: goal %llu, found %llu/%lu\n",
+	ext_debug("allocate new block: goal %llu, found %llu/%u\n",
 		  ar.goal, newblock, allocated);
 
 	/* try to insert new extent into found leaf and return */


--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Compile warning fix when enable EXT_DEBUG
  2009-08-12 15:32 [PATCH] Compile warning fix when enable EXT_DEBUG Mingming
@ 2009-08-12 15:47 ` Eric Sandeen
  2009-08-12 16:02   ` Mingming
  2009-08-12 16:10   ` Mingming
  0 siblings, 2 replies; 5+ messages in thread
From: Eric Sandeen @ 2009-08-12 15:47 UTC (permalink / raw)
  To: Mingming; +Cc: linux-ext4, Theodore Tso

Mingming wrote:
> When enable EXT_DEBUG I got the following compile warning on PPC64
> 
>   CC [M]  fs/ext4/inode.o
>   CC [M]  fs/ext4/extents.o
> fs/ext4/extents.c: In function ‘ext4_ext_rm_leaf’:
> fs/ext4/extents.c:2097: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 2 has type ‘ext4_lblk_t’
> fs/ext4/extents.c: In function ‘ext4_ext_get_blocks’:
> fs/ext4/extents.c:2789: warning: format ‘%u’ expects type ‘unsigned int’, but argument 4 has type ‘long unsigned int’
> fs/ext4/extents.c:2852: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 3 has type ‘ext4_lblk_t’
> fs/ext4/extents.c:2953: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 4 has type ‘unsigned int’
>   CC [M]  fs/ext4/migrate.o
> 
> The patch fixed compile warning.

and a little bit more ... :)

> Signed-off-by: Mingming Cao <cmm@us.ibm.com>
> 
> Index: linux-2.6.31-rc4/fs/ext4/extents.c
> ===================================================================
> --- linux-2.6.31-rc4.orig/fs/ext4/extents.c
> +++ linux-2.6.31-rc4/fs/ext4/extents.c
> @@ -2105,7 +2105,8 @@ ext4_ext_rm_leaf(handle_t *handle, struc
>  		else
>  			uninitialized = 0;
>  
> -		ext_debug("remove ext %lu:%u\n", ex_ee_block, ex_ee_len);
> +		ext_debug("remove ext %u:[%d]%d\n", ex_ee_block,
> +			 ext4_ext_is_uninitialized(ex), ex_ee_len);
>  		path[depth].p_ext = ex;

Shouldn't part of this be in your next patch, [PATCH]Show unwritten
extent flag in ext4_ext_show_leaf() ?

Thanks,
-Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Compile warning fix when enable EXT_DEBUG
  2009-08-12 15:47 ` Eric Sandeen
@ 2009-08-12 16:02   ` Mingming
  2009-08-12 16:10   ` Mingming
  1 sibling, 0 replies; 5+ messages in thread
From: Mingming @ 2009-08-12 16:02 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: linux-ext4, Theodore Tso

On Wed, 2009-08-12 at 10:47 -0500, Eric Sandeen wrote:
> Mingming wrote:
> > When enable EXT_DEBUG I got the following compile warning on PPC64
> > 
> >   CC [M]  fs/ext4/inode.o
> >   CC [M]  fs/ext4/extents.o
> > fs/ext4/extents.c: In function ‘ext4_ext_rm_leaf’:
> > fs/ext4/extents.c:2097: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 2 has type ‘ext4_lblk_t’
> > fs/ext4/extents.c: In function ‘ext4_ext_get_blocks’:
> > fs/ext4/extents.c:2789: warning: format ‘%u’ expects type ‘unsigned int’, but argument 4 has type ‘long unsigned int’
> > fs/ext4/extents.c:2852: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 3 has type ‘ext4_lblk_t’
> > fs/ext4/extents.c:2953: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 4 has type ‘unsigned int’
> >   CC [M]  fs/ext4/migrate.o
> > 
> > The patch fixed compile warning.
> 
> and a little bit more ... :)
> 
> > Signed-off-by: Mingming Cao <cmm@us.ibm.com>
> > 
> > Index: linux-2.6.31-rc4/fs/ext4/extents.c
> > ===================================================================
> > --- linux-2.6.31-rc4.orig/fs/ext4/extents.c
> > +++ linux-2.6.31-rc4/fs/ext4/extents.c
> > @@ -2105,7 +2105,8 @@ ext4_ext_rm_leaf(handle_t *handle, struc
> >  		else
> >  			uninitialized = 0;
> >  
> > -		ext_debug("remove ext %lu:%u\n", ex_ee_block, ex_ee_len);
> > +		ext_debug("remove ext %u:[%d]%d\n", ex_ee_block,
> > +			 ext4_ext_is_uninitialized(ex), ex_ee_len);
> >  		path[depth].p_ext = ex;
> 
> Shouldn't part of this be in your next patch, [PATCH]Show unwritten
> extent flag in ext4_ext_show_leaf() ?
> 

ah, that's right, I will resend the two patches :)

Mingming
> Thanks,
> -Eric


--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Compile warning fix when enable EXT_DEBUG
  2009-08-12 15:47 ` Eric Sandeen
  2009-08-12 16:02   ` Mingming
@ 2009-08-12 16:10   ` Mingming
  2009-08-17 12:36     ` Theodore Tso
  1 sibling, 1 reply; 5+ messages in thread
From: Mingming @ 2009-08-12 16:10 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: linux-ext4, Theodore Tso

> > 
> > Index: linux-2.6.31-rc4/fs/ext4/extents.c
> > ===================================================================
> > --- linux-2.6.31-rc4.orig/fs/ext4/extents.c
> > +++ linux-2.6.31-rc4/fs/ext4/extents.c
> > @@ -2105,7 +2105,8 @@ ext4_ext_rm_leaf(handle_t *handle, struc
> >  		else
> >  			uninitialized = 0;
> >  
> > -		ext_debug("remove ext %lu:%u\n", ex_ee_block, ex_ee_len);
> > +		ext_debug("remove ext %u:[%d]%d\n", ex_ee_block,
> > +			 ext4_ext_is_uninitialized(ex), ex_ee_len);
> >  		path[depth].p_ext = ex;
> 
> Shouldn't part of this be in your next patch, [PATCH]Show unwritten
> extent flag in ext4_ext_show_leaf() ?
> 
> Thanks,
> -Eric

Updated patch.

When enable EXT_DEBUG I got the following compile warning on PPC64

  CC [M]  fs/ext4/inode.o
  CC [M]  fs/ext4/extents.o
fs/ext4/extents.c: In function ‘ext4_ext_rm_leaf’:
fs/ext4/extents.c:2097: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 2 has type ‘ext4_lblk_t’
fs/ext4/extents.c: In function ‘ext4_ext_get_blocks’:
fs/ext4/extents.c:2789: warning: format ‘%u’ expects type ‘unsigned int’, but argument 4 has type ‘long unsigned int’
fs/ext4/extents.c:2852: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 3 has type ‘ext4_lblk_t’
fs/ext4/extents.c:2953: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 4 has type ‘unsigned int’
  CC [M]  fs/ext4/migrate.o

The patch fixed compile warning.

Signed-off-by: Mingming Cao <cmm@us.ibm.com>


Index: linux-2.6.31-rc4/fs/ext4/extents.c
===================================================================
--- linux-2.6.31-rc4.orig/fs/ext4/extents.c
+++ linux-2.6.31-rc4/fs/ext4/extents.c
@@ -2094,7 +2094,7 @@ ext4_ext_rm_leaf(handle_t *handle, struc
 		else
 			uninitialized = 0;
 
-		ext_debug("remove ext %lu:%u\n", ex_ee_block, ex_ee_len);
+		ext_debug("remove ext %u:%d\n", ex_ee_block, ex_ee_len);
 		path[depth].p_ext = ex;
 
 		a = ex_ee_block > start ? ex_ee_block : start;
@@ -2786,7 +2786,7 @@ int ext4_ext_get_blocks(handle_t *handle
 	struct ext4_allocation_request ar;
 
 	__clear_bit(BH_New, &bh_result->b_state);
-	ext_debug("blocks %u/%u requested for inode %u\n",
+	ext_debug("blocks %u/%u requested for inode %lu\n",
 			iblock, max_blocks, inode->i_ino);
 
 	/* check in cache */
@@ -2849,7 +2849,7 @@ int ext4_ext_get_blocks(handle_t *handle
 			newblock = iblock - ee_block + ee_start;
 			/* number of remaining blocks in the extent */
 			allocated = ee_len - (iblock - ee_block);
-			ext_debug("%u fit into %lu:%d -> %llu\n", iblock,
+			ext_debug("%u fit into %u:%d -> %llu\n", iblock,
 					ee_block, ee_len, newblock);
 
 			/* Do not put uninitialized extent in the cache */
@@ -2950,7 +2950,7 @@ int ext4_ext_get_blocks(handle_t *handle
 	newblock = ext4_mb_new_blocks(handle, &ar, &err);
 	if (!newblock)
 		goto out2;
-	ext_debug("allocate new block: goal %llu, found %llu/%lu\n",
+	ext_debug("allocate new block: goal %llu, found %llu/%u\n",
 		  ar.goal, newblock, allocated);
 
 	/* try to insert new extent into found leaf and return */


--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Compile warning fix when enable EXT_DEBUG
  2009-08-12 16:10   ` Mingming
@ 2009-08-17 12:36     ` Theodore Tso
  0 siblings, 0 replies; 5+ messages in thread
From: Theodore Tso @ 2009-08-17 12:36 UTC (permalink / raw)
  To: Mingming; +Cc: Eric Sandeen, linux-ext4

Thanks, added to the ext4 patch queue.

						- Ted

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-08-17 12:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-12 15:32 [PATCH] Compile warning fix when enable EXT_DEBUG Mingming
2009-08-12 15:47 ` Eric Sandeen
2009-08-12 16:02   ` Mingming
2009-08-12 16:10   ` Mingming
2009-08-17 12:36     ` Theodore Tso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).