]> www.infradead.org Git - users/sagi/libnvme.git/commitdiff
Remove nvme_init_id_ns
authorBrandon Paupore <brandon.paupore@wdc.com>
Thu, 24 Mar 2022 14:46:19 +0000 (09:46 -0500)
committerBrandon Paupore <brandon.paupore@wdc.com>
Thu, 24 Mar 2022 14:52:34 +0000 (09:52 -0500)
Function was used only once in nvme-cli for the create-ns command,
instead just handle setting the fields in nvme-cli directly.

Signed-off-by: Brandon Paupore <brandon.paupore@wdc.com>
src/libnvme.map
src/nvme/util.c
src/nvme/util.h

index 7463174cb0ab0d48dc9a6ed86f233cfea34654e2..dee0f6e8a2c290d4c5851194a50c89d808829770 100644 (file)
@@ -175,7 +175,6 @@ LIBNVME_1_0 {
                nvme_init_ctrl_list;
                nvme_init_dsm_range;
                nvme_init_logging;
-               nvme_init_id_ns;
                nvme_io;
                nvme_io_passthru64;
                nvme_io_passthru;
index ba3f3ea638b30844bd1c343157eb0df138606a57..799c0cf6730024f5031e9ea640d017a7510067f9 100644 (file)
@@ -401,19 +401,6 @@ void nvme_init_dsm_range(struct nvme_dsm_range *dsm, __u32 *ctx_attrs,
        }
 }
 
-void nvme_init_id_ns(struct nvme_id_ns *ns, __u64 nsze, __u64 ncap, __u8 flbas,
-               __u8 dps, __u8 nmic, __u32 anagrpid, __u16 nvmsetid)
-{
-       memset(ns, 0, sizeof(*ns));
-       ns->nsze = cpu_to_le64(nsze);
-       ns->ncap = cpu_to_le64(ncap);
-       ns->flbas = flbas;
-       ns->dps = dps;
-       ns->nmic = nmic;
-       ns->anagrpid = cpu_to_le32(anagrpid);
-       ns->nvmsetid = cpu_to_le16(nvmsetid);
-}
-
 void nvme_init_ctrl_list(struct nvme_ctrl_list *cntlist, __u16 num_ctrls,
                          __u16 *ctrlist)
 {
index f034c1b73dbfdd54a59fcc5f90ee899d99c19cff..277b8578f6dee90d5e9be259b560abb8923c069b 100644 (file)
@@ -75,23 +75,6 @@ const char *nvme_status_to_string(int status, bool fabrics);
  */
 const char *nvme_errno_to_string(int err);
 
-/**
- * nvme_init_id_ns() - Initialize an Identify Namepsace structure for creation.
- * @ns:              Address of the Identify Namespace structure to initialize
- * @nsze:     Namespace size
- * @ncap:     namespace capacity
- * @flbas:    formatted logical block size settings
- * @dps:      Data protection settings
- * @nmic:     Namespace sharing capabilities
- * @anagrpid: ANA group identifier
- * @nvmsetid: NVM Set identifer
- *
- * This is intended to be used with a namespace management "create", see
- * nvme_ns_mgmt_create().
- */
-void nvme_init_id_ns(struct nvme_id_ns *ns, __u64 nsze, __u64 ncap, __u8 flbas,
-                    __u8 dps, __u8 nmic, __u32 anagrpid, __u16 nvmsetid);
-
 /**
  * nvme_init_ctrl_list() - Initialize an nvme_ctrl_list structure from an array.
  * @cntlist:   The controller list structure to initialize