Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1659637 > unrolled thread

[PATCH v6 10/10] nvme: use ctrl->device consistently for logging

Started byJohannes Thumshirn <jthumshirn@suse.de>
First post2017-06-07 12:00 +0200
Last post2017-06-08 23:10 +0200
Articles 4 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v6 10/10] nvme: use ctrl->device consistently for logging Johannes Thumshirn <jthumshirn@suse.de> - 2017-06-07 12:00 +0200
    Re: [PATCH v6 10/10] nvme: use ctrl->device consistently for logging Sagi Grimberg <sagi@grimberg.me> - 2017-06-07 12:10 +0200
    Re: [PATCH v6 10/10] nvme: use ctrl->device consistently for logging kbuild test robot <lkp@intel.com> - 2017-06-08 17:20 +0200
    Re: [PATCH v6 10/10] nvme: use ctrl->device consistently for logging kbuild test robot <lkp@intel.com> - 2017-06-08 23:10 +0200

#1659637 — [PATCH v6 10/10] nvme: use ctrl->device consistently for logging

FromJohannes Thumshirn <jthumshirn@suse.de>
Date2017-06-07 12:00 +0200
Subject[PATCH v6 10/10] nvme: use ctrl->device consistently for logging
Message-ID<tPFUS-4WH-27@gated-at.bofh.it>
Change the few left over users of ctrl->dev over to using ctrl->device
for logging purposes, so we consistently use the same device.

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
---
 drivers/nvme/host/core.c | 10 +++++-----
 drivers/nvme/host/fc.c   | 12 ++++++------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 462187a4047b..c427a7fc31ae 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -823,7 +823,7 @@ int nvme_set_queue_count(struct nvme_ctrl *ctrl, int *count)
 	 * access to the admin queue, as that might be only way to fix them up.
 	 */
 	if (status > 0) {
-		dev_err(ctrl->dev, "Could not set queue count (%d)\n", status);
+		dev_err(ctrl->device, "Could not set queue count (%d)\n", status);
 		*count = 0;
 	} else {
 		nr_io_queues = min(result & 0xffff, result >> 16) + 1;
@@ -1658,7 +1658,7 @@ int nvme_init_identify(struct nvme_ctrl *ctrl)
 	}
 
 	if (force_apst && (ctrl->quirks & NVME_QUIRK_NO_DEEPEST_PS)) {
-		dev_warn(ctrl->dev, "forcibly allowing all power states due to nvme_core.force_apst -- use at your own risk\n");
+		dev_warn(ctrl->device, "forcibly allowing all power states due to nvme_core.force_apst -- use at your own risk\n");
 		ctrl->quirks &= ~NVME_QUIRK_NO_DEEPEST_PS;
 	}
 
@@ -1686,7 +1686,7 @@ int nvme_init_identify(struct nvme_ctrl *ctrl)
 	prev_apsta = ctrl->apsta;
 	if (ctrl->quirks & NVME_QUIRK_NO_APST) {
 		if (force_apst && id->apsta) {
-			dev_warn(ctrl->dev, "forcibly allowing APST due to nvme_core.force_apst -- use at your own risk\n");
+			dev_warn(ctrl->device, "forcibly allowing APST due to nvme_core.force_apst -- use at your own risk\n");
 			ctrl->apsta = 1;
 		} else {
 			ctrl->apsta = 0;
@@ -1710,7 +1710,7 @@ int nvme_init_identify(struct nvme_ctrl *ctrl)
 			ret = -EINVAL;
 
 		if (!ctrl->opts->discovery_nqn && !ctrl->kas) {
-			dev_err(ctrl->dev,
+			dev_err(ctrl->device,
 				"keep-alive support is mandatory for fabrics\n");
 			ret = -EINVAL;
 		}
@@ -2155,7 +2155,7 @@ static void nvme_alloc_ns(struct nvme_ctrl *ctrl, unsigned nsid)
 
 	if (nvme_nvm_ns_supported(ns, id) &&
 				nvme_nvm_register(ns, disk_name, node)) {
-		dev_warn(ctrl->dev, "%s: LightNVM init failure\n", __func__);
+		dev_warn(ctrl->device, "%s: LightNVM init failure\n", __func__);
 		goto out_free_id;
 	}
 
diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
index 96b983bb44bd..cab459d63df5 100644
--- a/drivers/nvme/host/fc.c
+++ b/drivers/nvme/host/fc.c
@@ -928,7 +928,7 @@ nvme_fc_connect_admin_queue(struct nvme_fc_ctrl *ctrl,
 
 	if (fcret) {
 		ret = -EBADF;
-		dev_err(ctrl->dev,
+		dev_err(ctrl->device,
 			"q %d connect failed: %s\n",
 			queue->qnum, validation_errors[fcret]);
 	} else {
@@ -943,7 +943,7 @@ nvme_fc_connect_admin_queue(struct nvme_fc_ctrl *ctrl,
 	kfree(lsop);
 out_no_memory:
 	if (ret)
-		dev_err(ctrl->dev,
+		dev_err(ctrl->device,
 			"queue %d connect admin queue failed (%d).\n",
 			queue->qnum, ret);
 	return ret;
@@ -1027,7 +1027,7 @@ nvme_fc_connect_queue(struct nvme_fc_ctrl *ctrl, struct nvme_fc_queue *queue,
 
 	if (fcret) {
 		ret = -EBADF;
-		dev_err(ctrl->dev,
+		dev_err(ctrl->device,
 			"q %d connect failed: %s\n",
 			queue->qnum, validation_errors[fcret]);
 	} else {
@@ -1040,7 +1040,7 @@ nvme_fc_connect_queue(struct nvme_fc_ctrl *ctrl, struct nvme_fc_queue *queue,
 	kfree(lsop);
 out_no_memory:
 	if (ret)
-		dev_err(ctrl->dev,
+		dev_err(ctrl->device,
 			"queue %d connect command failed (%d).\n",
 			queue->qnum, ret);
 	return ret;
@@ -1408,7 +1408,7 @@ __nvme_fc_init_request(struct nvme_fc_ctrl *ctrl,
 	op->fcp_req.cmddma = fc_dma_map_single(ctrl->lport->dev,
 				&op->cmd_iu, sizeof(op->cmd_iu), DMA_TO_DEVICE);
 	if (fc_dma_mapping_error(ctrl->lport->dev, op->fcp_req.cmddma)) {
-		dev_err(ctrl->dev,
+		dev_err(ctrl->device,
 			"FCP Op failed - cmdiu dma mapping failed.\n");
 		ret = EFAULT;
 		goto out_on_error;
@@ -1418,7 +1418,7 @@ __nvme_fc_init_request(struct nvme_fc_ctrl *ctrl,
 				&op->rsp_iu, sizeof(op->rsp_iu),
 				DMA_FROM_DEVICE);
 	if (fc_dma_mapping_error(ctrl->lport->dev, op->fcp_req.rspdma)) {
-		dev_err(ctrl->dev,
+		dev_err(ctrl->device,
 			"FCP Op failed - rspiu dma mapping failed.\n");
 		ret = EFAULT;
 	}
-- 
2.12.3

[toc] | [next] | [standalone]


#1659642

FromSagi Grimberg <sagi@grimberg.me>
Date2017-06-07 12:10 +0200
Message-ID<tPG4x-5f5-13@gated-at.bofh.it>
In reply to#1659637
Thanks,

Reviewed-by: Sagi Grimberg <sagi@grimberg.me>

[toc] | [prev] | [next] | [standalone]


#1661371

Fromkbuild test robot <lkp@intel.com>
Date2017-06-08 17:20 +0200
Message-ID<tQ7o6-5X8-15@gated-at.bofh.it>
In reply to#1659637

[Multipart message — attachments visible in raw view] — view raw

Hi Johannes,

[auto build test ERROR on block/for-next]
[also build test ERROR on v4.12-rc4 next-20170608]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Johannes-Thumshirn/Implement-NVMe-Namespace-Descriptor-Identification/20170608-203614
base:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: i386-randconfig-x018-201723 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   drivers/nvme/host/fc.c: In function 'nvme_fc_connect_admin_queue':
>> drivers/nvme/host/fc.c:932:15: error: 'struct nvme_fc_ctrl' has no member named 'device'; did you mean 'dev'?
      dev_err(ctrl->device,
                  ^~
   drivers/nvme/host/fc.c:947:15: error: 'struct nvme_fc_ctrl' has no member named 'device'; did you mean 'dev'?
      dev_err(ctrl->device,
                  ^~
   drivers/nvme/host/fc.c: In function 'nvme_fc_connect_queue':
   drivers/nvme/host/fc.c:1031:15: error: 'struct nvme_fc_ctrl' has no member named 'device'; did you mean 'dev'?
      dev_err(ctrl->device,
                  ^~
   drivers/nvme/host/fc.c:1044:15: error: 'struct nvme_fc_ctrl' has no member named 'device'; did you mean 'dev'?
      dev_err(ctrl->device,
                  ^~
   drivers/nvme/host/fc.c: In function '__nvme_fc_init_request':
   drivers/nvme/host/fc.c:1412:15: error: 'struct nvme_fc_ctrl' has no member named 'device'; did you mean 'dev'?
      dev_err(ctrl->device,
                  ^~
   drivers/nvme/host/fc.c:1422:15: error: 'struct nvme_fc_ctrl' has no member named 'device'; did you mean 'dev'?
      dev_err(ctrl->device,
                  ^~

vim +932 drivers/nvme/host/fc.c

   926		else if (assoc_acc->connectid.desc_len !=
   927				fcnvme_lsdesc_len(sizeof(struct fcnvme_lsdesc_conn_id)))
   928			fcret = VERR_CONN_ID_LEN;
   929	
   930		if (fcret) {
   931			ret = -EBADF;
 > 932			dev_err(ctrl->device,
   933				"q %d connect failed: %s\n",
   934				queue->qnum, validation_errors[fcret]);
   935		} else {

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[toc] | [prev] | [next] | [standalone]


#1661694

Fromkbuild test robot <lkp@intel.com>
Date2017-06-08 23:10 +0200
Message-ID<tQcQO-XZ-25@gated-at.bofh.it>
In reply to#1659637

[Multipart message — attachments visible in raw view] — view raw

Hi Johannes,

[auto build test ERROR on block/for-next]
[also build test ERROR on v4.12-rc4 next-20170608]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Johannes-Thumshirn/Implement-NVMe-Namespace-Descriptor-Identification/20170608-203614
base:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: i386-randconfig-a0-06050003 (attached as .config)
compiler: gcc-5 (Debian 5.4.1-2) 5.4.1 20160904
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   drivers/nvme//host/fc.c: In function 'nvme_fc_connect_admin_queue':
>> drivers/nvme//host/fc.c:932:15: error: 'struct nvme_fc_ctrl' has no member named 'device'
      dev_err(ctrl->device,
                  ^
   drivers/nvme//host/fc.c:947:15: error: 'struct nvme_fc_ctrl' has no member named 'device'
      dev_err(ctrl->device,
                  ^
   drivers/nvme//host/fc.c: In function 'nvme_fc_connect_queue':
   drivers/nvme//host/fc.c:1031:15: error: 'struct nvme_fc_ctrl' has no member named 'device'
      dev_err(ctrl->device,
                  ^
   drivers/nvme//host/fc.c:1044:15: error: 'struct nvme_fc_ctrl' has no member named 'device'
      dev_err(ctrl->device,
                  ^
   drivers/nvme//host/fc.c: In function '__nvme_fc_init_request':
   drivers/nvme//host/fc.c:1412:15: error: 'struct nvme_fc_ctrl' has no member named 'device'
      dev_err(ctrl->device,
                  ^
   drivers/nvme//host/fc.c:1422:15: error: 'struct nvme_fc_ctrl' has no member named 'device'
      dev_err(ctrl->device,
                  ^

vim +932 drivers/nvme//host/fc.c

   926		else if (assoc_acc->connectid.desc_len !=
   927				fcnvme_lsdesc_len(sizeof(struct fcnvme_lsdesc_conn_id)))
   928			fcret = VERR_CONN_ID_LEN;
   929	
   930		if (fcret) {
   931			ret = -EBADF;
 > 932			dev_err(ctrl->device,
   933				"q %d connect failed: %s\n",
   934				queue->qnum, validation_errors[fcret]);
   935		} else {

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web