Skip to contentSkip to conversation

ceph:Remove unused goto labels in decode crush map functions

PATCH Ilya Dryomov 1 participant 1 message Oct 3, 2015 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 14 lines · Nicholas Krause

This removes unused goto labels in decode crush map functions related to error paths due to them never being used on any error path for these particular functions in the file, osdmap.c.

---
 net/ceph/osdmap.c | 10 ----------
 1 file changed, 10 deletions(-)
net/ceph/osdmap.c +0 -0
index 7d8f581..2f8e41c 100644

net/ceph/osdmap.c static int crush_decode_uniform_bucket(void **p, void *end, · line 59

Quoted 1 line
net/ceph/osdmap.c +0 -0
@@ -59,8 +59,6 @@ static int crush_decode_uniform_bucket(void **p, void *end,
        ceph_decode_need(p, end, (1+b->h.size) * sizeof(u32), bad);
                                                                ^^^

net/ceph/osdmap.c static int crush_decode_uniform_bucket(void **p, void *end, · line 62

Quoted 3 lines
net/ceph/osdmap.c +0 -1
        b->item_weight = ceph_decode_32(p);
        return 0;
-bad:

^^^

net/ceph/osdmap.c static int crush_decode_uniform_bucket(void **p, void *end, · line 62

Quoted 2 lines
net/ceph/osdmap.c +0 -1
-       return -EINVAL;
 }

I realize that these macros are sneaky, but you should at least compile-test your patches before you send them out.

Thanks,

Ilya