]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: ipa: don't return a value from gsi_channel_command()
authorAlex Elder <elder@linaro.org>
Sat, 26 Dec 2020 21:37:36 +0000 (15:37 -0600)
committerJakub Kicinski <kuba@kernel.org>
Mon, 28 Dec 2020 22:13:22 +0000 (14:13 -0800)
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: kernel test robot <lkp@intel.com>
Fixes: 2700c8b258e12 ("net: ipa: use state to determine channel command success")
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ipa/gsi.c

index 579cc3e5167758c04b6de17d15a2b5dfd9470fd2..e51a7705789900f1ca90c86c93e84dad3f054aef 100644 (file)
@@ -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 */
-static int
+static void
 gsi_channel_command(struct gsi_channel *channel, enum gsi_ch_cmd_opcode opcode)
 {
        struct completion *completion = &channel->completion;
@@ -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);
 
        if (success)
-               return 0;
+               return;
 
        dev_err(dev, "GSI command %u for channel %u timed out, state %u\n",
                opcode, channel_id, gsi_channel_state(channel));
-
-       return -ETIMEDOUT;
 }
 
 /* Allocate GSI channel in NOT_ALLOCATED state */
@@ -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 device *dev = gsi->dev;
        enum gsi_channel_state state;
-       int ret;
 
        /* Get initial channel state */
        state = gsi_channel_state(channel);
@@ -513,7 +510,7 @@ static int gsi_channel_alloc_command(struct gsi *gsi, u32 channel_id)
                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 */
        state = gsi_channel_state(channel);
@@ -531,7 +528,6 @@ static int gsi_channel_start_command(struct gsi_channel *channel)
 {
        struct device *dev = channel->gsi->dev;
        enum gsi_channel_state state;
-       int ret;
 
        state = gsi_channel_state(channel);
        if (state != GSI_CHANNEL_STATE_ALLOCATED &&
@@ -541,7 +537,7 @@ static int gsi_channel_start_command(struct gsi_channel *channel)
                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 */
        state = gsi_channel_state(channel);
@@ -559,7 +555,6 @@ static int gsi_channel_stop_command(struct gsi_channel *channel)
 {
        struct device *dev = channel->gsi->dev;
        enum gsi_channel_state state;
-       int ret;
 
        state = gsi_channel_state(channel);
 
@@ -576,7 +571,7 @@ static int gsi_channel_stop_command(struct gsi_channel *channel)
                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 */
        state = gsi_channel_state(channel);
@@ -598,7 +593,6 @@ static void gsi_channel_reset_command(struct gsi_channel *channel)
 {
        struct device *dev = channel->gsi->dev;
        enum gsi_channel_state state;
-       int ret;
 
        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)
                return;
        }
 
-       ret = gsi_channel_command(channel, GSI_CH_RESET);
+       gsi_channel_command(channel, GSI_CH_RESET);
 
        /* If successful the channel state will have changed */
        state = gsi_channel_state(channel);
@@ -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 device *dev = gsi->dev;
        enum gsi_channel_state state;
-       int ret;
 
        state = gsi_channel_state(channel);
        if (state != GSI_CHANNEL_STATE_ALLOCATED) {
@@ -636,7 +629,7 @@ static void gsi_channel_de_alloc_command(struct gsi *gsi, u32 channel_id)
                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 */
        state = gsi_channel_state(channel);