diff mbox series

[02/46] xfs: use unsigned int for all size values in struct xfs_da_geometry

Message ID 20191107182410.12660-3-hch@lst.de (mailing list archive)
State Accepted
Headers show
Series [01/46] xfs: move incore structures out of xfs_da_format.h | expand

Commit Message

Christoph Hellwig Nov. 7, 2019, 6:23 p.m. UTC
None of these can ever be negative, so use unsigned types.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/xfs/libxfs/xfs_da_btree.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Darrick J. Wong Nov. 7, 2019, 10:33 p.m. UTC | #1
On Thu, Nov 07, 2019 at 07:23:26PM +0100, Christoph Hellwig wrote:
> None of these can ever be negative, so use unsigned types.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Looks ok to me,
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

--D

> ---
>  fs/xfs/libxfs/xfs_da_btree.h | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/fs/xfs/libxfs/xfs_da_btree.h b/fs/xfs/libxfs/xfs_da_btree.h
> index 02f7a21ab3a5..01b0bbe8b266 100644
> --- a/fs/xfs/libxfs/xfs_da_btree.h
> +++ b/fs/xfs/libxfs/xfs_da_btree.h
> @@ -18,12 +18,12 @@ struct xfs_dir_ops;
>   * structures will be attached to the xfs_mount.
>   */
>  struct xfs_da_geometry {
> -	int		blksize;	/* da block size in bytes */
> -	int		fsbcount;	/* da block size in filesystem blocks */
> +	unsigned int	blksize;	/* da block size in bytes */
> +	unsigned int	fsbcount;	/* da block size in filesystem blocks */
>  	uint8_t		fsblog;		/* log2 of _filesystem_ block size */
>  	uint8_t		blklog;		/* log2 of da block size */
> -	uint		node_ents;	/* # of entries in a danode */
> -	int		magicpct;	/* 37% of block size in bytes */
> +	unsigned int	node_ents;	/* # of entries in a danode */
> +	unsigned int	magicpct;	/* 37% of block size in bytes */
>  	xfs_dablk_t	datablk;	/* blockno of dir data v2 */
>  	xfs_dablk_t	leafblk;	/* blockno of leaf data v2 */
>  	xfs_dablk_t	freeblk;	/* blockno of free data v2 */
> -- 
> 2.20.1
>
diff mbox series

Patch

diff --git a/fs/xfs/libxfs/xfs_da_btree.h b/fs/xfs/libxfs/xfs_da_btree.h
index 02f7a21ab3a5..01b0bbe8b266 100644
--- a/fs/xfs/libxfs/xfs_da_btree.h
+++ b/fs/xfs/libxfs/xfs_da_btree.h
@@ -18,12 +18,12 @@  struct xfs_dir_ops;
  * structures will be attached to the xfs_mount.
  */
 struct xfs_da_geometry {
-	int		blksize;	/* da block size in bytes */
-	int		fsbcount;	/* da block size in filesystem blocks */
+	unsigned int	blksize;	/* da block size in bytes */
+	unsigned int	fsbcount;	/* da block size in filesystem blocks */
 	uint8_t		fsblog;		/* log2 of _filesystem_ block size */
 	uint8_t		blklog;		/* log2 of da block size */
-	uint		node_ents;	/* # of entries in a danode */
-	int		magicpct;	/* 37% of block size in bytes */
+	unsigned int	node_ents;	/* # of entries in a danode */
+	unsigned int	magicpct;	/* 37% of block size in bytes */
 	xfs_dablk_t	datablk;	/* blockno of dir data v2 */
 	xfs_dablk_t	leafblk;	/* blockno of leaf data v2 */
 	xfs_dablk_t	freeblk;	/* blockno of free data v2 */