IB/rxe: Use __func__ to print function's name
authorKamal Heib <kamalheib1@gmail.com>
Thu, 15 Jun 2017 08:29:06 +0000 (11:29 +0300)
committerDoug Ledford <dledford@redhat.com>
Mon, 24 Jul 2017 12:43:12 +0000 (08:43 -0400)
Its better to use __func__ to print functions name instead of writing
the name in the print statement.

Signed-off-by: Kamal Heib <kamalh@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/sw/rxe/rxe_task.c
drivers/infiniband/sw/rxe/rxe_verbs.c

index d2a14a1bdc7f9977cfaf3eabe89ed32a1e0a990a..ea3810b2927367885ef42e4487729e4bb37e43d4 100644 (file)
@@ -78,7 +78,7 @@ void rxe_do_task(unsigned long data)
 
        default:
                spin_unlock_irqrestore(&task->state_lock, flags);
-               pr_warn("bad state = %d in rxe_do_task\n", task->state);
+               pr_warn("%s failed with bad state %d\n", __func__, task->state);
                return;
        }
 
@@ -105,7 +105,7 @@ void rxe_do_task(unsigned long data)
                        break;
 
                default:
-                       pr_warn("bad state = %d in rxe_do_task\n",
+                       pr_warn("%s failed with bad state %d\n", __func__,
                                task->state);
                }
                spin_unlock_irqrestore(&task->state_lock, flags);
index ceab12a91d0c6790343408da7034ab4514cc6041..aba3fa9ae5992f2696e043d12cc2a5a3c29511f1 100644 (file)
@@ -1336,15 +1336,15 @@ int rxe_register_device(struct rxe_dev *rxe)
 
        err = ib_register_device(dev, NULL);
        if (err) {
-               pr_warn("rxe_register_device failed, err = %d\n", err);
+               pr_warn("%s failed with error %d\n", __func__, err);
                goto err1;
        }
 
        for (i = 0; i < ARRAY_SIZE(rxe_dev_attributes); ++i) {
                err = device_create_file(&dev->dev, rxe_dev_attributes[i]);
                if (err) {
-                       pr_warn("device_create_file failed, i = %d, err = %d\n",
-                               i, err);
+                       pr_warn("%s failed with error %d for attr number %d\n",
+                               __func__, err, i);
                        goto err2;
                }
        }