From: Dan Carpenter <dan.carpenter@oracle.com>
To: mgorman@techsingularity.net
Cc: linux-mm@kvack.org
Subject: [bug report] mm, compaction: round-robin the order while searching the free lists for a target
Date: Wed, 9 Jan 2019 11:27:33 +0300 [thread overview]
Message-ID: <20190109082733.GA5424@kadam> (raw)
Hello Mel Gorman,
The patch 1688e2896de4: "mm, compaction: round-robin the order while
searching the free lists for a target" from Jan 8, 2019, leads to the
following static checker warning:
mm/compaction.c:1252 next_search_order()
warn: impossible condition '(cc->search_order < 0) => (0-u16max < 0)'
mm/compaction.c
1243 static int next_search_order(struct compact_control *cc, int order)
1244 {
1245 order--;
1246 if (order < 0)
1247 order = cc->order - 1;
1248
1249 /* Search wrapped around? */
1250 if (order == cc->search_order) {
1251 cc->search_order--;
--> 1252 if (cc->search_order < 0)
^^^^^^^^^^^^^^^^^^^^
u16 can't be negative.
1253 cc->search_order = cc->order - 1;
1254 return -1;
1255 }
1256
1257 return order;
1258 }
regards,
dan carpenter
next reply other threads:[~2019-01-09 8:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-09 8:27 Dan Carpenter [this message]
2019-01-09 10:25 ` Mel Gorman
2019-01-09 10:28 ` Dan Carpenter
2019-01-09 10:35 ` Mel Gorman
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=20190109082733.GA5424@kadam \
--to=dan.carpenter@oracle.com \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
/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