From: Loic Dachary <loic@dachary.org>
To: Kevin Greenan <kmgreen2@gmail.com>, Janne Grunau <j@jannau.net>
Cc: Ceph Development <ceph-devel@vger.kernel.org>
Subject: dead code in gf-complete
Date: Fri, 05 Dec 2014 16:06:23 +0100 [thread overview]
Message-ID: <5481C9EF.1090800@dachary.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 2104 bytes --]
Hi Kevin & Janne,
Does the following ring a bell ? If not I'll figure it out ;-) It showed up with static analysis, after the NEON patch was merged (no static analysis is done before).
Cheers
/erasure-code/jerasure/gf-complete/src/gf_w32.c: 2309 in gf_w32_split_init()
2303 if ((h->arg1 == 4 && h->arg2 == 32) || (h->arg1 == 32 && h->arg2 == 4) ||
2304 ((issse3 || isneon) && h->mult_type == GF_REGION_DEFAULT)) {
2305 ld4 = (struct gf_split_4_32_lazy_data *) h->private;
2306 ld4->last_value = 0;
2307 if ((h->region_type & GF_REGION_NOSIMD) || !(issse3 || isneon)) {
2308 gf->multiply_region.w32 = gf_w32_split_4_32_lazy_multiply_region;
>>> CID 1256941: Logically dead code (DEADCODE)
>>> Execution cannot reach this statement "if (isneon) {
} else if (h-...".
2309 } else if (isneon) {
2310 #ifdef ARM_NEON
2311 gf_w32_neon_split_init(gf);
2312 #endif
2313 } else if (h->region_type & GF_REGION_ALTMAP) {
2314 gf->multiply_region.w32 = gf_w32_split_4_32_lazy_sse_altmap_multiply_region;
________________________________________________________________________________________________________
*** CID 1256942: Logically dead code (DEADCODE)
/erasure-code/jerasure/gf-complete/src/gf_w8.c: 1147 in gf_w8_table_init()
1141 use_simd = 1;
1142 #else
1143 use_simd = 0;
1144 #endif
1145
1146 if (h->mult_type == GF_MULT_DEFAULT && use_simd) {
>>> CID 1256942: Logically dead code (DEADCODE)
>>> Execution cannot reach this statement "dd = (struct gf_w8_default_...".
1147 dd = (struct gf_w8_default_data *)h->private;
1148 scase = 3;
1149 bzero(dd->high, sizeof(uint8_t) * GF_FIELD_SIZE * GF_HALF_SIZE);
1150 bzero(dd->low, sizeof(uint8_t) * GF_FIELD_SIZE * GF_HALF_SIZE);
1151 bzero(dd->divtable, sizeof(uint8_t) * GF_FIELD_SIZE * GF_FIELD_SIZE);
1152 bzero(dd->multtable, sizeof(uint8_t) * GF_FIELD_SIZE * GF_FIELD_SIZE);
--
Loïc Dachary, Artisan Logiciel Libre
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next reply other threads:[~2014-12-05 15:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-05 15:06 Loic Dachary [this message]
[not found] ` <CA+AFVBjtbVbmq_Hn+-DubpHy2i_eFUhiUhSKmg2dXeGgT=RChA@mail.gmail.com>
2014-12-05 20:42 ` dead code in gf-complete Loic Dachary
2014-12-08 10:34 ` Loic Dachary
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=5481C9EF.1090800@dachary.org \
--to=loic@dachary.org \
--cc=ceph-devel@vger.kernel.org \
--cc=j@jannau.net \
--cc=kmgreen2@gmail.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