From: dan.carpenter@oracle.com (Dan Carpenter)
Subject: [lttng-dev] lttng lib: ring buffer
Date: Wed, 30 Nov 2011 11:44:11 +0300 [thread overview]
Message-ID: <20111130084411.GD6268@elgon.mountain> (raw)
Hello Mathieu Desnoyers,
This is a semi-automatic email about new static checker warnings.
The patch c844b2f5cfea: "lttng lib: ring buffer" from Nov 28, 2011,
leads to the following Smatch complaint:
drivers/staging/lttng/lib/ringbuffer/ring_buffer_frontend.c +1150 lib_ring_buffer_print_buffer_errors()
warn: variable dereferenced before check 'chan' (see line 1143)
drivers/staging/lttng/lib/ringbuffer/ring_buffer_frontend.c
1142 {
1143 const struct lib_ring_buffer_config *config = chan->backend.config;
^^^^^^^^^^^^^^^^^^^^
Dereference.
1144 unsigned long write_offset, cons_offset;
1145
1146 /*
1147 * Can be called in the error path of allocation when
1148 * trans_channel_data is not yet set.
1149 */
1150 if (!chan)
^^^^^^^^^
Check. At first glance the comment seems out of date, I think check can
be removed safely.
1151 return;
1152 /*
regards,
dan carpenter
next reply other threads:[~2011-11-30 8:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-30 8:44 Dan Carpenter [this message]
2011-11-30 13:03 ` Mathieu Desnoyers
2011-11-30 8:44 Dan Carpenter
2011-11-30 13:07 ` Mathieu Desnoyers
2011-11-30 8:45 Dan Carpenter
2011-11-30 13:16 ` Mathieu Desnoyers
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=20111130084411.GD6268@elgon.mountain \
--to=dan.carpenter@oracle.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