diff mbox series

xfs: sort variable alphabetically to avoid repeated declaration

Message ID 1622181328-9852-1-git-send-email-zhangshaokun@hisilicon.com (mailing list archive)
State Accepted
Headers show
Series xfs: sort variable alphabetically to avoid repeated declaration | expand

Commit Message

Shaokun Zhang May 28, 2021, 5:55 a.m. UTC
Variable 'xfs_agf_buf_ops', 'xfs_agi_buf_ops', 'xfs_dquot_buf_ops' and
'xfs_symlink_buf_ops' are declared twice, so sort these variables
alphabetically and remove the repeated declaration.

Cc: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com>
---
 fs/xfs/libxfs/xfs_shared.h | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

Comments

Darrick J. Wong May 28, 2021, 4:31 p.m. UTC | #1
On Fri, May 28, 2021 at 01:55:28PM +0800, Shaokun Zhang wrote:
> Variable 'xfs_agf_buf_ops', 'xfs_agi_buf_ops', 'xfs_dquot_buf_ops' and
> 'xfs_symlink_buf_ops' are declared twice, so sort these variables
> alphabetically and remove the repeated declaration.
> 
> Cc: "Darrick J. Wong" <djwong@kernel.org>
> Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com>

Looks fine to me,
Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> ---
>  fs/xfs/libxfs/xfs_shared.h | 20 ++++++++------------
>  1 file changed, 8 insertions(+), 12 deletions(-)
> 
> diff --git a/fs/xfs/libxfs/xfs_shared.h b/fs/xfs/libxfs/xfs_shared.h
> index 782fdd08f759..25c4cab58851 100644
> --- a/fs/xfs/libxfs/xfs_shared.h
> +++ b/fs/xfs/libxfs/xfs_shared.h
> @@ -22,30 +22,26 @@ struct xfs_inode;
>   * Buffer verifier operations are widely used, including userspace tools
>   */
>  extern const struct xfs_buf_ops xfs_agf_buf_ops;
> -extern const struct xfs_buf_ops xfs_agi_buf_ops;
> -extern const struct xfs_buf_ops xfs_agf_buf_ops;
>  extern const struct xfs_buf_ops xfs_agfl_buf_ops;
> -extern const struct xfs_buf_ops xfs_bnobt_buf_ops;
> -extern const struct xfs_buf_ops xfs_cntbt_buf_ops;
> -extern const struct xfs_buf_ops xfs_rmapbt_buf_ops;
> -extern const struct xfs_buf_ops xfs_refcountbt_buf_ops;
> +extern const struct xfs_buf_ops xfs_agi_buf_ops;
>  extern const struct xfs_buf_ops xfs_attr3_leaf_buf_ops;
>  extern const struct xfs_buf_ops xfs_attr3_rmt_buf_ops;
>  extern const struct xfs_buf_ops xfs_bmbt_buf_ops;
> +extern const struct xfs_buf_ops xfs_bnobt_buf_ops;
> +extern const struct xfs_buf_ops xfs_cntbt_buf_ops;
>  extern const struct xfs_buf_ops xfs_da3_node_buf_ops;
>  extern const struct xfs_buf_ops xfs_dquot_buf_ops;
> -extern const struct xfs_buf_ops xfs_symlink_buf_ops;
> -extern const struct xfs_buf_ops xfs_agi_buf_ops;
> -extern const struct xfs_buf_ops xfs_inobt_buf_ops;
> +extern const struct xfs_buf_ops xfs_dquot_buf_ra_ops;
>  extern const struct xfs_buf_ops xfs_finobt_buf_ops;
> +extern const struct xfs_buf_ops xfs_inobt_buf_ops;
>  extern const struct xfs_buf_ops xfs_inode_buf_ops;
>  extern const struct xfs_buf_ops xfs_inode_buf_ra_ops;
> -extern const struct xfs_buf_ops xfs_dquot_buf_ops;
> -extern const struct xfs_buf_ops xfs_dquot_buf_ra_ops;
> +extern const struct xfs_buf_ops xfs_refcountbt_buf_ops;
> +extern const struct xfs_buf_ops xfs_rmapbt_buf_ops;
> +extern const struct xfs_buf_ops xfs_rtbuf_ops;
>  extern const struct xfs_buf_ops xfs_sb_buf_ops;
>  extern const struct xfs_buf_ops xfs_sb_quiet_buf_ops;
>  extern const struct xfs_buf_ops xfs_symlink_buf_ops;
> -extern const struct xfs_buf_ops xfs_rtbuf_ops;
>  
>  /* log size calculation functions */
>  int	xfs_log_calc_unit_res(struct xfs_mount *mp, int unit_bytes);
> -- 
> 2.7.4
>
Carlos Maiolino May 31, 2021, 12:27 p.m. UTC | #2
On Fri, May 28, 2021 at 01:55:28PM +0800, Shaokun Zhang wrote:
> Variable 'xfs_agf_buf_ops', 'xfs_agi_buf_ops', 'xfs_dquot_buf_ops' and
> 'xfs_symlink_buf_ops' are declared twice, so sort these variables
> alphabetically and remove the repeated declaration.
> 
> Cc: "Darrick J. Wong" <djwong@kernel.org>
> Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com>

Looks good.
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>

> ---
>  fs/xfs/libxfs/xfs_shared.h | 20 ++++++++------------
>  1 file changed, 8 insertions(+), 12 deletions(-)
> 
> diff --git a/fs/xfs/libxfs/xfs_shared.h b/fs/xfs/libxfs/xfs_shared.h
> index 782fdd08f759..25c4cab58851 100644
> --- a/fs/xfs/libxfs/xfs_shared.h
> +++ b/fs/xfs/libxfs/xfs_shared.h
> @@ -22,30 +22,26 @@ struct xfs_inode;
>   * Buffer verifier operations are widely used, including userspace tools
>   */
>  extern const struct xfs_buf_ops xfs_agf_buf_ops;
> -extern const struct xfs_buf_ops xfs_agi_buf_ops;
> -extern const struct xfs_buf_ops xfs_agf_buf_ops;
>  extern const struct xfs_buf_ops xfs_agfl_buf_ops;
> -extern const struct xfs_buf_ops xfs_bnobt_buf_ops;
> -extern const struct xfs_buf_ops xfs_cntbt_buf_ops;
> -extern const struct xfs_buf_ops xfs_rmapbt_buf_ops;
> -extern const struct xfs_buf_ops xfs_refcountbt_buf_ops;
> +extern const struct xfs_buf_ops xfs_agi_buf_ops;
>  extern const struct xfs_buf_ops xfs_attr3_leaf_buf_ops;
>  extern const struct xfs_buf_ops xfs_attr3_rmt_buf_ops;
>  extern const struct xfs_buf_ops xfs_bmbt_buf_ops;
> +extern const struct xfs_buf_ops xfs_bnobt_buf_ops;
> +extern const struct xfs_buf_ops xfs_cntbt_buf_ops;
>  extern const struct xfs_buf_ops xfs_da3_node_buf_ops;
>  extern const struct xfs_buf_ops xfs_dquot_buf_ops;
> -extern const struct xfs_buf_ops xfs_symlink_buf_ops;
> -extern const struct xfs_buf_ops xfs_agi_buf_ops;
> -extern const struct xfs_buf_ops xfs_inobt_buf_ops;
> +extern const struct xfs_buf_ops xfs_dquot_buf_ra_ops;
>  extern const struct xfs_buf_ops xfs_finobt_buf_ops;
> +extern const struct xfs_buf_ops xfs_inobt_buf_ops;
>  extern const struct xfs_buf_ops xfs_inode_buf_ops;
>  extern const struct xfs_buf_ops xfs_inode_buf_ra_ops;
> -extern const struct xfs_buf_ops xfs_dquot_buf_ops;
> -extern const struct xfs_buf_ops xfs_dquot_buf_ra_ops;
> +extern const struct xfs_buf_ops xfs_refcountbt_buf_ops;
> +extern const struct xfs_buf_ops xfs_rmapbt_buf_ops;
> +extern const struct xfs_buf_ops xfs_rtbuf_ops;
>  extern const struct xfs_buf_ops xfs_sb_buf_ops;
>  extern const struct xfs_buf_ops xfs_sb_quiet_buf_ops;
>  extern const struct xfs_buf_ops xfs_symlink_buf_ops;
> -extern const struct xfs_buf_ops xfs_rtbuf_ops;
>  
>  /* log size calculation functions */
>  int	xfs_log_calc_unit_res(struct xfs_mount *mp, int unit_bytes);
> -- 
> 2.7.4
>
diff mbox series

Patch

diff --git a/fs/xfs/libxfs/xfs_shared.h b/fs/xfs/libxfs/xfs_shared.h
index 782fdd08f759..25c4cab58851 100644
--- a/fs/xfs/libxfs/xfs_shared.h
+++ b/fs/xfs/libxfs/xfs_shared.h
@@ -22,30 +22,26 @@  struct xfs_inode;
  * Buffer verifier operations are widely used, including userspace tools
  */
 extern const struct xfs_buf_ops xfs_agf_buf_ops;
-extern const struct xfs_buf_ops xfs_agi_buf_ops;
-extern const struct xfs_buf_ops xfs_agf_buf_ops;
 extern const struct xfs_buf_ops xfs_agfl_buf_ops;
-extern const struct xfs_buf_ops xfs_bnobt_buf_ops;
-extern const struct xfs_buf_ops xfs_cntbt_buf_ops;
-extern const struct xfs_buf_ops xfs_rmapbt_buf_ops;
-extern const struct xfs_buf_ops xfs_refcountbt_buf_ops;
+extern const struct xfs_buf_ops xfs_agi_buf_ops;
 extern const struct xfs_buf_ops xfs_attr3_leaf_buf_ops;
 extern const struct xfs_buf_ops xfs_attr3_rmt_buf_ops;
 extern const struct xfs_buf_ops xfs_bmbt_buf_ops;
+extern const struct xfs_buf_ops xfs_bnobt_buf_ops;
+extern const struct xfs_buf_ops xfs_cntbt_buf_ops;
 extern const struct xfs_buf_ops xfs_da3_node_buf_ops;
 extern const struct xfs_buf_ops xfs_dquot_buf_ops;
-extern const struct xfs_buf_ops xfs_symlink_buf_ops;
-extern const struct xfs_buf_ops xfs_agi_buf_ops;
-extern const struct xfs_buf_ops xfs_inobt_buf_ops;
+extern const struct xfs_buf_ops xfs_dquot_buf_ra_ops;
 extern const struct xfs_buf_ops xfs_finobt_buf_ops;
+extern const struct xfs_buf_ops xfs_inobt_buf_ops;
 extern const struct xfs_buf_ops xfs_inode_buf_ops;
 extern const struct xfs_buf_ops xfs_inode_buf_ra_ops;
-extern const struct xfs_buf_ops xfs_dquot_buf_ops;
-extern const struct xfs_buf_ops xfs_dquot_buf_ra_ops;
+extern const struct xfs_buf_ops xfs_refcountbt_buf_ops;
+extern const struct xfs_buf_ops xfs_rmapbt_buf_ops;
+extern const struct xfs_buf_ops xfs_rtbuf_ops;
 extern const struct xfs_buf_ops xfs_sb_buf_ops;
 extern const struct xfs_buf_ops xfs_sb_quiet_buf_ops;
 extern const struct xfs_buf_ops xfs_symlink_buf_ops;
-extern const struct xfs_buf_ops xfs_rtbuf_ops;
 
 /* log size calculation functions */
 int	xfs_log_calc_unit_res(struct xfs_mount *mp, int unit_bytes);