Commit 1169318b authored by Alex Elder's avatar Alex Elder Committed by Jakub Kicinski

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

Callers of gsi_channel_command() no longer care whether the command
times out, and don't use what gsi_channel_command() returns.  Redefine
that function to have void return type.
Reported-by: default avatarkernel test robot <lkp@intel.com>
Fixes: 6ffddf3b ("net: ipa: use state to determine channel command success")
Signed-off-by: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent bc4adf0e
...@@ -454,7 +454,7 @@ static enum gsi_channel_state gsi_channel_state(struct gsi_channel *channel) ...@@ -454,7 +454,7 @@ static enum gsi_channel_state gsi_channel_state(struct gsi_channel *channel)
} }
/* Issue a channel command and wait for it to complete */ /* Issue a channel command and wait for it to complete */
static int static void
gsi_channel_command(struct gsi_channel *channel, enum gsi_ch_cmd_opcode opcode) gsi_channel_command(struct gsi_channel *channel, enum gsi_ch_cmd_opcode opcode)
{ {
struct completion *completion = &channel->completion; struct completion *completion = &channel->completion;
...@@ -489,12 +489,10 @@ gsi_channel_command(struct gsi_channel *channel, enum gsi_ch_cmd_opcode opcode) ...@@ -489,12 +489,10 @@ gsi_channel_command(struct gsi_channel *channel, enum gsi_ch_cmd_opcode opcode)
iowrite32(0, gsi->virt + GSI_CNTXT_SRC_CH_IRQ_MSK_OFFSET); iowrite32(0, gsi->virt + GSI_CNTXT_SRC_CH_IRQ_MSK_OFFSET);
if (success) if (success)
return 0; return;
dev_err(dev, "GSI command %u for channel %u timed out, state %u\n", dev_err(dev, "GSI command %u for channel %u timed out, state %u\n",
opcode, channel_id, gsi_channel_state(channel)); opcode, channel_id, gsi_channel_state(channel));
return -ETIMEDOUT;
} }
/* Allocate GSI channel in NOT_ALLOCATED state */ /* Allocate GSI channel in NOT_ALLOCATED state */
...@@ -503,7 +501,6 @@ static int gsi_channel_alloc_command(struct gsi *gsi, u32 channel_id) ...@@ -503,7 +501,6 @@ static int gsi_channel_alloc_command(struct gsi *gsi, u32 channel_id)
struct gsi_channel *channel = &gsi->channel[channel_id]; struct gsi_channel *channel = &gsi->channel[channel_id];
struct device *dev = gsi->dev; struct device *dev = gsi->dev;
enum gsi_channel_state state; enum gsi_channel_state state;
int ret;
/* Get initial channel state */ /* Get initial channel state */
state = gsi_channel_state(channel); state = gsi_channel_state(channel);
...@@ -513,7 +510,7 @@ static int gsi_channel_alloc_command(struct gsi *gsi, u32 channel_id) ...@@ -513,7 +510,7 @@ static int gsi_channel_alloc_command(struct gsi *gsi, u32 channel_id)
return -EINVAL; return -EINVAL;
} }
ret = gsi_channel_command(channel, GSI_CH_ALLOCATE); gsi_channel_command(channel, GSI_CH_ALLOCATE);
/* If successful the channel state will have changed */ /* If successful the channel state will have changed */
state = gsi_channel_state(channel); state = gsi_channel_state(channel);
...@@ -531,7 +528,6 @@ static int gsi_channel_start_command(struct gsi_channel *channel) ...@@ -531,7 +528,6 @@ static int gsi_channel_start_command(struct gsi_channel *channel)
{ {
struct device *dev = channel->gsi->dev; struct device *dev = channel->gsi->dev;
enum gsi_channel_state state; enum gsi_channel_state state;
int ret;
state = gsi_channel_state(channel); state = gsi_channel_state(channel);
if (state != GSI_CHANNEL_STATE_ALLOCATED && if (state != GSI_CHANNEL_STATE_ALLOCATED &&
...@@ -541,7 +537,7 @@ static int gsi_channel_start_command(struct gsi_channel *channel) ...@@ -541,7 +537,7 @@ static int gsi_channel_start_command(struct gsi_channel *channel)
return -EINVAL; return -EINVAL;
} }
ret = gsi_channel_command(channel, GSI_CH_START); gsi_channel_command(channel, GSI_CH_START);
/* If successful the channel state will have changed */ /* If successful the channel state will have changed */
state = gsi_channel_state(channel); state = gsi_channel_state(channel);
...@@ -559,7 +555,6 @@ static int gsi_channel_stop_command(struct gsi_channel *channel) ...@@ -559,7 +555,6 @@ static int gsi_channel_stop_command(struct gsi_channel *channel)
{ {
struct device *dev = channel->gsi->dev; struct device *dev = channel->gsi->dev;
enum gsi_channel_state state; enum gsi_channel_state state;
int ret;
state = gsi_channel_state(channel); state = gsi_channel_state(channel);
...@@ -576,7 +571,7 @@ static int gsi_channel_stop_command(struct gsi_channel *channel) ...@@ -576,7 +571,7 @@ static int gsi_channel_stop_command(struct gsi_channel *channel)
return -EINVAL; return -EINVAL;
} }
ret = gsi_channel_command(channel, GSI_CH_STOP); gsi_channel_command(channel, GSI_CH_STOP);
/* If successful the channel state will have changed */ /* If successful the channel state will have changed */
state = gsi_channel_state(channel); state = gsi_channel_state(channel);
...@@ -598,7 +593,6 @@ static void gsi_channel_reset_command(struct gsi_channel *channel) ...@@ -598,7 +593,6 @@ static void gsi_channel_reset_command(struct gsi_channel *channel)
{ {
struct device *dev = channel->gsi->dev; struct device *dev = channel->gsi->dev;
enum gsi_channel_state state; enum gsi_channel_state state;
int ret;
msleep(1); /* A short delay is required before a RESET command */ msleep(1); /* A short delay is required before a RESET command */
...@@ -612,7 +606,7 @@ static void gsi_channel_reset_command(struct gsi_channel *channel) ...@@ -612,7 +606,7 @@ static void gsi_channel_reset_command(struct gsi_channel *channel)
return; return;
} }
ret = gsi_channel_command(channel, GSI_CH_RESET); gsi_channel_command(channel, GSI_CH_RESET);
/* If successful the channel state will have changed */ /* If successful the channel state will have changed */
state = gsi_channel_state(channel); state = gsi_channel_state(channel);
...@@ -627,7 +621,6 @@ static void gsi_channel_de_alloc_command(struct gsi *gsi, u32 channel_id) ...@@ -627,7 +621,6 @@ static void gsi_channel_de_alloc_command(struct gsi *gsi, u32 channel_id)
struct gsi_channel *channel = &gsi->channel[channel_id]; struct gsi_channel *channel = &gsi->channel[channel_id];
struct device *dev = gsi->dev; struct device *dev = gsi->dev;
enum gsi_channel_state state; enum gsi_channel_state state;
int ret;
state = gsi_channel_state(channel); state = gsi_channel_state(channel);
if (state != GSI_CHANNEL_STATE_ALLOCATED) { if (state != GSI_CHANNEL_STATE_ALLOCATED) {
...@@ -636,7 +629,7 @@ static void gsi_channel_de_alloc_command(struct gsi *gsi, u32 channel_id) ...@@ -636,7 +629,7 @@ static void gsi_channel_de_alloc_command(struct gsi *gsi, u32 channel_id)
return; return;
} }
ret = gsi_channel_command(channel, GSI_CH_DE_ALLOC); gsi_channel_command(channel, GSI_CH_DE_ALLOC);
/* If successful the channel state will have changed */ /* If successful the channel state will have changed */
state = gsi_channel_state(channel); state = gsi_channel_state(channel);
......
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