dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dmaengine: idxd: make idxd_wq_enable() return 0 if wq is already enabled
@ 2022-04-25 18:03 Dave Jiang
  2022-05-19 17:56 ` Vinod Koul
  0 siblings, 1 reply; 2+ messages in thread
From: Dave Jiang @ 2022-04-25 18:03 UTC (permalink / raw)
  To: vkoul; +Cc: dmaengine

When calling idxd_wq_enable() and wq is already enabled, code should return 0
and indicate function is successful instead of return error code and fail.
This should also put idxd_wq_enable() in sync with idxd_wq_disable() where
it returns 0 if wq is already disabled.

Signed-off-by: Dave Jiang <dave.jiang@intel.com>
---
 drivers/dma/idxd/device.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/idxd/device.c b/drivers/dma/idxd/device.c
index 22ad9ee383e2..93cbfd726904 100644
--- a/drivers/dma/idxd/device.c
+++ b/drivers/dma/idxd/device.c
@@ -184,7 +184,7 @@ int idxd_wq_enable(struct idxd_wq *wq)
 
 	if (wq->state == IDXD_WQ_ENABLED) {
 		dev_dbg(dev, "WQ %d already enabled\n", wq->id);
-		return -ENXIO;
+		return 0;
 	}
 
 	idxd_cmd_exec(idxd, IDXD_CMD_ENABLE_WQ, wq->id, &status);



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] dmaengine: idxd: make idxd_wq_enable() return 0 if wq is already enabled
  2022-04-25 18:03 [PATCH] dmaengine: idxd: make idxd_wq_enable() return 0 if wq is already enabled Dave Jiang
@ 2022-05-19 17:56 ` Vinod Koul
  0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2022-05-19 17:56 UTC (permalink / raw)
  To: Dave Jiang; +Cc: dmaengine

On 25-04-22, 11:03, Dave Jiang wrote:
> When calling idxd_wq_enable() and wq is already enabled, code should return 0
> and indicate function is successful instead of return error code and fail.
> This should also put idxd_wq_enable() in sync with idxd_wq_disable() where
> it returns 0 if wq is already disabled.

Applied, thanks

-- 
~Vinod

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-19 17:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-25 18:03 [PATCH] dmaengine: idxd: make idxd_wq_enable() return 0 if wq is already enabled Dave Jiang
2022-05-19 17:56 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).