Re: [PATCH] xfs: cleanup the useless backslash in xfs_attr_leaf_entsize_remote

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

 



On Wed, Sep 16, 2020 at 07:19:11PM +0800, xiakaixu1987@xxxxxxxxx wrote:
> From: Kaixu Xia <kaixuxia@xxxxxxxxxxx>
> 
> The backslash is useless and remove it.
> 
> Signed-off-by: Kaixu Xia <kaixuxia@xxxxxxxxxxx>
> ---
>  fs/xfs/libxfs/xfs_da_format.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/xfs/libxfs/xfs_da_format.h b/fs/xfs/libxfs/xfs_da_format.h
> index b40a4e80f5ee..4fe974773d85 100644
> --- a/fs/xfs/libxfs/xfs_da_format.h
> +++ b/fs/xfs/libxfs/xfs_da_format.h
> @@ -746,7 +746,7 @@ xfs_attr3_leaf_name_local(xfs_attr_leafblock_t *leafp, int idx)
>   */
>  static inline int xfs_attr_leaf_entsize_remote(int nlen)
>  {
> -	return ((uint)sizeof(xfs_attr_leaf_name_remote_t) - 1 + (nlen) + \
> +	return ((uint)sizeof(xfs_attr_leaf_name_remote_t) - 1 + (nlen) +
>  		XFS_ATTR_LEAF_NAME_ALIGN - 1) & ~(XFS_ATTR_LEAF_NAME_ALIGN - 1);

If you're going to go mess with these, you might as well clean up the
typedef usage, the unnecessary parentheses, and the open-coded round_up
call:

static inline int xfs_attr_leaf_entsize_remote(int nlen)
{
	return round_up(sizeof(struct xfs_attr_leaf_name_remote) - 1 + nlen,
			XFS_ATTR_LEAF_NAME_ALIGN);
}

(and similar for xfs_attr_leaf_entsize_local().)

--D

>  }
>  
> -- 
> 2.20.0
> 



[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