From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: bos-Hl0AACgZOF5l57MIdRCFDg@public.gmane.org
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: re: IB/ipath: infiniband verbs support
Date: Wed, 16 Sep 2015 09:30:59 +0300 [thread overview]
Message-ID: <20150916063059.GA23123@mwanda> (raw)
Hello Bryan O'Sullivan,
The patch 6522108f19a9: "IB/ipath: infiniband verbs support" from Mar
29, 2006, leads to the following static checker warning:
drivers/staging/rdma/ipath/ipath_verbs.c:2289 show_hca()
warn: bool is not less than zero.
drivers/staging/rdma/ipath/ipath_verbs.c
2281 static ssize_t show_hca(struct device *device, struct device_attribute *attr,
2282 char *buf)
2283 {
2284 struct ipath_ibdev *dev =
2285 container_of(device, struct ipath_ibdev, ibdev.dev);
2286 int ret;
2287
2288 ret = dev->dd->ipath_f_get_boardname(dev->dd, buf, 128);
2289 if (ret < 0)
ret is either zero or one, not negative. There is some dead code in
ipath_ht_boardname() which indicates that it might have returned error
codes at some point as well.
This warning is from a too many false positives to publish Smatch check.
2290 goto bail;
2291 strcat(buf, "\n");
2292 ret = strlen(buf);
2293
2294 bail:
2295 return ret;
2296 }
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
reply other threads:[~2015-09-16 6:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20150916063059.GA23123@mwanda \
--to=dan.carpenter-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
--cc=bos-Hl0AACgZOF5l57MIdRCFDg@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox