Commit 7ac9a4ec authored by Daniel Verkamp's avatar Daniel Verkamp Committed by Ben Walker
Browse files

event: remove spdk_event_allocate() next parameter



The 'next' event pointer was never used in the entire code base (always
NULL).

Change-Id: I75f999d3a2e10512d86edec1a5a46ef263e2635b
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent c3ede774
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@ nvmf_tgt_delete_subsystem(struct nvmf_tgt_subsystem *app_subsys)
	 * the subsystem's memory.
	 */
	event = spdk_event_allocate(spdk_app_get_current_core(), subsystem_delete_event,
				    app_subsys, NULL, NULL);
				    app_subsys, NULL);
	spdk_poller_unregister(&app_subsys->poller, event);
}

@@ -132,7 +132,7 @@ spdk_nvmf_shutdown_cb(void)
	fprintf(stdout, "=========================\n");

	event = spdk_event_allocate(spdk_app_get_current_core(), acceptor_poller_unregistered_event,
				    NULL, NULL, NULL);
				    NULL, NULL);
	spdk_poller_unregister(&g_acceptor_poller, event);
}

@@ -159,7 +159,7 @@ connect_cb(void *cb_ctx, struct spdk_nvmf_request *req)
	struct spdk_event *event;

	/* Pass an event to the lcore that owns this subsystem */
	event = spdk_event_allocate(app_subsys->lcore, connect_event, req, NULL, NULL);
	event = spdk_event_allocate(app_subsys->lcore, connect_event, req, NULL);
	spdk_event_call(event);
}

@@ -178,7 +178,7 @@ disconnect_cb(void *cb_ctx, struct spdk_nvmf_conn *conn)
	struct spdk_event *event;

	/* Pass an event to the core that owns this connection */
	event = spdk_event_allocate(app_subsys->lcore, disconnect_event, conn, NULL, NULL);
	event = spdk_event_allocate(app_subsys->lcore, disconnect_event, conn, NULL);
	spdk_event_call(event);
}

@@ -211,7 +211,7 @@ nvmf_tgt_start_subsystem(struct nvmf_tgt_subsystem *app_subsys)
	struct spdk_event *event;

	event = spdk_event_allocate(app_subsys->lcore, _nvmf_tgt_start_subsystem,
				    app_subsys, NULL, NULL);
				    app_subsys, NULL);
	spdk_event_call(event);
}

+1 −2
Original line number Diff line number Diff line
@@ -199,8 +199,7 @@ uint32_t spdk_app_get_current_core(void);
 * \brief Allocate an event to be passed to \ref spdk_event_call
 */
struct spdk_event *spdk_event_allocate(uint32_t lcore, spdk_event_fn fn,
				       void *arg1, void *arg2,
				       struct spdk_event *next);
				       void *arg1, void *arg2);

/**
 * \brief Pass the given event to the associated lcore and call the function.
+0 −1
Original line number Diff line number Diff line
@@ -43,7 +43,6 @@ struct spdk_event {
	spdk_event_fn		fn;
	void			*arg1;
	void			*arg2;
	struct spdk_event	*next;
};

int spdk_reactors_init(const char *mask, unsigned int max_delay_us);
+1 −1
Original line number Diff line number Diff line
@@ -449,7 +449,7 @@ spdk_bdev_io_submit(struct spdk_bdev_io *bdev_io)

	if (bdev_io->status == SPDK_BDEV_IO_STATUS_PENDING) {
		cb_event = spdk_event_allocate(rte_lcore_id(), bdev_io->cb,
					       bdev_io->caller_ctx, bdev_io, NULL);
					       bdev_io->caller_ctx, bdev_io);
		assert(cb_event != NULL);
	}

+2 −2
Original line number Diff line number Diff line
@@ -349,7 +349,7 @@ spdk_app_init(struct spdk_app_opts *opts)

	if (opts->shutdown_cb != NULL) {
		g_shutdown_event = spdk_event_allocate(rte_lcore_id(), __shutdown_event_cb,
						       NULL, NULL, NULL);
						       NULL, NULL);

		sigact.sa_handler = __shutdown_signal;
		sigemptyset(&sigact.sa_mask);
@@ -434,7 +434,7 @@ spdk_app_start(spdk_event_fn start_fn, void *arg1, void *arg2)
	g_spdk_app.rc = 0;

	event = spdk_event_allocate(rte_get_master_lcore(), start_fn,
				    arg1, arg2, NULL);
				    arg1, arg2);
	/* Queues up the event, but can't run it until the reactors start */
	spdk_event_call(event);

Loading