diff for duplicates of <49DDD078.7000800@fastmail.fm> diff --git a/a/1.txt b/N1/1.txt index 19fb69d..2efb593 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -54,15 +54,15 @@ Jack Stone wrote: > - ktp = (ktrace_t*)kmem_zone_alloc(ktrace_hdr_zone, sleep); > + ktp = kmem_zone_alloc(ktrace_hdr_zone, sleep); > -> - if (ktp = (ktrace_t*)NULL) { -> + if (ktp = NULL) { +> - if (ktp == (ktrace_t*)NULL) { +> + if (ktp == NULL) { > /* > * KM_SLEEP callers don't expect failure. > */ > @@ -75,11 +75,9 @@ ktrace_alloc(int nentries, unsigned int __nocast sleep) > */ > entries = roundup_pow_of_two(nentries); -> if (entries = ktrace_zentries) { +> if (entries == ktrace_zentries) { > - ktep = (ktrace_entry_t*)kmem_zone_zalloc(ktrace_ent_zone, > - sleep); > + ktep = kmem_zone_zalloc(ktrace_ent_zone, sleep); @@ -72,7 +72,7 @@ Jack Stone wrote: > + ktep = kmem_zalloc((entries * sizeof(*ktep)), sleep | KM_LARGE); > } > -> if (ktep = NULL) { +> if (ktep == NULL) { > diff --git a/fs/xfs/xfs_attr_leaf.c b/fs/xfs/xfs_attr_leaf.c > index afdc891..688e894 100644 > --- a/fs/xfs/xfs_attr_leaf.c @@ -159,7 +159,7 @@ Jack Stone wrote: > erp->er_extcount -= nex2; > xfs_iext_irec_update_extoffs(ifp, erp_idx + 1, -nex2); > @@ -3842,8 +3842,7 @@ xfs_iext_realloc_indirect( -> if (new_size = 0) { +> if (new_size == 0) { > xfs_iext_destroy(ifp); > } else { > - ifp->if_u1.if_ext_irec = (xfs_ext_irec_t *) @@ -175,7 +175,7 @@ Jack Stone wrote: > @@ -1670,8 +1670,7 @@ xlog_recover_do_buffer_pass1( > * the bucket. > */ -> if (*bucket = NULL) { +> if (*bucket == NULL) { > - bcp = (xfs_buf_cancel_t *)kmem_alloc(sizeof(xfs_buf_cancel_t), > - KM_SLEEP); > + bcp = kmem_alloc(sizeof(xfs_buf_cancel_t), KM_SLEEP); @@ -193,7 +193,7 @@ Jack Stone wrote: > bcp->bc_len = len; > bcp->bc_refcount = 1; > @@ -2316,8 +2314,7 @@ xlog_recover_do_inode_trans( -> if (item->ri_buf[0].i_len = sizeof(xfs_inode_log_format_t)) { +> if (item->ri_buf[0].i_len == sizeof(xfs_inode_log_format_t)) { > in_f = (xfs_inode_log_format_t *)item->ri_buf[0].i_addr; > } else { > - in_f = (xfs_inode_log_format_t *)kmem_alloc( @@ -206,7 +206,8 @@ Jack Stone wrote: > * First do a pass to find all of the cancelled buf log items. > * Store them in the buf_cancel_table for use in the second pass. > */ -> - log->l_buf_cancel_table > - (xfs_buf_cancel_t **)kmem_zalloc(XLOG_BC_TABLE_SIZE * +> - log->l_buf_cancel_table = +> - (xfs_buf_cancel_t **)kmem_zalloc(XLOG_BC_TABLE_SIZE * > + log->l_buf_cancel_table = kmem_zalloc(XLOG_BC_TABLE_SIZE * > sizeof(xfs_buf_cancel_t*), > KM_SLEEP); @@ -235,7 +236,8 @@ Jack Stone wrote: > ASSERT((ip->i_df.if_broot != NULL) && > (ip->i_df.if_broot_bytes > 0)); > iip->ili_root_size = ip->i_df.if_broot_bytes; -> - iip->ili_orig_root > - (char*)kmem_alloc(iip->ili_root_size, KM_SLEEP); +> - iip->ili_orig_root = +> - (char*)kmem_alloc(iip->ili_root_size, KM_SLEEP); > + iip->ili_orig_root = kmem_alloc(iip->ili_root_size, KM_SLEEP); > memcpy(iip->ili_orig_root, (char*)(ip->i_df.if_broot), > iip->ili_root_size); @@ -247,7 +249,7 @@ Jack Stone wrote: > @@ -54,8 +54,7 @@ xfs_trans_add_item(xfs_trans_t *tp, xfs_log_item_t *lip) > * of them and put it at the front of the chunk list. > */ -> if (tp->t_items_free = 0) { +> if (tp->t_items_free == 0) { > - licp = (xfs_log_item_chunk_t*) > - kmem_alloc(sizeof(xfs_log_item_chunk_t), KM_SLEEP); > + licp = kmem_alloc(sizeof(xfs_log_item_chunk_t), KM_SLEEP); @@ -258,7 +260,7 @@ Jack Stone wrote: > ag, xfs_extlen_t idx) > * of them and put it at the front of the chunk list. > */ -> if (tp->t_busy_free = 0) { +> if (tp->t_busy_free == 0) { > - lbcp = (xfs_log_busy_chunk_t*) > - kmem_alloc(sizeof(xfs_log_busy_chunk_t), KM_SLEEP); > + lbcp = kmem_alloc(sizeof(xfs_log_busy_chunk_t), KM_SLEEP); diff --git a/a/content_digest b/N1/content_digest index 5331649..5b49f81 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -12,7 +12,7 @@ "ref\049DCAE53.4000405@fastmail.fm\0" "From\0Jack Stone <jwjstone@fastmail.fm>\0" "Subject\0Re: [PATCH 56/56] xfs: Remove void casts\0" - "Date\0Thu, 09 Apr 2009 10:39:52 +0000\0" + "Date\0Thu, 09 Apr 2009 11:39:52 +0100\0" "To\0Bert Wesarg <bert.wesarg@googlemail.com>\0" "Cc\0linux-kernel@vger.kernel.org" jeff@garzik.org @@ -76,15 +76,15 @@ "> - ktp = (ktrace_t*)kmem_zone_alloc(ktrace_hdr_zone, sleep);\n" "> + ktp = kmem_zone_alloc(ktrace_hdr_zone, sleep);\n" "> \n" - "> - if (ktp = (ktrace_t*)NULL) {\n" - "> + if (ktp = NULL) {\n" + "> - if (ktp == (ktrace_t*)NULL) {\n" + "> + if (ktp == NULL) {\n" "> /*\n" "> * KM_SLEEP callers don't expect failure.\n" "> */\n" "> @@ -75,11 +75,9 @@ ktrace_alloc(int nentries, unsigned int __nocast sleep)\n" "> */\n" "> entries = roundup_pow_of_two(nentries);\n" - "> if (entries = ktrace_zentries) {\n" + "> if (entries == ktrace_zentries) {\n" "> - ktep = (ktrace_entry_t*)kmem_zone_zalloc(ktrace_ent_zone,\n" "> - sleep);\n" "> + ktep = kmem_zone_zalloc(ktrace_ent_zone, sleep);\n" @@ -94,7 +94,7 @@ "> + ktep = kmem_zalloc((entries * sizeof(*ktep)), sleep | KM_LARGE);\n" "> }\n" "> \n" - "> if (ktep = NULL) {\n" + "> if (ktep == NULL) {\n" "> diff --git a/fs/xfs/xfs_attr_leaf.c b/fs/xfs/xfs_attr_leaf.c\n" "> index afdc891..688e894 100644\n" "> --- a/fs/xfs/xfs_attr_leaf.c\n" @@ -181,7 +181,7 @@ "> erp->er_extcount -= nex2;\n" "> xfs_iext_irec_update_extoffs(ifp, erp_idx + 1, -nex2);\n" "> @@ -3842,8 +3842,7 @@ xfs_iext_realloc_indirect(\n" - "> if (new_size = 0) {\n" + "> if (new_size == 0) {\n" "> xfs_iext_destroy(ifp);\n" "> } else {\n" "> - ifp->if_u1.if_ext_irec = (xfs_ext_irec_t *)\n" @@ -197,7 +197,7 @@ "> @@ -1670,8 +1670,7 @@ xlog_recover_do_buffer_pass1(\n" "> * the bucket.\n" "> */\n" - "> if (*bucket = NULL) {\n" + "> if (*bucket == NULL) {\n" "> - bcp = (xfs_buf_cancel_t *)kmem_alloc(sizeof(xfs_buf_cancel_t),\n" "> - KM_SLEEP);\n" "> + bcp = kmem_alloc(sizeof(xfs_buf_cancel_t), KM_SLEEP);\n" @@ -215,7 +215,7 @@ "> bcp->bc_len = len;\n" "> bcp->bc_refcount = 1;\n" "> @@ -2316,8 +2314,7 @@ xlog_recover_do_inode_trans(\n" - "> if (item->ri_buf[0].i_len = sizeof(xfs_inode_log_format_t)) {\n" + "> if (item->ri_buf[0].i_len == sizeof(xfs_inode_log_format_t)) {\n" "> in_f = (xfs_inode_log_format_t *)item->ri_buf[0].i_addr;\n" "> } else {\n" "> - in_f = (xfs_inode_log_format_t *)kmem_alloc(\n" @@ -228,7 +228,8 @@ "> * First do a pass to find all of the cancelled buf log items.\n" "> * Store them in the buf_cancel_table for use in the second pass.\n" "> */\n" - "> - log->l_buf_cancel_table > - (xfs_buf_cancel_t **)kmem_zalloc(XLOG_BC_TABLE_SIZE *\n" + "> - log->l_buf_cancel_table =\n" + "> - (xfs_buf_cancel_t **)kmem_zalloc(XLOG_BC_TABLE_SIZE *\n" "> + log->l_buf_cancel_table = kmem_zalloc(XLOG_BC_TABLE_SIZE *\n" "> sizeof(xfs_buf_cancel_t*),\n" "> KM_SLEEP);\n" @@ -257,7 +258,8 @@ "> ASSERT((ip->i_df.if_broot != NULL) &&\n" "> (ip->i_df.if_broot_bytes > 0));\n" "> iip->ili_root_size = ip->i_df.if_broot_bytes;\n" - "> - iip->ili_orig_root > - (char*)kmem_alloc(iip->ili_root_size, KM_SLEEP);\n" + "> - iip->ili_orig_root =\n" + "> - (char*)kmem_alloc(iip->ili_root_size, KM_SLEEP);\n" "> + iip->ili_orig_root = kmem_alloc(iip->ili_root_size, KM_SLEEP);\n" "> memcpy(iip->ili_orig_root, (char*)(ip->i_df.if_broot),\n" "> iip->ili_root_size);\n" @@ -269,7 +271,7 @@ "> @@ -54,8 +54,7 @@ xfs_trans_add_item(xfs_trans_t *tp, xfs_log_item_t *lip)\n" "> * of them and put it at the front of the chunk list.\n" "> */\n" - "> if (tp->t_items_free = 0) {\n" + "> if (tp->t_items_free == 0) {\n" "> - licp = (xfs_log_item_chunk_t*)\n" "> - kmem_alloc(sizeof(xfs_log_item_chunk_t), KM_SLEEP);\n" "> + licp = kmem_alloc(sizeof(xfs_log_item_chunk_t), KM_SLEEP);\n" @@ -280,7 +282,7 @@ "> ag, xfs_extlen_t idx)\n" "> * of them and put it at the front of the chunk list.\n" "> */\n" - "> if (tp->t_busy_free = 0) {\n" + "> if (tp->t_busy_free == 0) {\n" "> - lbcp = (xfs_log_busy_chunk_t*)\n" "> - kmem_alloc(sizeof(xfs_log_busy_chunk_t), KM_SLEEP);\n" "> + lbcp = kmem_alloc(sizeof(xfs_log_busy_chunk_t), KM_SLEEP);\n" @@ -293,4 +295,4 @@ "> More majordomo info at http://vger.kernel.org/majordomo-info.html\n" > -b103714d5b14d57ba6ec615d5ce41a76356c1a0dd4e419234c1787d89099b95d +7fe46d80576905dde28959a759c20c37f74ed9f02cfd600d7a682c4f2eea3a02
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.