From: Steven Rostedt <rostedt@goodmis.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
Ingo Molnar <mingo@redhat.com>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] trace: cleanup: make some types unsigned
Date: Fri, 07 Oct 2011 09:38:51 -0400 [thread overview]
Message-ID: <1317994732.4729.39.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <20111007132744.GC31424@elgon.mountain>
On Fri, 2011-10-07 at 16:27 +0300, Dan Carpenter wrote:
> The problem here is that I'm trying to silence a static checker
> warning. In replace_preds() we cap n_preds at MAX_FILTER_PRED but
> we don't check for negative values. It can't actually be negative
> values, but the static checkers get confused.
I really hate to uglify code for the sake of static checkers.
This code may change in the near future, and the possibility that
n_preds may become a possibility. Perhaps we should add a:
WARN_ON(n_preds < 0);
If in the future the count_preds() changes and incorrectly produces a
negative number, or perhaps even overflows int, we wont catch it with
unsigned.
-- Steve
next prev parent reply other threads:[~2011-10-07 13:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-07 13:27 Dan Carpenter
2011-10-07 13:38 ` Steven Rostedt [this message]
2011-10-07 20:20 ` Dan Carpenter
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=1317994732.4729.39.camel@gandalf.stny.rr.com \
--to=rostedt@goodmis.org \
--cc=dan.carpenter@oracle.com \
--cc=fweisbec@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
/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
all inboxes | Powered by JetHome®