summaryrefslogtreecommitdiff
path: root/drivers/nvme/host
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-03-13 20:55:06 +0300
committerJens Axboe <axboe@kernel.dk>2019-03-13 21:57:34 +0300
commitb1aafb35b45b1d734c670059c125a4ff111a47bd (patch)
treea5aede790a14d433a803480b9cf921a293a3fc64 /drivers/nvme/host
parent7b210e4ed5e281728243799c5e2b84d3f70d4dd1 (diff)
downloadlinux-b1aafb35b45b1d734c670059c125a4ff111a47bd.tar.xz
nvme: remove nvme_ns_config_oncs
Just opencode the two function calls in the caller. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Keith Busch <keith.busch@intel.com> Reviewed-by: Max Gurtovoy <maxg@mellanox.com> Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Tested-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/nvme/host')
-rw-r--r--drivers/nvme/host/core.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 951e9f31b57c..26ae805fc958 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -1552,12 +1552,6 @@ static inline void nvme_config_write_zeroes(struct nvme_ns *ns)
blk_queue_max_write_zeroes_sectors(ns->queue, max_sectors);
}
-static inline void nvme_ns_config_oncs(struct nvme_ns *ns)
-{
- nvme_config_discard(ns);
- nvme_config_write_zeroes(ns);
-}
-
static void nvme_report_ns_ids(struct nvme_ctrl *ctrl, unsigned int nsid,
struct nvme_id_ns *id, struct nvme_ns_ids *ids)
{
@@ -1611,7 +1605,9 @@ static void nvme_update_disk_info(struct gendisk *disk,
capacity = 0;
set_capacity(disk, capacity);
- nvme_ns_config_oncs(ns);
+
+ nvme_config_discard(ns);
+ nvme_config_write_zeroes(ns);
if (id->nsattr & (1 << 0))
set_disk_ro(disk, true);