linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: liam.howlett@oracle.com
Cc: linux-mm@kvack.org
Subject: [bug report] maple_tree: change spanning store to work on larger trees
Date: Fri, 17 Jun 2022 18:08:59 +0300	[thread overview]
Message-ID: <YqyZCyYneCp/EnAt@kili> (raw)

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


                 reply	other threads:[~2022-06-17 15:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YqyZCyYneCp/EnAt@kili \
    --to=dan.carpenter@oracle.com \
    --cc=liam.howlett@oracle.com \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox