Skip to content

Commit 040ab72

Browse files
Yongqiang Liutmlind
authored andcommitted
ARM: OMAP2+: Fix build warning when mmc_omap is not built
GCC reports the following warning with W=1: arch/arm/mach-omap2/board-n8x0.c:325:19: warning: variable 'index' set but not used [-Wunused-but-set-variable] 325 | int bit, *openp, index; | ^~~~~ Fix this by moving CONFIG_MMC_OMAP to cover the rest codes in the n8x0_mmc_callback(). Signed-off-by: Yongqiang Liu <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
1 parent 7c30231 commit 040ab72

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm/mach-omap2/board-n8x0.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@ static int n8x0_mmc_get_cover_state(struct device *dev, int slot)
322322

323323
static void n8x0_mmc_callback(void *data, u8 card_mask)
324324
{
325+
#ifdef CONFIG_MMC_OMAP
325326
int bit, *openp, index;
326327

327328
if (board_is_n800()) {
@@ -339,7 +340,6 @@ static void n8x0_mmc_callback(void *data, u8 card_mask)
339340
else
340341
*openp = 0;
341342

342-
#ifdef CONFIG_MMC_OMAP
343343
omap_mmc_notify_cover_event(mmc_device, index, *openp);
344344
#else
345345
pr_warn("MMC: notify cover event not available\n");

0 commit comments

Comments
 (0)