diff mbox

[2/5] ext4: Fix type declaration of ext4_validate_block_bitmap

Message ID 20130719235546.24017.98557.stgit@blackbox.djwong.org
State Accepted, archived
Headers show

Commit Message

Darrick Wong July 19, 2013, 11:55 p.m. UTC
The block_group parameter to ext4_validate_block_bitmap is both used as a
ext4_group_t inside the function and the same type is passed in by all callers.
We might as well use the typedef consistently instead of open-coding the
'unsigned int'.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 fs/ext4/balloc.c |    2 +-
 fs/ext4/ext4.h   |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)



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

Comments

Zheng Liu July 24, 2013, 7:12 a.m. UTC | #1
On Fri, Jul 19, 2013 at 04:55:46PM -0700, Darrick J. Wong wrote:
> The block_group parameter to ext4_validate_block_bitmap is both used as a
> ext4_group_t inside the function and the same type is passed in by all callers.
> We might as well use the typedef consistently instead of open-coding the
> 'unsigned int'.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
>  fs/ext4/balloc.c |    2 +-
>  fs/ext4/ext4.h   |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> 
> diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c
> index b430afe..735e701 100644
> --- a/fs/ext4/balloc.c
> +++ b/fs/ext4/balloc.c
> @@ -352,7 +352,7 @@ static ext4_fsblk_t ext4_valid_block_bitmap(struct super_block *sb,
                                          ^^^
It seems that this function also needs to be fixed.

                                                - Zheng

>  
>  void ext4_validate_block_bitmap(struct super_block *sb,
>  			       struct ext4_group_desc *desc,
> -			       unsigned int block_group,
> +			       ext4_group_t block_group,
>  			       struct buffer_head *bh)
>  {
>  	ext4_fsblk_t	blk;
> diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
> index b577e45..39d24e2 100644
> --- a/fs/ext4/ext4.h
> +++ b/fs/ext4/ext4.h
> @@ -1915,7 +1915,7 @@ extern ext4_group_t ext4_get_group_number(struct super_block *sb,
>  
>  extern void ext4_validate_block_bitmap(struct super_block *sb,
>  				       struct ext4_group_desc *desc,
> -				       unsigned int block_group,
> +				       ext4_group_t block_group,
>  				       struct buffer_head *bh);
>  extern unsigned int ext4_block_group(struct super_block *sb,
>  			ext4_fsblk_t blocknr);
> 
> --
> 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
--
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
Darrick Wong July 26, 2013, 4:06 p.m. UTC | #2
On Wed, Jul 24, 2013 at 03:12:01PM +0800, Zheng Liu wrote:
> On Fri, Jul 19, 2013 at 04:55:46PM -0700, Darrick J. Wong wrote:
> > The block_group parameter to ext4_validate_block_bitmap is both used as a
> > ext4_group_t inside the function and the same type is passed in by all callers.
> > We might as well use the typedef consistently instead of open-coding the
> > 'unsigned int'.
> > 
> > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> > ---
> >  fs/ext4/balloc.c |    2 +-
> >  fs/ext4/ext4.h   |    2 +-
> >  2 files changed, 2 insertions(+), 2 deletions(-)
> > 
> > 
> > diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c
> > index b430afe..735e701 100644
> > --- a/fs/ext4/balloc.c
> > +++ b/fs/ext4/balloc.c
> > @@ -352,7 +352,7 @@ static ext4_fsblk_t ext4_valid_block_bitmap(struct super_block *sb,
>                                           ^^^
> It seems that this function also needs to be fixed.

Yep.  I'll get that in the next version, thank you.

--D
> 
>                                                 - Zheng
> 
> >  
> >  void ext4_validate_block_bitmap(struct super_block *sb,
> >  			       struct ext4_group_desc *desc,
> > -			       unsigned int block_group,
> > +			       ext4_group_t block_group,
> >  			       struct buffer_head *bh)
> >  {
> >  	ext4_fsblk_t	blk;
> > diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
> > index b577e45..39d24e2 100644
> > --- a/fs/ext4/ext4.h
> > +++ b/fs/ext4/ext4.h
> > @@ -1915,7 +1915,7 @@ extern ext4_group_t ext4_get_group_number(struct super_block *sb,
> >  
> >  extern void ext4_validate_block_bitmap(struct super_block *sb,
> >  				       struct ext4_group_desc *desc,
> > -				       unsigned int block_group,
> > +				       ext4_group_t block_group,
> >  				       struct buffer_head *bh);
> >  extern unsigned int ext4_block_group(struct super_block *sb,
> >  			ext4_fsblk_t blocknr);
> > 
> > --
> > 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
--
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
Theodore Ts'o Aug. 28, 2013, 8:01 p.m. UTC | #3
On Fri, Jul 26, 2013 at 09:06:13AM -0700, Darrick J. Wong wrote:
> > > @@ -352,7 +352,7 @@ static ext4_fsblk_t ext4_valid_block_bitmap(struct super_block *sb,
> >                                           ^^^
> > It seems that this function also needs to be fixed.
> 
> Yep.  I'll get that in the next version, thank you.

I've applied this patch with addition of a fix for s/unsigned int/ext4_group_t/
in the ext4_valid_block_bitmap() function as well.

Thanks,

						- Ted
--
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
diff mbox

Patch

diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c
index b430afe..735e701 100644
--- a/fs/ext4/balloc.c
+++ b/fs/ext4/balloc.c
@@ -352,7 +352,7 @@  static ext4_fsblk_t ext4_valid_block_bitmap(struct super_block *sb,
 
 void ext4_validate_block_bitmap(struct super_block *sb,
 			       struct ext4_group_desc *desc,
-			       unsigned int block_group,
+			       ext4_group_t block_group,
 			       struct buffer_head *bh)
 {
 	ext4_fsblk_t	blk;
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index b577e45..39d24e2 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -1915,7 +1915,7 @@  extern ext4_group_t ext4_get_group_number(struct super_block *sb,
 
 extern void ext4_validate_block_bitmap(struct super_block *sb,
 				       struct ext4_group_desc *desc,
-				       unsigned int block_group,
+				       ext4_group_t block_group,
 				       struct buffer_head *bh);
 extern unsigned int ext4_block_group(struct super_block *sb,
 			ext4_fsblk_t blocknr);