Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mmc: mvsdio: avoid compiler warning

gcc correctly points out that hw_state can be used uninitially
in the mvsd_setup_data() function. This rearranges the function
to ensure it always contains a proper value.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Nicolas Pitre <nico@fluxnic.net>
Cc: Chris Ball <chris@printf.net>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: linux-mmc@vger.kernel.org
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Arnd Bergmann and committed by
Ulf Hansson
d7fe833f bf614c7a

+1 -1
+1 -1
drivers/mmc/host/mvsdio.c
··· 79 79 unsigned long t = jiffies + HZ; 80 80 unsigned int hw_state, count = 0; 81 81 do { 82 + hw_state = mvsd_read(MVSD_HW_STATE); 82 83 if (time_after(jiffies, t)) { 83 84 dev_warn(host->dev, "FIFO_EMPTY bit missing\n"); 84 85 break; 85 86 } 86 - hw_state = mvsd_read(MVSD_HW_STATE); 87 87 count++; 88 88 } while (!(hw_state & (1 << 13))); 89 89 dev_dbg(host->dev, "*** wait for FIFO_EMPTY bit "