]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
mmc: sdhci-uhs2: Remove unnecessary variables
authorVictor Shih <victor.shih@genesyslogic.com.tw>
Wed, 30 Oct 2024 11:22:16 +0000 (19:22 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Thu, 31 Oct 2024 16:36:34 +0000 (17:36 +0100)
There are unnecessary variables in the sdhci_uhs2_send_command() that will
generate a warning when building the kernel. Let's drop them!

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202410252107.y9EgrTbA-lkp@intel.com/
Signed-off-by: Ben Chuang <ben.chuang@genesyslogic.com.tw>
Signed-off-by: Victor Shih <victor.shih@genesyslogic.com.tw>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Message-ID: <20241030112216.4057-2-victorshihgli@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-uhs2.c

index 5133b18512212614640fa6c3c4a860fc69454f92..0a597240d299c6178f13be47cfe9b2e293adb94c 100644 (file)
@@ -685,7 +685,6 @@ static void __sdhci_uhs2_send_command(struct sdhci_host *host, struct mmc_comman
 
 static bool sdhci_uhs2_send_command(struct sdhci_host *host, struct mmc_command *cmd)
 {
-       int flags;
        u32 mask;
        unsigned long timeout;
 
@@ -715,30 +714,6 @@ static bool sdhci_uhs2_send_command(struct sdhci_host *host, struct mmc_command
 
        sdhci_uhs2_set_transfer_mode(host, cmd);
 
-       if ((cmd->flags & MMC_RSP_136) && (cmd->flags & MMC_RSP_BUSY)) {
-               WARN_ONCE(1, "Unsupported response type!\n");
-               /*
-                * This does not happen in practice because 136-bit response
-                * commands never have busy waiting, so rather than complicate
-                * the error path, just remove busy waiting and continue.
-                */
-               cmd->flags &= ~MMC_RSP_BUSY;
-       }
-
-       if (!(cmd->flags & MMC_RSP_PRESENT))
-               flags = SDHCI_CMD_RESP_NONE;
-       else if (cmd->flags & MMC_RSP_136)
-               flags = SDHCI_CMD_RESP_LONG;
-       else if (cmd->flags & MMC_RSP_BUSY)
-               flags = SDHCI_CMD_RESP_SHORT_BUSY;
-       else
-               flags = SDHCI_CMD_RESP_SHORT;
-
-       if (cmd->flags & MMC_RSP_CRC)
-               flags |= SDHCI_CMD_CRC;
-       if (cmd->flags & MMC_RSP_OPCODE)
-               flags |= SDHCI_CMD_INDEX;
-
        timeout = jiffies;
        if (host->data_timeout)
                timeout += nsecs_to_jiffies(host->data_timeout);