From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E0ABEC49EAB for ; Mon, 28 Jun 2021 15:03:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D014061446 for ; Mon, 28 Jun 2021 15:03:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234660AbhF1PGT (ORCPT ); Mon, 28 Jun 2021 11:06:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:36548 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236732AbhF1PC1 (ORCPT ); Mon, 28 Jun 2021 11:02:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8F3DA61CCB; Mon, 28 Jun 2021 14:43:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624891382; bh=pxaClpHo2JeNFeJc9tNtN5p4nba7pPshfC+5WI2WSIY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lfLcELD7dfFFzvYDLHClcylmBdc6EBz0GpN9mDroSVAaBa/4tiT6V2IOP77V4ften NFzAuKBOygTvmLChN4Tp6HXcuo9AN8ZH2QaKf0NigaTslEhpEEfGKZuf66QezbPn1n wsMLhn8PzlcuxVmsWsE0x4ZSEttoRvtSMWv+GVKwB6R6C4JbzUbHkO5kLdpYttfhFp zmbdtZmYCJBC1UL9BYou50rQ7U0reaej8KlNTVGiVGkUF0iafU4ShFjnjsvUt4mk1f J61QNN+YDWJVaqEJku9OD3dCL4qSH4E10FIHvSjeWqhz9zqEJ14ccGx/eELFC2n0j1 /kBbxv48UCZ1w== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Yongqiang Liu , Tony Lindgren , Sasha Levin Subject: [PATCH 4.4 04/57] ARM: OMAP2+: Fix build warning when mmc_omap is not built Date: Mon, 28 Jun 2021 10:42:03 -0400 Message-Id: <20210628144256.34524-5-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210628144256.34524-1-sashal@kernel.org> References: <20210628144256.34524-1-sashal@kernel.org> MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.274-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-4.4.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 4.4.274-rc1 X-KernelTest-Deadline: 2021-06-30T14:42+00:00 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Yongqiang Liu [ Upstream commit 040ab72ee10ea88e1883ad143b3e2b77596abc31 ] 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 Signed-off-by: Tony Lindgren Signed-off-by: Sasha Levin --- arch/arm/mach-omap2/board-n8x0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c index b6443a4e0c78..68af9d9566cb 100644 --- a/arch/arm/mach-omap2/board-n8x0.c +++ b/arch/arm/mach-omap2/board-n8x0.c @@ -328,6 +328,7 @@ static int n8x0_mmc_get_cover_state(struct device *dev, int slot) static void n8x0_mmc_callback(void *data, u8 card_mask) { +#ifdef CONFIG_MMC_OMAP int bit, *openp, index; if (board_is_n800()) { @@ -345,7 +346,6 @@ static void n8x0_mmc_callback(void *data, u8 card_mask) else *openp = 0; -#ifdef CONFIG_MMC_OMAP omap_mmc_notify_cover_event(mmc_device, index, *openp); #else pr_warn("MMC: notify cover event not available\n"); -- 2.30.2