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.2 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,USER_AGENT_GIT autolearn=unavailable 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 E3032C47094 for ; Mon, 7 Jun 2021 16:19:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CE78D613C5 for ; Mon, 7 Jun 2021 16:19:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232931AbhFGQVT (ORCPT ); Mon, 7 Jun 2021 12:21:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:47834 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232377AbhFGQS3 (ORCPT ); Mon, 7 Jun 2021 12:18:29 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0C0C06147F; Mon, 7 Jun 2021 16:14:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623082463; bh=uU3E+HpHiuf4G518xekdhVkqedtIxnVtoN6FngjHGNs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mZOQypSszSoxiAAxI6TO/VdsI31JXmGOI27ea1fc8iVnf1h6dN5wvnYz6vmyczyAW 7APHBi5u/I+jolKwJY2tuKoDec2PCBBFCRbsY0ByZmptoCj5BOW5LNAKOh9TShsn9O 47cSLpFR2i+Yg32cMpC++DbY4WlDxa87qjNM+3u4FHNXqN0d2qLsuPbbqs2BENfGjo UsDPchhDdVJYoGXfSP0GzcbJuxGFL2QRQJ979DHeOvy+jLNWAEBHkVjbNocSvsXlcV uOPKGlzfZTf1oqHoWb6Uz45UX+V/WRrUp7Jc/SP6kRMH1fxkkXqef2EwNKkZ9Yt3G9 j+n+yLkg60L5g== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Yongqiang Liu , Tony Lindgren , Sasha Levin , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 5.4 10/29] ARM: OMAP2+: Fix build warning when mmc_omap is not built Date: Mon, 7 Jun 2021 12:13:51 -0400 Message-Id: <20210607161410.3584036-10-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210607161410.3584036-1-sashal@kernel.org> References: <20210607161410.3584036-1-sashal@kernel.org> MIME-Version: 1.0 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 418a61ecb827..5e86145db0e2 100644 --- a/arch/arm/mach-omap2/board-n8x0.c +++ b/arch/arm/mach-omap2/board-n8x0.c @@ -322,6 +322,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()) { @@ -339,7 +340,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 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=-17.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,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 96D93C47082 for ; Mon, 7 Jun 2021 16:20:54 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6AD9161432 for ; Mon, 7 Jun 2021 16:20:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6AD9161432 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WieY9BuaMCORk+vDKwLKWw/a8hhVLeny6buDtN0oFgU=; b=od+LS3Q8c2namO qQWmNiGNQsAf2hSiGMQsNjGgER5InalDxg5zGMG8mIi3b5vYy4cbMBXlsj63aY/FAJNDL95hPhDZF VUtA89s1aAVLVK7JgE6hFIUpG2hwxLy8tFePVdtd6c2mJfAm859MEYc0PeAZ9CuU+2Y+l3MfKLs+7 sVOV6LnRtKKzjMvnDiTgl8XKvv0qC99BjFzoyc2OIEdW4+35pXl6tVtM8/qCEM7qxr5rGxnaQIAyH 6YovMxB5+YVm+qu6LxH3v3ZHYvIeQN5WMLced6bjzCdiLKr+rsxs0HIvDJTQ9UJ/Ykmxd+MoA2+tm o6MkE+FehtC2F44WQhRg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqHxh-004RmM-Mj; Mon, 07 Jun 2021 16:18:50 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqHtQ-004PNp-D5 for linux-arm-kernel@lists.infradead.org; Mon, 07 Jun 2021 16:14:26 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0C0C06147F; Mon, 7 Jun 2021 16:14:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623082463; bh=uU3E+HpHiuf4G518xekdhVkqedtIxnVtoN6FngjHGNs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mZOQypSszSoxiAAxI6TO/VdsI31JXmGOI27ea1fc8iVnf1h6dN5wvnYz6vmyczyAW 7APHBi5u/I+jolKwJY2tuKoDec2PCBBFCRbsY0ByZmptoCj5BOW5LNAKOh9TShsn9O 47cSLpFR2i+Yg32cMpC++DbY4WlDxa87qjNM+3u4FHNXqN0d2qLsuPbbqs2BENfGjo UsDPchhDdVJYoGXfSP0GzcbJuxGFL2QRQJ979DHeOvy+jLNWAEBHkVjbNocSvsXlcV uOPKGlzfZTf1oqHoWb6Uz45UX+V/WRrUp7Jc/SP6kRMH1fxkkXqef2EwNKkZ9Yt3G9 j+n+yLkg60L5g== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Yongqiang Liu , Tony Lindgren , Sasha Levin , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 5.4 10/29] ARM: OMAP2+: Fix build warning when mmc_omap is not built Date: Mon, 7 Jun 2021 12:13:51 -0400 Message-Id: <20210607161410.3584036-10-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210607161410.3584036-1-sashal@kernel.org> References: <20210607161410.3584036-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210607_091424_516341_7A6441B2 X-CRM114-Status: GOOD ( 11.75 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 418a61ecb827..5e86145db0e2 100644 --- a/arch/arm/mach-omap2/board-n8x0.c +++ b/arch/arm/mach-omap2/board-n8x0.c @@ -322,6 +322,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()) { @@ -339,7 +340,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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel