Re: [PATCH 11/17] xfs: convert dquot flags to unsigned.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11 Apr 2022 at 06:01, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
>
> 5.18 w/ std=gnu11 compiled with gcc-5 wants flags stored in unsigned
> fields to be unsigned.
>

Looks good.

Reviewed-by: Chandan Babu R <chandan.babu@xxxxxxxxxx>

> Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
> ---
>  fs/xfs/libxfs/xfs_format.h     | 8 ++++----
>  fs/xfs/libxfs/xfs_quota_defs.h | 4 ++--
>  2 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/fs/xfs/libxfs/xfs_format.h b/fs/xfs/libxfs/xfs_format.h
> index 0d6fa199a896..f524736d811e 100644
> --- a/fs/xfs/libxfs/xfs_format.h
> +++ b/fs/xfs/libxfs/xfs_format.h
> @@ -1085,10 +1085,10 @@ static inline bool xfs_dinode_has_bigtime(const struct xfs_dinode *dip)
>  #define XFS_DQUOT_MAGIC		0x4451		/* 'DQ' */
>  #define XFS_DQUOT_VERSION	(uint8_t)0x01	/* latest version number */
>  
> -#define XFS_DQTYPE_USER		0x01		/* user dquot record */
> -#define XFS_DQTYPE_PROJ		0x02		/* project dquot record */
> -#define XFS_DQTYPE_GROUP	0x04		/* group dquot record */
> -#define XFS_DQTYPE_BIGTIME	0x80		/* large expiry timestamps */
> +#define XFS_DQTYPE_USER		(1u << 0)	/* user dquot record */
> +#define XFS_DQTYPE_PROJ		(1u << 1)	/* project dquot record */
> +#define XFS_DQTYPE_GROUP	(1u << 2)	/* group dquot record */
> +#define XFS_DQTYPE_BIGTIME	(1u << 7)	/* large expiry timestamps */
>  
>  /* bitmask to determine if this is a user/group/project dquot */
>  #define XFS_DQTYPE_REC_MASK	(XFS_DQTYPE_USER | \
> diff --git a/fs/xfs/libxfs/xfs_quota_defs.h b/fs/xfs/libxfs/xfs_quota_defs.h
> index a02c5062f9b2..fdfe3cc6f15c 100644
> --- a/fs/xfs/libxfs/xfs_quota_defs.h
> +++ b/fs/xfs/libxfs/xfs_quota_defs.h
> @@ -29,8 +29,8 @@ typedef uint8_t		xfs_dqtype_t;
>  /*
>   * flags for q_flags field in the dquot.
>   */
> -#define XFS_DQFLAG_DIRTY	(1 << 0)	/* dquot is dirty */
> -#define XFS_DQFLAG_FREEING	(1 << 1)	/* dquot is being torn down */
> +#define XFS_DQFLAG_DIRTY	(1u << 0)	/* dquot is dirty */
> +#define XFS_DQFLAG_FREEING	(1u << 1)	/* dquot is being torn down */
>  
>  #define XFS_DQFLAG_STRINGS \
>  	{ XFS_DQFLAG_DIRTY,	"DIRTY" }, \


-- 
chandan



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux