[bug report] maple_tree: change spanning store to work on larger trees

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

 



Hello Liam Howlett,

The patch 5b979a0bc9ed: "maple_tree: change spanning store to work on
larger trees" from Jun 15, 2022, leads to the following Smatch static
checker warning:

	lib/maple_tree.c:4022 mas_wr_spanning_store()
	warn: inconsistent indenting

lib/maple_tree.c
    4009         memset(&b_node, 0, sizeof(struct maple_big_node));
    4010         /* Copy l_mas and store the value in b_node. */
    4011         mas_store_b_node(&l_wr_mas, &b_node, l_wr_mas.node_end);
    4012         /* Copy r_mas into b_node. */
    4013         if (r_mas.offset <= r_wr_mas.node_end)
    4014                 mas_mab_cp(&r_mas, r_mas.offset, r_wr_mas.node_end,
    4015                            &b_node, b_node.b_end + 1);
    4016         /* Stop spanning searches by searching for just index. */
    4017         l_mas.index = l_mas.last = mas->index;
    4018 
    4019         mast.bn = &b_node;
    4020         mast.orig_l = &l_mas;
    4021         mast.orig_r = &r_mas;
--> 4022                 if (mte_dead_node(mast.orig_l->node) ||
    4023                     mte_dead_node(mast.orig_r->node)) {
    4024                         printk("FUCKED.  l is %s and r is %s\n",
    4025                        mte_dead_node(mast.orig_l->node) ? "dead" : "alive",
    4026                        mte_dead_node(mast.orig_r->node) ? "dead" : "alive");
    4027                         printk("Writing %lu-%lu\n", mas->index, mas->last);
    4028                 }

Heh.  Looks like debug code escaped.

    4029         /* Combine l_mas and r_mas and split them up evenly again. */
    4030         return mas_spanning_rebalance(mas, &mast, height + 1);
    4031 }

regards,
dan carpenter




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux