re: Add support of Cavium Liquidio ethernet adapters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux