From: Dan Carpenter <dan.carpenter@oracle.com>
To: dave.jiang@intel.com
Cc: linux-ntb@googlegroups.com
Subject: re: NTB: Use unique DMA channels for TX and RX
Date: Wed, 16 Sep 2015 17:12:53 +0300 [thread overview]
Message-ID: <20150916141253.GA7674@mwanda> (raw)
Hello Dave Jiang,
This is a semi-automatic email about new static checker warnings.
The patch 569410ca756c: "NTB: Use unique DMA channels for TX and RX"
from Jul 13, 2015, leads to the following Smatch complaint:
drivers/ntb/ntb_transport.c:2008 ntb_transport_max_size()
error: we previously assumed 'qp->tx_dma_chan' could be null (see line 2005)
drivers/ntb/ntb_transport.c
2004
2005 if (!qp->tx_dma_chan && !qp->rx_dma_chan)
Patch adds new checks for NULL. Was || intended here perhaps?
2006 return qp->tx_max_frame - sizeof(struct ntb_payload_header);
2007
2008 copy_align = max(qp->tx_dma_chan->device->copy_align,
2009 qp->rx_dma_chan->device->copy_align);
Patch adds unchecked dereferences.
2010
regards,
dan carpenter
next reply other threads:[~2015-09-16 14:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-16 14:12 Dan Carpenter [this message]
2015-09-16 14:41 ` NTB: Use unique DMA channels for TX and RX Allen Hubbe
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=20150916141253.GA7674@mwanda \
--to=dan.carpenter@oracle.com \
--cc=dave.jiang@intel.com \
--cc=linux-ntb@googlegroups.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox