Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp8336118ybi; Thu, 6 Jun 2019 10:28:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqxtoOxskzt2aWvkOyFLhew7BIWHlPRfJB/N49SZwgfqhHLoVaxX9ggscJOOX6ZhFA+GxJUj X-Received: by 2002:a17:90a:254e:: with SMTP id j72mr987916pje.11.1559842136037; Thu, 06 Jun 2019 10:28:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559842136; cv=none; d=google.com; s=arc-20160816; b=v4RX+yIOq55k416e2yUMRviFBad65314AnZ80gGX/BY772oTomyojS1OQB1dQD1f14 BPW36PjI148UmWlGGBPXgEluZhLmEl2FiUuMWVeRmTuRrceG5pLsVHCEBTKNZ2Y5xWPE TckiK+67a7cWMc0v8MI+fvGBNMDri5YnabDrtJ+0VL0hvazott0SG8lttFlzyAkJFEU2 JDa1bSD7jolB1jIhZqgqJmPouAG2ilVbcOTu40ofpJ776fkILiaaka1pNNh8rm+J7HHE WK8yWo+v8bE71oR8XBV31WCSFCABdamwCwIwR0t48eUd1XYiIluYKR1DnnBB23EdJ/S6 pO+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=uYUP0WvJ8OVS3p9Pt4OYtUrTIoCYyxeTlVr1HS9+PVI=; b=sDjHZMO7PNncNMzRJyhanQ2FKnhalM4FY7+izJX4Jwv3DaWewtdzt52luSWBeyx4hL AM2g4iusdizUC4gLr8YLhD/boSgyleqEXsSoHHg0gI8/lV/eP4NU4zEyWgg5KbI1V7Hi 3Hku+Z6Fu7gCudC7eW1r8W/pZG04FKsi12c27t3H914xtGED5AlU2oc/qmXYRvPDYIpS ERB8zcn5BaqNHUa2ZZg8C2kOj7/GEkMwDKBCFulXUnU7gr4Nbx+ZN+O7Ezid+o97GCcV r4HGjwxukWkO6jYi6l3YDFA6JO7jJKRm+uk9Xpd2Ne/kLerlveaskt3pCHgu6SDtB3do 57qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=BawoU+DL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i195si2502191pfe.20.2019.06.06.10.28.40; Thu, 06 Jun 2019 10:28:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=BawoU+DL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727908AbfFFN66 (ORCPT + 99 others); Thu, 6 Jun 2019 09:58:58 -0400 Received: from mail-qt1-f194.google.com ([209.85.160.194]:35213 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727176AbfFFN65 (ORCPT ); Thu, 6 Jun 2019 09:58:57 -0400 Received: by mail-qt1-f194.google.com with SMTP id d23so2753560qto.2 for ; Thu, 06 Jun 2019 06:58:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=from:to:cc:subject:date:message-id; bh=uYUP0WvJ8OVS3p9Pt4OYtUrTIoCYyxeTlVr1HS9+PVI=; b=BawoU+DL761/Zz0pvNB6yfVLELjpaY9MrjtJ0ekcgITb2LHMm4DTA2HU38p+oKSvXR rSFXzn+w3C05cINtZPNzeEV1ew7Vq1ZglQak8DyZPuzo4AIMlWRpyes9S/pMbCpTNnVH xcxNXEPpDaDBd4QRoOowoLwwOQom/8GW7sCbWMScLXCYaSJXhHnjMqbkOFNFKWPO9fV2 ilP3PSW4ionpHoc4SD3idfYN04JrvqI3PopNdU6+fSYe39X5yumAU1/J+S0yGA7Ez72F nGieJwobbaK1j6EcqQM9I0V4OAk98A7kFe9C5ixNzgKwiP/R1c4dALSlCUKOJraptUrz 0+WA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=uYUP0WvJ8OVS3p9Pt4OYtUrTIoCYyxeTlVr1HS9+PVI=; b=SRL9CbdX5awVY500lC6x4SEZ6uE0r1t/+UY3Q+Yool0JHTCg1jAMBtKVQxg7c+XIHL toQV1pCtVtElX1CrSoZQWmTczEKmjvL3L0fxn6cp/gxMYVr9pdWSUlKj11W9bnlbrq9U bDUC1pXfFts/oqrF/awfaET//fpPdciFjjCPg8N0xUWPEj3esKcl/J9WNhtpyiTG7YRg ADuMf8LBjYCU95I4AUs40xhxFkxVNzJn5BSUhui+G0gj2Ge7wf3OzfwjBgOApM8I5a8t M1ZNHk1TwHOfA9j5IJnx3fQP528WB/pKD9KhIf28EGl3aiI0+ClNe4jXJZwiMvAGfON0 +8ig== X-Gm-Message-State: APjAAAXbQrMdmbTDwfe057WhIsBw0NItxMkIfYmd9lIw+mtyK6aZQRI+ VIoH5SwOj/uWiOex8tQPKgDoTQ== X-Received: by 2002:a0c:acba:: with SMTP id m55mr39733792qvc.52.1559829536685; Thu, 06 Jun 2019 06:58:56 -0700 (PDT) Received: from qcai.nay.com (nat-pool-bos-t.redhat.com. [66.187.233.206]) by smtp.gmail.com with ESMTPSA id d38sm1369241qtb.95.2019.06.06.06.58.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Jun 2019 06:58:55 -0700 (PDT) From: Qian Cai To: mpe@ellerman.id.au Cc: benh@kernel.crashing.org, paulus@samba.org, akpm@linux-foundation.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Qian Cai Subject: [PATCH] powerpc/cacheflush: fix variable set but not used Date: Thu, 6 Jun 2019 09:58:13 -0400 Message-Id: <1559829493-28457-1-git-send-email-cai@lca.pw> X-Mailer: git-send-email 1.8.3.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 74d60cfe8ce5..fd318f7c3eed 100644 --- a/arch/powerpc/include/asm/cacheflush.h +++ b/arch/powerpc/include/asm/cacheflush.h @@ -29,9 +29,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 -- 1.8.3.1