* re: IB/ipath: infiniband verbs support
@ 2015-09-16 6:30 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2015-09-16 6:30 UTC (permalink / raw)
To: bos-Hl0AACgZOF5l57MIdRCFDg; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-09-16 6:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-16 6:30 IB/ipath: infiniband verbs support Dan Carpenter
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.