From 198793978345097682b297ed9463fb158e041824 Mon Sep 17 00:00:00 2001 From: Eric Sandeen Date: Wed, 22 Jan 2020 11:29:45 -0500 Subject: [PATCH] xfs: remove unused typedef definitions Source kernel commit: 35dab307c8e912306cf38d974d3c7f7adc090bce Remove some typdefs for type_t's that are no longer referred to by their typedef'd types. Signed-off-by: Eric Sandeen Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Signed-off-by: Eric Sandeen --- db/bmap.c | 4 ++-- db/inode.c | 4 ++-- db/sb.c | 2 +- include/libxlog.h | 8 ++++---- include/xfs_log_recover.h | 4 ++-- libxfs/xfs_format.h | 4 ++-- libxlog/xfs_log_recover.c | 12 ++++++------ logprint/log_print_all.c | 2 +- logprint/log_print_trans.c | 8 ++++---- repair/phase2.c | 2 +- 10 files changed, 25 insertions(+), 25 deletions(-) diff --git a/db/bmap.c b/db/bmap.c index 6f39fe956..fdc70e95e 100644 --- a/db/bmap.c +++ b/db/bmap.c @@ -41,7 +41,7 @@ bmap( xfs_dinode_t *dip; xfs_fileoff_t eoffset; xfs_bmbt_rec_t *ep; - xfs_dinode_fmt_t fmt; + enum xfs_dinode_fmt fmt; int fsize; xfs_bmbt_key_t *kp; int n; @@ -62,7 +62,7 @@ bmap( n = 0; eoffset = offset + len - 1; curoffset = offset; - fmt = (xfs_dinode_fmt_t)XFS_DFORK_FORMAT(dip, whichfork); + fmt = (enum xfs_dinode_fmt)XFS_DFORK_FORMAT(dip, whichfork); typ = whichfork == XFS_DATA_FORK ? TYP_BMAPBTD : TYP_BMAPBTA; ASSERT(typtab[typ].typnm == typ); ASSERT(fmt == XFS_DINODE_FMT_LOCAL || fmt == XFS_DINODE_FMT_EXTENTS || diff --git a/db/inode.c b/db/inode.c index d8d69ffbd..0cff9d634 100644 --- a/db/inode.c +++ b/db/inode.c @@ -224,11 +224,11 @@ fp_dinode_fmt( int array) { int bitpos; - xfs_dinode_fmt_t f; + enum xfs_dinode_fmt f; int i; for (i = 0, bitpos = bit; i < count; i++, bitpos += size) { - f = (xfs_dinode_fmt_t)getbitval(obj, bitpos, size, BVUNSIGNED); + f = (enum xfs_dinode_fmt)getbitval(obj, bitpos, size, BVUNSIGNED); if (array) dbprintf("%d:", i + base); if (f < 0 || f >= dinode_fmt_name_size) diff --git a/db/sb.c b/db/sb.c index 5059b261c..8a303422b 100644 --- a/db/sb.c +++ b/db/sb.c @@ -209,7 +209,7 @@ get_sb(xfs_agnumber_t agno, xfs_sb_t *sb) } /* workaround craziness in the xlog routines */ -int xlog_recover_do_trans(struct xlog *log, xlog_recover_t *t, int p) +int xlog_recover_do_trans(struct xlog *log, struct xlog_recover *t, int p) { return 0; } diff --git a/include/libxlog.h b/include/libxlog.h index 92c54f48a..4b7855077 100644 --- a/include/libxlog.h +++ b/include/libxlog.h @@ -91,16 +91,16 @@ extern int xlog_find_tail(struct xlog *log, xfs_daddr_t *head_blk, extern int xlog_recover(struct xlog *log, int readonly); extern void xlog_recover_print_data(char *p, int len); extern void xlog_recover_print_logitem(xlog_recover_item_t *item); -extern void xlog_recover_print_trans_head(xlog_recover_t *tr); +extern void xlog_recover_print_trans_head(struct xlog_recover *tr); extern int xlog_print_find_oldest(struct xlog *log, xfs_daddr_t *last_blk); /* for transactional view */ -extern void xlog_recover_print_trans_head(xlog_recover_t *tr); -extern void xlog_recover_print_trans(xlog_recover_t *trans, +extern void xlog_recover_print_trans_head(struct xlog_recover *tr); +extern void xlog_recover_print_trans(struct xlog_recover *trans, struct list_head *itemq, int print); extern int xlog_do_recovery_pass(struct xlog *log, xfs_daddr_t head_blk, xfs_daddr_t tail_blk, int pass); -extern int xlog_recover_do_trans(struct xlog *log, xlog_recover_t *trans, +extern int xlog_recover_do_trans(struct xlog *log, struct xlog_recover *trans, int pass); extern int xlog_header_check_recover(xfs_mount_t *mp, xlog_rec_header_t *head); diff --git a/include/xfs_log_recover.h b/include/xfs_log_recover.h index 4785efbdc..d03b4e836 100644 --- a/include/xfs_log_recover.h +++ b/include/xfs_log_recover.h @@ -30,14 +30,14 @@ typedef struct xlog_recover_item { xfs_log_iovec_t *ri_buf; /* ptr to regions buffer */ } xlog_recover_item_t; -typedef struct xlog_recover { +struct xlog_recover { struct hlist_node r_list; xlog_tid_t r_log_tid; /* log's transaction id */ xfs_trans_header_t r_theader; /* trans header for partial */ int r_state; /* not needed */ xfs_lsn_t r_lsn; /* xact lsn */ struct list_head r_itemq; /* q for items */ -} xlog_recover_t; +}; #define ITEM_TYPE(i) (*(unsigned short *)(i)->ri_buf[0].i_addr) diff --git a/libxfs/xfs_format.h b/libxfs/xfs_format.h index fc06b480d..e856e54c7 100644 --- a/libxfs/xfs_format.h +++ b/libxfs/xfs_format.h @@ -920,13 +920,13 @@ static inline uint xfs_dinode_size(int version) * This enum is used in string mapping in xfs_trace.h; please keep the * TRACE_DEFINE_ENUMs for it up to date. */ -typedef enum xfs_dinode_fmt { +enum xfs_dinode_fmt { XFS_DINODE_FMT_DEV, /* xfs_dev_t */ XFS_DINODE_FMT_LOCAL, /* bulk data */ XFS_DINODE_FMT_EXTENTS, /* struct xfs_bmbt_rec */ XFS_DINODE_FMT_BTREE, /* struct xfs_bmdr_block */ XFS_DINODE_FMT_UUID /* added long ago, but never used */ -} xfs_dinode_fmt_t; +}; #define XFS_INODE_FORMAT_STR \ { XFS_DINODE_FMT_DEV, "dev" }, \ diff --git a/libxlog/xfs_log_recover.c b/libxlog/xfs_log_recover.c index ae4213959..9324a2130 100644 --- a/libxlog/xfs_log_recover.c +++ b/libxlog/xfs_log_recover.c @@ -980,12 +980,12 @@ bp_err: return -1; } -STATIC xlog_recover_t * +STATIC struct xlog_recover * xlog_recover_find_tid( struct hlist_head *head, xlog_tid_t tid) { - xlog_recover_t *trans; + struct xlog_recover *trans; struct hlist_node *n; hlist_for_each_entry(trans, n, head, r_list) { @@ -1001,9 +1001,9 @@ xlog_recover_new_tid( xlog_tid_t tid, xfs_lsn_t lsn) { - xlog_recover_t *trans; + struct xlog_recover *trans; - trans = kmem_zalloc(sizeof(xlog_recover_t), 0); + trans = kmem_zalloc(sizeof(struct xlog_recover), 0); trans->r_log_tid = tid; trans->r_lsn = lsn; INIT_LIST_HEAD(&trans->r_itemq); @@ -1184,7 +1184,7 @@ xlog_recover_commit_trans( STATIC int xlog_recover_unmount_trans( - xlog_recover_t *trans) + struct xlog_recover *trans) { /* Do nothing now */ xfs_warn(log->l_mp, "%s: Unmount LR", __func__); @@ -1211,7 +1211,7 @@ xlog_recover_process_data( char *lp; int num_logops; xlog_op_header_t *ohead; - xlog_recover_t *trans; + struct xlog_recover *trans; xlog_tid_t tid; int error; unsigned long hash; diff --git a/logprint/log_print_all.c b/logprint/log_print_all.c index 5aec9df07..d3d4c07b4 100644 --- a/logprint/log_print_all.c +++ b/logprint/log_print_all.c @@ -496,7 +496,7 @@ xlog_recover_print_item( void xlog_recover_print_trans( - xlog_recover_t *trans, + struct xlog_recover *trans, struct list_head *itemq, int print) { diff --git a/logprint/log_print_trans.c b/logprint/log_print_trans.c index 08e44a3e4..2004b5a0e 100644 --- a/logprint/log_print_trans.c +++ b/logprint/log_print_trans.c @@ -10,7 +10,7 @@ void xlog_recover_print_trans_head( - xlog_recover_t *tr) + struct xlog_recover *tr) { printf(_("TRANS: tid:0x%x #items:%d trans:0x%x q:0x%lx\n"), tr->r_log_tid, @@ -20,9 +20,9 @@ xlog_recover_print_trans_head( int xlog_recover_do_trans( - struct xlog *log, - xlog_recover_t *trans, - int pass) + struct xlog *log, + struct xlog_recover *trans, + int pass) { xlog_recover_print_trans(trans, &trans->r_itemq, 3); return 0; diff --git a/repair/phase2.c b/repair/phase2.c index 853f9554a..40ea2f840 100644 --- a/repair/phase2.c +++ b/repair/phase2.c @@ -16,7 +16,7 @@ #include "scan.h" /* workaround craziness in the xlog routines */ -int xlog_recover_do_trans(struct xlog *log, xlog_recover_t *t, int p) +int xlog_recover_do_trans(struct xlog *log, struct xlog_recover *t, int p) { return 0; } -- 2.47.2