How to handle "status = 0 && id_priv->cma_dev !=NULL"? "if (!status && !id_priv->cma_dev)" is false. "} else if (status) {" is also false. Zhu Yanjun On 2019/6/5 21:40, Håkon Bugge wrote:
Said function contains: if (!status && !id_priv->cma_dev) { status = cma_acquire_dev_by_src_ip(id_priv); if (status) pr_debug_ratelimited("RDMA CM: ADDR_ERROR: failed to acquire device. status %d\n", status); } else { pr_debug_ratelimited("RDMA CM: ADDR_ERROR: failed to resolve IP. status %d\n", status); } Now, assuming status == 0 and the device already has been acquired (id_priv->cma_dev != NULL), we get the "error" message: RDMA CM: ADDR_ERROR: failed to resolve IP. status 0 Probably not intentional. So, would we agree to have: } else if (status) { pr_debug_ratelimited("RDMA CM: ADDR_ERROR: failed to resolve IP. status %d\n", status); } instead? Thxs, Håkon