public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* re: Add support of Cavium Liquidio ethernet adapters
@ 2015-06-23 14:24 Dan Carpenter
  2015-06-25  9:27 ` Dan Carpenter
  2015-06-26  9:04 ` Dan Carpenter
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2015-06-23 14:24 UTC (permalink / raw)
  To: kernel-janitors

Hello Raghu Vatsavayi,

The patch f21fb3ed364b: "Add support of Cavium Liquidio ethernet
adapters" from Jun 9, 2015, leads to the following static checker
warning:

	drivers/net/ethernet/cavium/liquidio/lio_main.c:2530 handle_timestamp()
	warn: suspicious bitop condition

drivers/net/ethernet/cavium/liquidio/lio_main.c
  2529  
  2530          if (unlikely((skb_shinfo(skb)->tx_flags | SKBTX_IN_PROGRESS) != 0)) {

Don't use unlikely() unless you have benchmark data to prove that it's
worth the extra difficulty in reading.

Double negatives like != 0 don't not make things more difficult to read.

This condition is always true, so that's probably a bug.  & vs |.

  2531                  struct skb_shared_hwtstamps ts;
  2532                  u64 ns = resp->timestamp;

regards,
dan carpenter

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

end of thread, other threads:[~2015-06-26  9:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-23 14:24 Add support of Cavium Liquidio ethernet adapters Dan Carpenter
2015-06-25  9:27 ` Dan Carpenter
2015-06-26  9:04 ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox