IB/hfi1: add driver files
Hello Mike Marciniszyn,
The patch 7724105686e7: "IB/hfi1: add driver files" from Jul 30, 2015, leads to the following static checker warning:
drivers/infiniband/hw/hfi1/user_sdma.c:1438 set_txreq_header_ahg() warn: mask and shift to zero
drivers/infiniband/hw/hfi1/user_sdma.c
1436 /* Clear KDETH.SH on last packet */
1437 if (unlikely(tx->flags & TXREQ_FLAGS_REQ_LAST_PKT)) {
1438 val |= cpu_to_le16(KDETH_GET(hdr->kdeth.ver_tid_offset,
1439 INTR) >> 16);
The >> 16 should probably be deleted. My guess is that it's left over from an open coded byte swap?
1440 val &= cpu_to_le16(~(1U << 13));
1441 AHG_HEADER_SET(req->ahg, diff, 7, 16, 14, val);
1442 } else {
1443 AHG_HEADER_SET(req->ahg, diff, 7, 16, 12, val);
1444 }regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 14 lines
The patch
7724105686e7: "IB/hfi1: add driver files" from Jul 30, 2015, leads to the following static checker warning:drivers/infiniband/hw/hfi1/user_sdma.c:1438
set_txreq_header_ahg()
warn: mask and shift to zero
drivers/infiniband/hw/hfi1/user_sdma.c
1436 /* Clear KDETH.SH on last packet */
1437 if (unlikely(tx->flags & TXREQ_FLAGS_REQ_LAST_PKT)) {
1438 val |= cpu_to_le16(KDETH_GET(hdr-Quoted 1 line
kdeth.ver_tid_offset,
1439 INTR) >> 16);
Quoted 9 lines
The >> 16 should probably be deleted. My guess is that it's left over from an open coded byte swap?
1440 val &= cpu_to_le16(~(1U << 13)); 1441 AHG_HEADER_SET(req->ahg, diff, 7, 16, 14, val); 1442 } else { 1443 AHG_HEADER_SET(req->ahg, diff, 7, 16, 12, val); 1444 }
Dan, what static checker shows this?
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html