Skip to content

Commit d9bd6ec

Browse files
committed
libnvme: make __nvme_lookup_ctrl() static
Replace with nvme_ctrl_find() and make it static to avoid function name clashes. Signed-off-by: Hannes Reinecke <[email protected]>
1 parent 0d3378f commit d9bd6ec

3 files changed

Lines changed: 5 additions & 7 deletions

File tree

libnvme/src/nvme/fabrics.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -976,7 +976,7 @@ static const char *lookup_context(struct nvme_global_ctx *ctx, nvme_ctrl_t c)
976976
.trsvcid = nvme_ctrl_get_trsvcid(c),
977977
.subsysnqn = NULL,
978978
};
979-
if (__nvme_lookup_ctrl(s, &fctx, NULL))
979+
if (nvme_ctrl_find(s, &fctx))
980980
return nvme_subsystem_get_application(s);
981981
}
982982
}
@@ -1008,7 +1008,7 @@ __public int nvmf_add_ctrl(nvme_host_t h, nvme_ctrl_t c,
10081008
.subsysnqn = NULL,
10091009
};
10101010

1011-
fc = __nvme_lookup_ctrl(s, &fctx, NULL);
1011+
fc = nvme_ctrl_find(s, &fctx);
10121012
if (fc) {
10131013
const char *key;
10141014

libnvme/src/nvme/private.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -384,9 +384,6 @@ void __nvme_transport_handle_close_mi(struct nvme_transport_handle *hdl);
384384
int _nvme_create_ctrl(struct nvme_global_ctx *ctx,
385385
struct nvmf_context *fctx,
386386
nvme_ctrl_t *cp);
387-
nvme_ctrl_t __nvme_lookup_ctrl(nvme_subsystem_t s,
388-
struct nvmf_context *fctx,
389-
nvme_ctrl_t p);
390387
bool _nvme_ctrl_match_config(struct nvme_ctrl *c, struct nvmf_context *fctx);
391388

392389
void *__nvme_alloc(size_t len);

libnvme/src/nvme/tree.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1451,8 +1451,9 @@ static ctrl_match_t _candidate_init(struct nvme_global_ctx *ctx,
14511451
return _match_ctrl;
14521452
}
14531453

1454-
nvme_ctrl_t __nvme_lookup_ctrl(nvme_subsystem_t s, struct nvmf_context *fctx,
1455-
nvme_ctrl_t p)
1454+
static nvme_ctrl_t __nvme_lookup_ctrl(nvme_subsystem_t s,
1455+
struct nvmf_context *fctx,
1456+
nvme_ctrl_t p)
14561457
{
14571458
struct candidate_args candidate = {};
14581459
struct nvme_ctrl *c, *matching_c = NULL;

0 commit comments

Comments
 (0)