nvmet: Fixed avoided printing nvmet: twice in error logs.
authorParav Pandit <parav@mellanox.com>
Tue, 28 Feb 2017 05:21:02 +0000 (23:21 -0600)
committerJens Axboe <axboe@fb.com>
Tue, 4 Apr 2017 15:48:23 +0000 (09:48 -0600)
This patch avoids printing "nvmet:" twice in error logs as its already
coming through pr_fmt macro.

Reviewed-by: Max Gurtovoy <maxg@mellanox.com>
Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/nvme/target/admin-cmd.c
drivers/nvme/target/core.c
drivers/nvme/target/discovery.c
drivers/nvme/target/io-cmd.c

index a7bcff45f4376d3b0c375bc1df6af3d2ca5c8c2e..42b8bba97e7d253e01b7302ff2d72d35b90613f3 100644 (file)
@@ -487,13 +487,13 @@ int nvmet_parse_admin_cmd(struct nvmet_req *req)
        req->ns = NULL;
 
        if (unlikely(!(req->sq->ctrl->cc & NVME_CC_ENABLE))) {
-               pr_err("nvmet: got admin cmd %d while CC.EN == 0\n",
-                               cmd->common.opcode);
+               pr_err("got admin cmd %d while CC.EN == 0\n",
+                      cmd->common.opcode);
                return NVME_SC_CMD_SEQ_ERROR | NVME_SC_DNR;
        }
        if (unlikely(!(req->sq->ctrl->csts & NVME_CSTS_RDY))) {
-               pr_err("nvmet: got admin cmd %d while CSTS.RDY == 0\n",
-                               cmd->common.opcode);
+               pr_err("got admin cmd %d while CSTS.RDY == 0\n",
+                      cmd->common.opcode);
                return NVME_SC_CMD_SEQ_ERROR | NVME_SC_DNR;
        }
 
@@ -545,6 +545,6 @@ int nvmet_parse_admin_cmd(struct nvmet_req *req)
                return 0;
        }
 
-       pr_err("nvmet: unhandled cmd %d\n", cmd->common.opcode);
+       pr_err("unhandled cmd %d\n", cmd->common.opcode);
        return NVME_SC_INVALID_OPCODE | NVME_SC_DNR;
 }
index 798653b329b28cb8925cfab4993cc5c6b6afc147..2536119a580da4fd0d68c606c3af1c93adbb18fb 100644 (file)
@@ -273,8 +273,8 @@ int nvmet_ns_enable(struct nvmet_ns *ns)
        ns->bdev = blkdev_get_by_path(ns->device_path, FMODE_READ | FMODE_WRITE,
                        NULL);
        if (IS_ERR(ns->bdev)) {
-               pr_err("nvmet: failed to open block device %s: (%ld)\n",
-                       ns->device_path, PTR_ERR(ns->bdev));
+               pr_err("failed to open block device %s: (%ld)\n",
+                      ns->device_path, PTR_ERR(ns->bdev));
                ret = PTR_ERR(ns->bdev);
                ns->bdev = NULL;
                goto out_unlock;
index af8aabf0533504971bef38fbdd02c3943b805a5f..745f26f35244ee825a6ab9dc8e1563b56d57dd8b 100644 (file)
@@ -166,8 +166,8 @@ int nvmet_parse_discovery_cmd(struct nvmet_req *req)
        req->ns = NULL;
 
        if (unlikely(!(req->sq->ctrl->csts & NVME_CSTS_RDY))) {
-               pr_err("nvmet: got cmd %d while not ready\n",
-                               cmd->common.opcode);
+               pr_err("got cmd %d while not ready\n",
+                      cmd->common.opcode);
                return NVME_SC_INVALID_OPCODE | NVME_SC_DNR;
        }
 
@@ -180,8 +180,8 @@ int nvmet_parse_discovery_cmd(struct nvmet_req *req)
                        req->execute = nvmet_execute_get_disc_log_page;
                        return 0;
                default:
-                       pr_err("nvmet: unsupported get_log_page lid %d\n",
-                               cmd->get_log_page.lid);
+                       pr_err("unsupported get_log_page lid %d\n",
+                              cmd->get_log_page.lid);
                return NVME_SC_INVALID_OPCODE | NVME_SC_DNR;
                }
        case nvme_admin_identify:
@@ -192,17 +192,16 @@ int nvmet_parse_discovery_cmd(struct nvmet_req *req)
                                nvmet_execute_identify_disc_ctrl;
                        return 0;
                default:
-                       pr_err("nvmet: unsupported identify cns %d\n",
-                               cmd->identify.cns);
+                       pr_err("unsupported identify cns %d\n",
+                              cmd->identify.cns);
                        return NVME_SC_INVALID_OPCODE | NVME_SC_DNR;
                }
        default:
-               pr_err("nvmet: unsupported cmd %d\n",
-                               cmd->common.opcode);
+               pr_err("unsupported cmd %d\n", cmd->common.opcode);
                return NVME_SC_INVALID_OPCODE | NVME_SC_DNR;
        }
 
-       pr_err("nvmet: unhandled cmd %d\n", cmd->common.opcode);
+       pr_err("unhandled cmd %d\n", cmd->common.opcode);
        return NVME_SC_INVALID_OPCODE | NVME_SC_DNR;
 }
 
index 4195115c7e5493be02acc7b4daddbfd2427c831e..190b68741a6ae88173894c3c950dde0f088a30dd 100644 (file)
@@ -201,15 +201,15 @@ int nvmet_parse_io_cmd(struct nvmet_req *req)
        struct nvme_command *cmd = req->cmd;
 
        if (unlikely(!(req->sq->ctrl->cc & NVME_CC_ENABLE))) {
-               pr_err("nvmet: got io cmd %d while CC.EN == 0\n",
-                               cmd->common.opcode);
+               pr_err("got io cmd %d while CC.EN == 0\n",
+                      cmd->common.opcode);
                req->ns = NULL;
                return NVME_SC_CMD_SEQ_ERROR | NVME_SC_DNR;
        }
 
        if (unlikely(!(req->sq->ctrl->csts & NVME_CSTS_RDY))) {
-               pr_err("nvmet: got io cmd %d while CSTS.RDY == 0\n",
-                               cmd->common.opcode);
+               pr_err("got io cmd %d while CSTS.RDY == 0\n",
+                      cmd->common.opcode);
                req->ns = NULL;
                return NVME_SC_CMD_SEQ_ERROR | NVME_SC_DNR;
        }
@@ -237,7 +237,7 @@ int nvmet_parse_io_cmd(struct nvmet_req *req)
                req->execute = nvmet_execute_write_zeroes;
                return 0;
        default:
-               pr_err("nvmet: unhandled cmd %d\n", cmd->common.opcode);
+               pr_err("unhandled cmd %d\n", cmd->common.opcode);
                return NVME_SC_INVALID_OPCODE | NVME_SC_DNR;
        }
 }