Commit 1ddf776b authored by Alex Elder's avatar Alex Elder Committed by Jakub Kicinski

net: ipa: don't return a value from evt_ring_command()

Callers of evt_ring_command() no longer care whether the command
times out, and don't use what evt_ring_command() returns.  Redefine
that function to have void return type.
Reported-by: default avatarkernel test robot <lkp@intel.com>
Fixes: 428b448e ("net: ipa: use state to determine event ring command success")
Signed-off-by: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 1169318b
...@@ -326,8 +326,8 @@ gsi_evt_ring_state(struct gsi *gsi, u32 evt_ring_id) ...@@ -326,8 +326,8 @@ gsi_evt_ring_state(struct gsi *gsi, u32 evt_ring_id)
} }
/* Issue an event ring command and wait for it to complete */ /* Issue an event ring command and wait for it to complete */
static int evt_ring_command(struct gsi *gsi, u32 evt_ring_id, static void evt_ring_command(struct gsi *gsi, u32 evt_ring_id,
enum gsi_evt_cmd_opcode opcode) enum gsi_evt_cmd_opcode opcode)
{ {
struct gsi_evt_ring *evt_ring = &gsi->evt_ring[evt_ring_id]; struct gsi_evt_ring *evt_ring = &gsi->evt_ring[evt_ring_id];
struct completion *completion = &evt_ring->completion; struct completion *completion = &evt_ring->completion;
...@@ -361,19 +361,16 @@ static int evt_ring_command(struct gsi *gsi, u32 evt_ring_id, ...@@ -361,19 +361,16 @@ static int evt_ring_command(struct gsi *gsi, u32 evt_ring_id,
iowrite32(0, gsi->virt + GSI_CNTXT_SRC_EV_CH_IRQ_MSK_OFFSET); iowrite32(0, gsi->virt + GSI_CNTXT_SRC_EV_CH_IRQ_MSK_OFFSET);
if (success) if (success)
return 0; return;
dev_err(dev, "GSI command %u for event ring %u timed out, state %u\n", dev_err(dev, "GSI command %u for event ring %u timed out, state %u\n",
opcode, evt_ring_id, evt_ring->state); opcode, evt_ring_id, evt_ring->state);
return -ETIMEDOUT;
} }
/* Allocate an event ring in NOT_ALLOCATED state */ /* Allocate an event ring in NOT_ALLOCATED state */
static int gsi_evt_ring_alloc_command(struct gsi *gsi, u32 evt_ring_id) static int gsi_evt_ring_alloc_command(struct gsi *gsi, u32 evt_ring_id)
{ {
struct gsi_evt_ring *evt_ring = &gsi->evt_ring[evt_ring_id]; struct gsi_evt_ring *evt_ring = &gsi->evt_ring[evt_ring_id];
int ret;
/* Get initial event ring state */ /* Get initial event ring state */
evt_ring->state = gsi_evt_ring_state(gsi, evt_ring_id); evt_ring->state = gsi_evt_ring_state(gsi, evt_ring_id);
...@@ -383,7 +380,7 @@ static int gsi_evt_ring_alloc_command(struct gsi *gsi, u32 evt_ring_id) ...@@ -383,7 +380,7 @@ static int gsi_evt_ring_alloc_command(struct gsi *gsi, u32 evt_ring_id)
return -EINVAL; return -EINVAL;
} }
ret = evt_ring_command(gsi, evt_ring_id, GSI_EVT_ALLOCATE); evt_ring_command(gsi, evt_ring_id, GSI_EVT_ALLOCATE);
/* If successful the event ring state will have changed */ /* If successful the event ring state will have changed */
if (evt_ring->state == GSI_EVT_RING_STATE_ALLOCATED) if (evt_ring->state == GSI_EVT_RING_STATE_ALLOCATED)
...@@ -400,7 +397,6 @@ static void gsi_evt_ring_reset_command(struct gsi *gsi, u32 evt_ring_id) ...@@ -400,7 +397,6 @@ static void gsi_evt_ring_reset_command(struct gsi *gsi, u32 evt_ring_id)
{ {
struct gsi_evt_ring *evt_ring = &gsi->evt_ring[evt_ring_id]; struct gsi_evt_ring *evt_ring = &gsi->evt_ring[evt_ring_id];
enum gsi_evt_ring_state state = evt_ring->state; enum gsi_evt_ring_state state = evt_ring->state;
int ret;
if (state != GSI_EVT_RING_STATE_ALLOCATED && if (state != GSI_EVT_RING_STATE_ALLOCATED &&
state != GSI_EVT_RING_STATE_ERROR) { state != GSI_EVT_RING_STATE_ERROR) {
...@@ -409,7 +405,7 @@ static void gsi_evt_ring_reset_command(struct gsi *gsi, u32 evt_ring_id) ...@@ -409,7 +405,7 @@ static void gsi_evt_ring_reset_command(struct gsi *gsi, u32 evt_ring_id)
return; return;
} }
ret = evt_ring_command(gsi, evt_ring_id, GSI_EVT_RESET); evt_ring_command(gsi, evt_ring_id, GSI_EVT_RESET);
/* If successful the event ring state will have changed */ /* If successful the event ring state will have changed */
if (evt_ring->state == GSI_EVT_RING_STATE_ALLOCATED) if (evt_ring->state == GSI_EVT_RING_STATE_ALLOCATED)
...@@ -423,7 +419,6 @@ static void gsi_evt_ring_reset_command(struct gsi *gsi, u32 evt_ring_id) ...@@ -423,7 +419,6 @@ static void gsi_evt_ring_reset_command(struct gsi *gsi, u32 evt_ring_id)
static void gsi_evt_ring_de_alloc_command(struct gsi *gsi, u32 evt_ring_id) static void gsi_evt_ring_de_alloc_command(struct gsi *gsi, u32 evt_ring_id)
{ {
struct gsi_evt_ring *evt_ring = &gsi->evt_ring[evt_ring_id]; struct gsi_evt_ring *evt_ring = &gsi->evt_ring[evt_ring_id];
int ret;
if (evt_ring->state != GSI_EVT_RING_STATE_ALLOCATED) { if (evt_ring->state != GSI_EVT_RING_STATE_ALLOCATED) {
dev_err(gsi->dev, "event ring %u state %u before dealloc\n", dev_err(gsi->dev, "event ring %u state %u before dealloc\n",
...@@ -431,7 +426,7 @@ static void gsi_evt_ring_de_alloc_command(struct gsi *gsi, u32 evt_ring_id) ...@@ -431,7 +426,7 @@ static void gsi_evt_ring_de_alloc_command(struct gsi *gsi, u32 evt_ring_id)
return; return;
} }
ret = evt_ring_command(gsi, evt_ring_id, GSI_EVT_DE_ALLOC); evt_ring_command(gsi, evt_ring_id, GSI_EVT_DE_ALLOC);
/* If successful the event ring state will have changed */ /* If successful the event ring state will have changed */
if (evt_ring->state == GSI_EVT_RING_STATE_NOT_ALLOCATED) if (evt_ring->state == GSI_EVT_RING_STATE_NOT_ALLOCATED)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment