drivers/net/ns83820.c: remove unused code
RFC PATCH 1/1 drivers/net/ns83820.c: remove unused code
The Coveity checker found that residue is always 0.
Is this patch correct or should residue have been used?
Signed-off-by Adrian Bunk <[email protected]>
drivers/net/ns83820.c renamed from drivers/net/ns83820.c.old +1 -8
@@ -1189,7 +1189,6 @@for (;;) {volatile u32 *desc = dev->tx_descs + (free_idx *DESC_SIZE ); -u32 residue =0 ;dprintk ("frag[%3u]: %4u @ 0x%08Lx\n" , free_idx, len, (unsigned long long )buf);
@@ -1199,17 +1198,11 @@desc_addr_set (desc +DESC_BUFPTR , buf); desc[DESC_EXTSTS ] =cpu_to_le32 (extsts); - cmdsts = ((nr_frags|residue) ?CMDSTS_MORE : do_intr ?CMDSTS_INTR :0 ); + cmdsts = ((nr_frags) ?CMDSTS_MORE : do_intr ?CMDSTS_INTR :0 ); cmdsts |= (desc == first_desc) ?0 :CMDSTS_OWN ; cmdsts |= len; desc[DESC_CMDSTS ] =cpu_to_le32 (cmdsts); -if (residue) { - buf += len; - len = residue; -continue ; - } -if (!nr_frags)break ;
Benjamin LaHaise
Appliedapplied
Quoted 39 lines · Adrian Bunk
The Coveity checker found that residue is always 0.
Is this patch correct or should residue have been used?
Signed-off-by Adrian Bunk <[email protected]>drivers/net/ns83820.c renamed from drivers/net/ns83820.c.old +1
-9@@ -1189,7 +1189,6 @@for (;;) {volatile u32 *desc = dev->tx_descs + (free_idx *DESC_SIZE ); -u32 residue =0 ;dprintk ("frag[%3u]: %4u @ 0x%08Lx\n" , free_idx, len, (unsigned long long )buf);@@ -1199,17 +1198,11 @@desc_addr_set (desc +DESC_BUFPTR , buf); desc[DESC_EXTSTS ] =cpu_to_le32 (extsts); - cmdsts = ((nr_frags|residue) ?CMDSTS_MORE : do_intr ?CMDSTS_INTR :0 ); + cmdsts = ((nr_frags) ?CMDSTS_MORE : do_intr ?CMDSTS_INTR :0 ); cmdsts |= (desc == first_desc) ?0 :CMDSTS_OWN ; cmdsts |= len; desc[DESC_CMDSTS ] =cpu_to_le32 (cmdsts); -if (residue) { - buf += len; - len = residue; -continue ; - } -if (!nr_frags)break ; --To unsubscribe, send a message with 'unsubscribe linux-ns83820' in the body to [email protected].
Signature · 1 line
"Time is what keeps everything from happening all at once." -- John Wheeler