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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, 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 32B28C432C3 for ; Sat, 16 Nov 2019 15:58:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E7BF82089D for ; Sat, 16 Nov 2019 15:58:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573919914; bh=k/shd09n9VEVvxmHDs9M6T7FrVTmb5hzEyPpUP7pW9Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=qUWTZQjBqFZDOtjTfBxb1w0fTECoCyAQZWRo+MI1AUb1QSl5rgnNoJUFY/PVzN74K 9pz9P9w8hobEVlbx4Ut/tumIX07Apw/3i1TFh/E8GtV3opv77B40wI5EOYviOxQMA4 flQXe/qsTDLRok9fyLTcug1HTU19nA7gT0/zS3UY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731396AbfKPP6c (ORCPT ); Sat, 16 Nov 2019 10:58:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:35898 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730157AbfKPPyT (ORCPT ); Sat, 16 Nov 2019 10:54:19 -0500 Received: from sasha-vm.mshome.net (unknown [50.234.116.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C2B882186D; Sat, 16 Nov 2019 15:54:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573919659; bh=k/shd09n9VEVvxmHDs9M6T7FrVTmb5hzEyPpUP7pW9Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J2pycUh2fjXM95VcGQzIx9RT1qSusi/NkrZg96OK4sHPvJmuzd75nDvnvDoJAf+/r Tm4Y4nXKhWKaJqdRz3idxAdo7PGBRvJJcC4ghUZpl06io/Phk8Y4M1cMWE+5R+ZKc9 HbaQWB52v15YVKB1jyQz0Zv+qXS6VneQz4m47J+A= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: "David S. Miller" , Sasha Levin , sparclinux@vger.kernel.org Subject: [PATCH AUTOSEL 4.4 31/77] sparc: Fix parport build warnings. Date: Sat, 16 Nov 2019 10:52:53 -0500 Message-Id: <20191116155339.11909-31-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191116155339.11909-1-sashal@kernel.org> References: <20191116155339.11909-1-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "David S. Miller" [ Upstream commit 46b8306480fb424abd525acc1763da1c63a27d8a ] If PARPORT_PC_FIFO is not enabled, do not provide the dma lock macros and lock definition. Otherwise: ./arch/sparc/include/asm/parport.h:24:24: warning: ‘dma_spin_lock’ defined but not used [-Wunused-variable] static DEFINE_SPINLOCK(dma_spin_lock); ^~~~~~~~~~~~~ ./include/linux/spinlock_types.h:81:39: note: in definition of macro ‘DEFINE_SPINLOCK’ #define DEFINE_SPINLOCK(x) spinlock_t x = __SPIN_LOCK_UNLOCKED(x) Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- arch/sparc/include/asm/parport.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/sparc/include/asm/parport.h b/arch/sparc/include/asm/parport.h index f005ccac91cc9..e87c0f81b700e 100644 --- a/arch/sparc/include/asm/parport.h +++ b/arch/sparc/include/asm/parport.h @@ -20,6 +20,7 @@ */ #define HAS_DMA +#ifdef CONFIG_PARPORT_PC_FIFO static DEFINE_SPINLOCK(dma_spin_lock); #define claim_dma_lock() \ @@ -30,6 +31,7 @@ static DEFINE_SPINLOCK(dma_spin_lock); #define release_dma_lock(__flags) \ spin_unlock_irqrestore(&dma_spin_lock, __flags); +#endif static struct sparc_ebus_info { struct ebus_dma_info info; -- 2.20.1