From 412d89cd6fefd3ce64ed2bb94adbae9778808cb7 Mon Sep 17 00:00:00 2001 From: Rami Rosen Date: Tue, 11 Sep 2018 14:58:05 +0300 Subject: [PATCH] ioat: change return type of spdk_ioat_detach() to be void The method spdk_ioat_detach() never fails. This patch changes its return type to be void instead of int. Change-Id: I6f5bda9ab330c02ae0535bed8b78d416c7b1e264 Signed-off-by: Rami Rosen Reviewed-on: https://review.gerrithub.io/425252 Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Seth Howell Reviewed-by: Ben Walker --- include/spdk/ioat.h | 6 ++---- lib/ioat/ioat.c | 4 +--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/include/spdk/ioat.h b/include/spdk/ioat.h index cbf1fd6cc..c323a0b46 100644 --- a/include/spdk/ioat.h +++ b/include/spdk/ioat.h @@ -104,10 +104,8 @@ int spdk_ioat_probe(void *cb_ctx, spdk_ioat_probe_cb probe_cb, spdk_ioat_attach_ * Detach specified device returned by spdk_ioat_probe() from the I/OAT driver. * * \param ioat I/OAT channel to detach from the driver. - * - * \return 0 on success. - */ -int spdk_ioat_detach(struct spdk_ioat_chan *ioat); + */ +void spdk_ioat_detach(struct spdk_ioat_chan *ioat); /** * Submit a DMA engine memory copy request. diff --git a/lib/ioat/ioat.c b/lib/ioat/ioat.c index ad237a513..ee32ca27f 100644 --- a/lib/ioat/ioat.c +++ b/lib/ioat/ioat.c @@ -568,7 +568,7 @@ spdk_ioat_probe(void *cb_ctx, spdk_ioat_probe_cb probe_cb, spdk_ioat_attach_cb a return rc; } -int +void spdk_ioat_detach(struct spdk_ioat_chan *ioat) { struct ioat_driver *driver = &g_ioat_driver; @@ -582,8 +582,6 @@ spdk_ioat_detach(struct spdk_ioat_chan *ioat) ioat_channel_destruct(ioat); free(ioat); - - return 0; } #define _2MB_PAGE(ptr) ((ptr) & ~(0x200000 - 1))