All of lore.kernel.org
 help / color / mirror / Atom feed
* dead code in gf-complete
@ 2014-12-05 15:06 Loic Dachary
       [not found] ` <CA+AFVBjtbVbmq_Hn+-DubpHy2i_eFUhiUhSKmg2dXeGgT=RChA@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Loic Dachary @ 2014-12-05 15:06 UTC (permalink / raw)
  To: Kevin Greenan, Janne Grunau; +Cc: Ceph Development

[-- 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 --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-12-08 10:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-05 15:06 dead code in gf-complete Loic Dachary
     [not found] ` <CA+AFVBjtbVbmq_Hn+-DubpHy2i_eFUhiUhSKmg2dXeGgT=RChA@mail.gmail.com>
2014-12-05 20:42   ` Loic Dachary
2014-12-08 10:34   ` Loic Dachary

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.