Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3592874pxv; Mon, 28 Jun 2021 08:09:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxoMz3h75pqT+JCJ2sXC/duNY6gNX8TdSYCFZkvs4EhIBEV+g55ZcFReA9ULXQVZBZe0xqM X-Received: by 2002:a17:906:1da1:: with SMTP id u1mr2362925ejh.307.1624892946491; Mon, 28 Jun 2021 08:09:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624892946; cv=none; d=google.com; s=arc-20160816; b=FCic04JSXtpvixcv5oXQnz6BXcvXQw5bjfVmMyR9F/o4YnEOT17/F2PevVSVcTrsFE waa66E2WlC2rk4tJe2Sl3BDXTP3Wb7fc7xCc64JbrAMejq9wdoeuKJbLGAb57i0/qBD8 kdyXB6l0W4fSgCZ0iEtVt+vkmXmyJFyVWga+hs1WOB2IRUOoqUnZUpxv3NDaWTC/yyBT EpkY/ZL6Y1cED1K30+F44oTO6fEfrNPO3/+CGstGm4aptoywN76embtkaVwlbHxnqCRe C0Jt5E4930a2pw6jCYCHZnnZ9EjJPLrdOrjJv4lR+WSOdPlvIHKs0mOIIBOsOD+oqbHH rttw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=lUrXNR5R/bpnuUER8K72COyTC2e2oSEOQjF+eznzHKU=; b=I5uU712lTn6k0zDpGpsVmpRQ61o6uciKYjrETa1xPBMqmAilFuELdUXOybRgoHVaFU mVzkRf8rstqSzgzqbS0bU/4kUpmPy04dnTc68vGyg7i4oBa6PUZnrjZaqj1eJF+D1fvX Lb0uxyy76Lho3bILZuDFbNuxWc3TZHOCTWoj8GShfpNfL4VrLZ8eelHuF9h4wcxgVtPN zqtrt39sd+amP/BsBEiexPB6nUKJLEBKOYdA5OUpPO7VHMnHNmHyHuJGNqkv1pircQMl t74OKPdQX1j+VjmK7cQLSz7uAuzCTZjBEhMPyD1xJlo71U2KVZ3ZkId55f2B40cTJQVJ th/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QovnC2iP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y11si14896810eda.200.2021.06.28.08.08.41; Mon, 28 Jun 2021 08:09:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QovnC2iP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236006AbhF1PHg (ORCPT + 99 others); Mon, 28 Jun 2021 11:07:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:54512 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236322AbhF1OrV (ORCPT ); Mon, 28 Jun 2021 10:47:21 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BE04061CA4; Mon, 28 Jun 2021 14:36:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624890995; bh=6M14J6CtFD8EwL8AVyh0xyO2/A8lHu9pqqHuxDwPjv0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QovnC2iPsTYBtjCX8X30z4piXJOENGYvpxVXGTlKFP02uvKqMgr0RTgUsJIxhdLE/ X/OTUb3E0dOWvWlBVbhRnPdaDmyb/OQQeRh98CbMA3OOFzP11+GX1O7qioLi4Hanbn SPI/dd6bF02IjGARcxpTnnJgwBUE5M/m+A/3XxdiffGLavpS+9HDBQCqP6VX5NQkHd 4QhJwkcickf2hn/q8FWwLEI+h9R1vZNzgstkvpxRun/l8TMXHmIsDHuMzUT8DMsg9F EMAuIX45r0k76TFKjHUPzyNPdeJpRu1wdFMS71frPNUQ3TrdMGAyDsb8ALBMhYN3nM MO3aUGwn90bUQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Yongqiang Liu , Tony Lindgren , Sasha Levin Subject: [PATCH 4.14 05/88] ARM: OMAP2+: Fix build warning when mmc_omap is not built Date: Mon, 28 Jun 2021 10:35:05 -0400 Message-Id: <20210628143628.33342-6-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210628143628.33342-1-sashal@kernel.org> References: <20210628143628.33342-1-sashal@kernel.org> MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.14.238-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-4.14.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 4.14.238-rc1 X-KernelTest-Deadline: 2021-06-30T14:36+00:00 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 20f25539d572..47abea1475d4 100644 --- a/arch/arm/mach-omap2/board-n8x0.c +++ b/arch/arm/mach-omap2/board-n8x0.c @@ -325,6 +325,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()) { @@ -342,7 +343,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