linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: mlin@kernel.org (Ming Lin)
Subject: [PATCH 3/4] nvme: split dev_list_lock
Date: Mon,  8 Feb 2016 14:24:43 -0800	[thread overview]
Message-ID: <1454970284-29543-4-git-send-email-mlin@kernel.org> (raw)
In-Reply-To: <1454970284-29543-1-git-send-email-mlin@kernel.org>

Split dev_list_lock into one in the core and one in the PCI driver.

Signed-off-by: Ming Lin <ming.l at ssi.samsung.com>
---
 drivers/nvme/host/core.c | 2 +-
 drivers/nvme/host/nvme.h | 2 --
 drivers/nvme/host/pci.c  | 1 +
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 8e4b8ac..3928366 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -54,7 +54,7 @@ static int nvme_char_major;
 module_param(nvme_char_major, int, 0);
 
 static LIST_HEAD(nvme_ctrl_list);
-DEFINE_SPINLOCK(dev_list_lock);
+static DEFINE_SPINLOCK(dev_list_lock);
 
 static struct class *nvme_class;
 
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index 4fb5bb7..3cea0ed 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -265,8 +265,6 @@ int nvme_set_features(struct nvme_ctrl *dev, unsigned fid, unsigned dword11,
 			dma_addr_t dma_addr, u32 *result);
 int nvme_set_queue_count(struct nvme_ctrl *ctrl, int *count);
 
-extern spinlock_t dev_list_lock;
-
 struct sg_io_hdr;
 
 int nvme_sg_io(struct nvme_ns *ns, struct sg_io_hdr __user *u_hdr);
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index deba7ac..9797595 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -65,6 +65,7 @@ module_param(use_cmb_sqes, bool, 0644);
 MODULE_PARM_DESC(use_cmb_sqes, "use controller's memory buffer for I/O SQes");
 
 static LIST_HEAD(dev_list);
+static DEFINE_SPINLOCK(dev_list_lock);
 static struct task_struct *nvme_thread;
 static struct workqueue_struct *nvme_workq;
 static wait_queue_head_t nvme_kthread_wait;
-- 
1.9.1

  parent reply	other threads:[~2016-02-08 22:24 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-08 22:24 [PATCH 0/4] nvme: split pci module out of core module Ming Lin
2016-02-08 22:24 ` [PATCH 1/4] nvme: move timeout variables to core.c and export it Ming Lin
2016-02-09  9:25   ` Christoph Hellwig
2016-02-09 12:43   ` Johannes Thumshirn
2016-02-09 12:46   ` Matias Bjørling
2016-02-08 22:24 ` [PATCH 2/4] nvme: export more symbols Ming Lin
2016-02-09  9:25   ` Christoph Hellwig
2016-02-09 12:42   ` Johannes Thumshirn
2016-02-09 12:56   ` Matias Bjørling
2016-02-09 13:07     ` Christoph Hellwig
2016-02-08 22:24 ` Ming Lin [this message]
2016-02-09  9:26   ` [PATCH 3/4] nvme: split dev_list_lock Christoph Hellwig
2016-02-09 12:41   ` Johannes Thumshirn
2016-02-09 13:14     ` Christoph Hellwig
2016-02-09 13:34       ` Johannes Thumshirn
2016-02-08 22:24 ` [PATCH 4/4] nvme: split pci module out of core module Ming Lin
2016-02-09  8:56   ` Johannes Thumshirn
2016-02-09 18:26     ` Ming Lin
2016-02-10 13:35       ` Michal Marek
2016-02-09  9:26   ` Christoph Hellwig
2016-02-10  0:09     ` Ming Lin
2016-02-10 15:12   ` Keith Busch
2016-02-10 15:31     ` Ming Lin
2016-02-09  9:24 ` [PATCH 0/4] " Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1454970284-29543-4-git-send-email-mlin@kernel.org \
    --to=mlin@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).