From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: re: Add support of Cavium Liquidio ethernet adapters
Date: Tue, 23 Jun 2015 14:24:08 +0000 [thread overview]
Message-ID: <20150623142408.GA10121@mwanda> (raw)
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
next reply other threads:[~2015-06-23 14:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-23 14:24 Dan Carpenter [this message]
2015-06-25 9:27 ` Add support of Cavium Liquidio ethernet adapters Dan Carpenter
2015-06-26 9:04 ` Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150623142408.GA10121@mwanda \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.