* hippi: dead code issue on skb->data DMA limitations check
@ 2019-09-18 12:07 Colin Ian King
0 siblings, 0 replies; only message in thread
From: Colin Ian King @ 2019-09-18 12:07 UTC (permalink / raw)
To: Jes Sorensen, David S. Miller, open list:HIPPI, netdev; +Cc: linux-kernel
Hi there,
Static analysis with Coverity has detected an issue in rr_init1() in
drivers/net/hippi/rrunner.c as follows:
CID 13516 (#1 of 1): Operands don't affect result
(CONSTANT_EXPRESSION_RESULT)
result_independent_of_operands: ((unsigned long)skb->data & 4095) >
18446744073709486295UL /* ~0xff28 */ is always false regardless of the
values of its operands. This occurs as the logical operand of if.
653 /*
654 * Sanity test to see if we conflict with the DMA
655 * limitations of the Roadrunner.
656 */
657 if ((((unsigned long)skb->data) & 0xfff) > ~65320)
CID 14371: Logically dead code (DEADCODE)
658 printk("skb alloc error\n");
659
Given that this check is currently dead code and it's been in the driver
for ages, should we just throw this check away or fix it? I'm not
entirely sure what the original intent was, so I'm not clear on a fix.
Colin
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-09-18 12:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-18 12:07 hippi: dead code issue on skb->data DMA limitations check Colin Ian King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox