From 863814e60dd4847d27b1ae3050ae07ab3792f824 Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Mon, 18 Nov 2019 11:14:04 -0700 Subject: [PATCH] nvme: add g_ prefix to hotplug_fd Signed-off-by: Jim Harris Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475014 (master) (cherry picked from commit 27e88b8d91be9d6970f693c6664bf2d3f002fefd) Change-Id: I8cc03e1a8b5d2eb28bf945115f3c9b3980b30f1c Signed-off-by: Tomasz Zawadzki Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478343 Tested-by: SPDK CI Jenkins Reviewed-by: Shuhei Matsumoto Reviewed-by: Jim Harris --- lib/nvme/nvme_pcie.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/nvme/nvme_pcie.c b/lib/nvme/nvme_pcie.c index e98d5297b2..64c9d6f6df 100644 --- a/lib/nvme/nvme_pcie.c +++ b/lib/nvme/nvme_pcie.c @@ -212,7 +212,7 @@ static int nvme_pcie_qpair_destroy(struct spdk_nvme_qpair *qpair); __thread struct nvme_pcie_ctrlr *g_thread_mmio_ctrlr = NULL; static uint16_t g_signal_lock; static bool g_sigset = false; -static int hotplug_fd = -1; +static int g_hotplug_fd = -1; static void nvme_sigbus_fault_sighandler(int signum, siginfo_t *info, void *ctx) @@ -271,7 +271,7 @@ _nvme_pcie_hotplug_monitor(struct spdk_nvme_probe_ctx *probe_ctx) union spdk_nvme_csts_register csts; struct spdk_nvme_ctrlr_process *proc; - while (spdk_get_uevent(hotplug_fd, &event) > 0) { + while (spdk_get_uevent(g_hotplug_fd, &event) > 0) { if (event.subsystem == SPDK_NVME_UEVENT_SUBSYSTEM_UIO || event.subsystem == SPDK_NVME_UEVENT_SUBSYSTEM_VFIO) { if (event.action == SPDK_NVME_UEVENT_ADD) { @@ -766,9 +766,9 @@ nvme_pcie_ctrlr_scan(struct spdk_nvme_probe_ctx *probe_ctx, enum_ctx.has_pci_addr = true; } - if (hotplug_fd < 0) { - hotplug_fd = spdk_uevent_connect(); - if (hotplug_fd < 0) { + if (g_hotplug_fd < 0) { + g_hotplug_fd = spdk_uevent_connect(); + if (g_hotplug_fd < 0) { SPDK_DEBUGLOG(SPDK_LOG_NVME, "Failed to open uevent netlink socket\n"); } } else {