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=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 4B156C76195 for ; Fri, 19 Jul 2019 04:09:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 178412189E for ; Fri, 19 Jul 2019 04:09:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563509362; bh=L/zTDr17ridG+WrpvY+xueXwG1RdFupWPmRMDrbkZhI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=pqTCA5UVemlj3fKmFKjeXtXfmatXG7U8uhQamdVSuKz3ZzzBmFMhxdtJb95hScrpl hhCQvjEz7B1/1GxWedJWvB4iFEu1VpuGmKkfDcRiJfQFfBBulEfTZ1nk3uKYplHEYm c7P4SaDn46iRaEtORcI3t/V2pxlOqvqFh+c/MFXg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387510AbfGSEJU (ORCPT ); Fri, 19 Jul 2019 00:09:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:43704 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732538AbfGSEJM (ORCPT ); Fri, 19 Jul 2019 00:09:12 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (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 144F021872; Fri, 19 Jul 2019 04:09:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563509351; bh=L/zTDr17ridG+WrpvY+xueXwG1RdFupWPmRMDrbkZhI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gKdzmek2hXZ+zUMyOr/5h46kTGluGXe3L3dhRHkFRJ4XqtMXxp+kBGdonZm26bdL0 3bz/ANzlotJMKeSWJDhbu9p+cVgvdeW4Az6iKj/YFV6Xl+g7LV7GRS4MeueLyxTZ02 muEtn2Dye84VkSWiFp0xwzAZ/X4TtcDUxDjCGJ2I= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Qian Cai , Michael Ellerman , Sasha Levin , linuxppc-dev@lists.ozlabs.org Subject: [PATCH AUTOSEL 4.19 048/101] powerpc/cacheflush: fix variable set but not used Date: Fri, 19 Jul 2019 00:06:39 -0400 Message-Id: <20190719040732.17285-48-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190719040732.17285-1-sashal@kernel.org> References: <20190719040732.17285-1-sashal@kernel.org> MIME-Version: 1.0 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: Qian Cai [ Upstream commit 04db3ede40ae4fc23a5c4237254c4a53bbe4c1f2 ] The powerpc's flush_cache_vmap() is defined as a macro and never use both of its arguments, so it will generate a compilation warning, lib/ioremap.c: In function 'ioremap_page_range': lib/ioremap.c:203:16: warning: variable 'start' set but not used [-Wunused-but-set-variable] Fix it by making it an inline function. Signed-off-by: Qian Cai Signed-off-by: Michael Ellerman Signed-off-by: Sasha Levin --- arch/powerpc/include/asm/cacheflush.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/cacheflush.h b/arch/powerpc/include/asm/cacheflush.h index d5a8d7bf0759..b189f7aee222 100644 --- a/arch/powerpc/include/asm/cacheflush.h +++ b/arch/powerpc/include/asm/cacheflush.h @@ -32,9 +32,12 @@ * not expect this type of fault. flush_cache_vmap is not exactly the right * place to put this, but it seems to work well enough. */ -#define flush_cache_vmap(start, end) do { asm volatile("ptesync" ::: "memory"); } while (0) +static inline void flush_cache_vmap(unsigned long start, unsigned long end) +{ + asm volatile("ptesync" ::: "memory"); +} #else -#define flush_cache_vmap(start, end) do { } while (0) +static inline void flush_cache_vmap(unsigned long start, unsigned long end) { } #endif #define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 1 -- 2.20.1