git: bed59baba2ca - main - nvmf: Pass const pointers to namespace data to nvmf_*_ns
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 05 Jun 2024 20:03:58 UTC
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=bed59baba2caaf0bbbee3fed378e469b915e8a15 commit bed59baba2caaf0bbbee3fed378e469b915e8a15 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2024-06-05 19:51:37 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2024-06-05 19:51:37 +0000 nvmf: Pass const pointers to namespace data to nvmf_*_ns Reviewed by: imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D45457 --- sys/dev/nvmf/host/nvmf_ns.c | 5 +++-- sys/dev/nvmf/host/nvmf_var.h | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/dev/nvmf/host/nvmf_ns.c b/sys/dev/nvmf/host/nvmf_ns.c index 30acbe815dbe..0727ca960a57 100644 --- a/sys/dev/nvmf/host/nvmf_ns.c +++ b/sys/dev/nvmf/host/nvmf_ns.c @@ -313,7 +313,7 @@ static struct cdevsw nvmf_ns_cdevsw = { struct nvmf_namespace * nvmf_init_ns(struct nvmf_softc *sc, uint32_t id, - struct nvme_namespace_data *data) + const struct nvme_namespace_data *data) { struct make_dev_args mda; struct nvmf_namespace *ns; @@ -454,7 +454,8 @@ nvmf_destroy_ns(struct nvmf_namespace *ns) } bool -nvmf_update_ns(struct nvmf_namespace *ns, struct nvme_namespace_data *data) +nvmf_update_ns(struct nvmf_namespace *ns, + const struct nvme_namespace_data *data) { uint8_t lbads, lbaf; diff --git a/sys/dev/nvmf/host/nvmf_var.h b/sys/dev/nvmf/host/nvmf_var.h index 64525851631e..e0f6d33d2a73 100644 --- a/sys/dev/nvmf/host/nvmf_var.h +++ b/sys/dev/nvmf/host/nvmf_var.h @@ -180,12 +180,12 @@ void nvmf_ctl_unload(void); /* nvmf_ns.c */ struct nvmf_namespace *nvmf_init_ns(struct nvmf_softc *sc, uint32_t id, - struct nvme_namespace_data *data); + const struct nvme_namespace_data *data); void nvmf_disconnect_ns(struct nvmf_namespace *ns); void nvmf_reconnect_ns(struct nvmf_namespace *ns); void nvmf_destroy_ns(struct nvmf_namespace *ns); bool nvmf_update_ns(struct nvmf_namespace *ns, - struct nvme_namespace_data *data); + const struct nvme_namespace_data *data); /* nvmf_qpair.c */ struct nvmf_host_qpair *nvmf_init_qp(struct nvmf_softc *sc,