summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/nes/nes_mgt.c
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2012-11-03 10:58:37 +0000
committerRoland Dreier <roland@purestorage.com>2012-11-22 00:49:15 -0800
commit079abea6a37fd3b4f7e1b7cf9e4d055463988753 (patch)
treeba577a86e0783d6805a0f8b6da8baf52b9cabece /drivers/infiniband/hw/nes/nes_mgt.c
parentcecdcd5f24be8c532ad8dcbbd93c7b477cfd3413 (diff)
downloadblackbird-op-linux-079abea6a37fd3b4f7e1b7cf9e4d055463988753.tar.gz
blackbird-op-linux-079abea6a37fd3b4f7e1b7cf9e4d055463988753.zip
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/hw/nes/nes_mgt.c')
-rw-r--r--drivers/infiniband/hw/nes/nes_mgt.c6
1 files changed, 2 insertions, 4 deletions
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
nesqp = qh_chg->nesqp;
/* Should we handle the bad completion */
- if (cqp_request->major_code) {
- printk(KERN_ERR PFX "Invalid cqp_request major_code=0x%x\n",
+ if (cqp_request->major_code)
+ WARN(1, PFX "Invalid cqp_request major_code=0x%x\n",
cqp_request->major_code);
- WARN_ON(1);
- }
switch (nesqp->pau_state) {
case PAU_DEL_QH:
OpenPOWER on IntegriCloud