aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2012-11-03 06:58:37 -0400
committerRoland Dreier <roland@purestorage.com>2012-11-22 03:49:15 -0500
commit079abea6a37fd3b4f7e1b7cf9e4d055463988753 (patch)
treeba577a86e0783d6805a0f8b6da8baf52b9cabece /drivers/infiniband
parentcecdcd5f24be8c532ad8dcbbd93c7b477cfd3413 (diff)
RDMA/nes: Use WARN()
Use WARN() rather than printk() followed by WARN_ON(1), for conciseness. A simplified version of the semantic patch that makes this transformation is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression list es; @@ -printk( +WARN(1, es); -WARN_ON(1); // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> [ Remove extra KERN_ERR from WARN() format. - Roland ] Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/nes/nes_cm.c8
-rw-r--r--drivers/infiniband/hw/nes/nes_mgt.c6
2 files changed, 5 insertions, 9 deletions
diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c
index cfaacaf6bf5f..feb41e74206b 100644
--- a/drivers/infiniband/hw/nes/nes_cm.c
+++ b/drivers/infiniband/hw/nes/nes_cm.c
@@ -629,11 +629,9 @@ static void build_rdma0_msg(struct nes_cm_node *cm_node, struct nes_qp **nesqp_a
629 629
630 case SEND_RDMA_READ_ZERO: 630 case SEND_RDMA_READ_ZERO:
631 default: 631 default:
632 if (cm_node->send_rdma0_op != SEND_RDMA_READ_ZERO) { 632 if (cm_node->send_rdma0_op != SEND_RDMA_READ_ZERO)
633 printk(KERN_ERR "%s[%u]: Unsupported RDMA0 len operation=%u\n", 633 WARN(1, "Unsupported RDMA0 len operation=%u\n",
634 __func__, __LINE__, cm_node->send_rdma0_op); 634 cm_node->send_rdma0_op);
635 WARN_ON(1);
636 }
637 nes_debug(NES_DBG_CM, "Sending first rdma operation.\n"); 635 nes_debug(NES_DBG_CM, "Sending first rdma operation.\n");
638 wqe->wqe_words[NES_IWARP_SQ_WQE_MISC_IDX] = 636 wqe->wqe_words[NES_IWARP_SQ_WQE_MISC_IDX] =
639 cpu_to_le32(NES_IWARP_SQ_OP_RDMAR); 637 cpu_to_le32(NES_IWARP_SQ_OP_RDMAR);
diff --git a/drivers/infiniband/hw/nes/nes_mgt.c b/drivers/infiniband/hw/nes/nes_mgt.c
index 4d6d77fd18b6..416645259b0f 100644
--- a/drivers/infiniband/hw/nes/nes_mgt.c
+++ b/drivers/infiniband/hw/nes/nes_mgt.c
@@ -649,11 +649,9 @@ static void nes_chg_qh_handler(struct nes_device *nesdev, struct nes_cqp_request
649 nesqp = qh_chg->nesqp; 649 nesqp = qh_chg->nesqp;
650 650
651 /* Should we handle the bad completion */ 651 /* Should we handle the bad completion */
652 if (cqp_request->major_code) { 652 if (cqp_request->major_code)
653 printk(KERN_ERR PFX "Invalid cqp_request major_code=0x%x\n", 653 WARN(1, PFX "Invalid cqp_request major_code=0x%x\n",
654 cqp_request->major_code); 654 cqp_request->major_code);
655 WARN_ON(1);
656 }
657 655
658 switch (nesqp->pau_state) { 656 switch (nesqp->pau_state) {
659 case PAU_DEL_QH: 657 case PAU_DEL_QH: