Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp4652501imb; Wed, 6 Mar 2019 19:50:53 -0800 (PST) X-Google-Smtp-Source: APXvYqz0oLc/QfWEh2nFzOGIxuClUFG58c5aAlWq/pnywa7mCncXR2t1upGgLnJE5CXaYc1J8Pac X-Received: by 2002:a17:902:6686:: with SMTP id e6mr10645513plk.208.1551930653244; Wed, 06 Mar 2019 19:50:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551930653; cv=none; d=google.com; s=arc-20160816; b=DNIFpLZIRnqWLZr2FxtkNX/whxUFQLFEho2GqUFO7ll2aoOSAxeQ1FnoFsr9Vm9Ode FX/Xwr9/HIc5zJ9WIi1LKhtTRYogs52QXgFT7l6D2eDQZy0OAEHuLuI3HQZAcAs+fR9g od71M+efN6pEo4CS0PY4JA2bdE2QTfsH3IPxhdEeCW/CyhkH3adTpvnQan85xEfgjefd HJXXSS9y3eks3QPa+wGJX2NOjaXTonx3Ij37FiVFCWs1D9xlfdbFLcghdeN113WMZMkS 2gHHZBaQBcFWXTazmAZcgCpi7KseJ3ysiGw/+q1E63LCqKxC5aTckxczQj3h2pgd+42N egCw== 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=cfMkd7k5sfsoufvYvmOTamvmreEyC+E68UQtEbBo5qI=; b=zQ1vqIK4Ry7zcUUKKFxWYYzRXrra76FeX1Fk++MdGM4dqapE1vYbj/sqIM6f6rIfbP 7w1MUO99XBL2VYt7RRWjC0qRMtGj/Z0T7nBprt5+rjWJ2GEQOFa/Fxcu16Z5cYKxWxFa HTXqJ+tUW8BDgJCpJRtUoCUewSfBMXoRB4hAVkvN8Nrj3THe45sO5DmOPKTRBPQ0tCQS +p8xKxg4Sx4tD0dSWlnQy0njLZV0zKI1273dFL39di7Ck65Mun/yanSUkbdA+ibjzAiG pEtfHsx+O3N16k2/kJYqtMFUySy88KCiFEUm9mrSZfAV5X3sWeIgXuKTg83XFBSCJ9uW +olg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=H0t6WsJx; 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 x10si3062300pgi.29.2019.03.06.19.50.37; Wed, 06 Mar 2019 19:50:53 -0800 (PST) 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=H0t6WsJx; 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 S1726336AbfCGDsk (ORCPT + 99 others); Wed, 6 Mar 2019 22:48:40 -0500 Received: from mail-qk1-f195.google.com ([209.85.222.195]:43551 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725793AbfCGDsk (ORCPT ); Wed, 6 Mar 2019 22:48:40 -0500 Received: by mail-qk1-f195.google.com with SMTP id s26so132400qkm.10 for ; Wed, 06 Mar 2019 19:48:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=from:to:cc:subject:date:message-id; bh=cfMkd7k5sfsoufvYvmOTamvmreEyC+E68UQtEbBo5qI=; b=H0t6WsJxPvqVTlR4Q3olCA72TjvAPUP+vKPl9pHZXpppxrE8Ns3we2BgNC0dTLc4os B9muEuGM7xEDfL7tanpS8Kwgcc9TmhwQ45G0ES/P0fjVNU7h1yf2Ae4vDOkvawcAIWH/ wwzVnzUQFgOGqfLCG0GEGYgXEtzBx+SZYA9AXsviSIyhZ6/b5gFDWemapxo/KTDjuR2/ bz6kxTpOJXYJW+0IzOjaI9zKDtlwNDjyODxSRpVsRdzVlmtmrSS0NnG4a8voiH6PQspM 3SaMYjyZqGxQDLKsUO57bbF1pq8/MYOXk2aqNcRq0lBF8ReXyyq0yAinonZ6iIeSbyKu nc9A== 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=cfMkd7k5sfsoufvYvmOTamvmreEyC+E68UQtEbBo5qI=; b=E5XoN7VruIpuLkv6AvlDbBV/0MUVHy2GPRCQ9tzr3csuUQJJzTWdHK6g4ZlBXXkmUM E5Eo/7RUbf5EOm7eebAX1gmTGcPCpsRxftIjkkqW3G3k+2nPLVq4vpACDkbIpwo7p77V 21Zqv2Pe1z6sjOqrOKgYiVnPm4AzJH/6ZE5CAys3P5fLBNwdfz2TXBx5nnR3afmFuGqO PX8+ZetMr5ZQBPwo9E0TLDCpwgeyVyBURjQbjNyQ58IwWaNJ4kGlwD52Ve9ESa2UJr+z Q8leV/zSy8h0pXXrkrHLu+XBEWyPW4hEzLNgCXxj8r1PYXfsGd+kZkTHCgGSwA3ZFPqS NbJQ== X-Gm-Message-State: APjAAAXojcIIB1m0JtzJ5faj48za2Z9sWraW2BxbVVTP8oDp9GBp5jPR /gPw5curOVEfh22iN73tHE9FdQ== X-Received: by 2002:a37:f507:: with SMTP id l7mr8630648qkk.302.1551930518976; Wed, 06 Mar 2019 19:48:38 -0800 (PST) Received: from ovpn-121-103.rdu2.redhat.com (pool-71-184-117-43.bstnma.fios.verizon.net. [71.184.117.43]) by smtp.gmail.com with ESMTPSA id p127sm1726897qke.97.2019.03.06.19.48.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Mar 2019 19:48:38 -0800 (PST) From: Qian Cai To: benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Qian Cai Subject: [PATCH] powerpc: silence unused-but-set-variable warnings Date: Wed, 6 Mar 2019 22:48:21 -0500 Message-Id: <20190307034821.48769-1-cai@lca.pw> X-Mailer: git-send-email 2.17.2 (Apple Git-113) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org pte_unmap() compiles away on some powerpc platforms, so silence the warnings below by using the argument to pte_unmap() as a nop. Also, fix checkpatch.pl warnings "Single statement macros should not use a do {} while (0) loop". mm/memory.c: In function 'copy_pte_range': mm/memory.c:820:24: warning: variable 'orig_dst_pte' set but not used [-Wunused-but-set-variable] mm/memory.c:820:9: warning: variable 'orig_src_pte' set but not used [-Wunused-but-set-variable] mm/madvise.c: In function 'madvise_free_pte_range': mm/madvise.c:318:9: warning: variable 'orig_pte' set but not used [-Wunused-but-set-variable] mm/swap_state.c: In function 'swap_ra_info': mm/swap_state.c:634:15: warning: variable 'orig_pte' set but not used [-Wunused-but-set-variable] Signed-off-by: Qian Cai --- arch/powerpc/include/asm/book3s/64/pgtable.h | 2 +- arch/powerpc/include/asm/nohash/64/pgtable.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/book3s/64/pgtable.h b/arch/powerpc/include/asm/book3s/64/pgtable.h index 868fcaf56f6b..ec00ce6dd312 100644 --- a/arch/powerpc/include/asm/book3s/64/pgtable.h +++ b/arch/powerpc/include/asm/book3s/64/pgtable.h @@ -1006,7 +1006,7 @@ extern struct page *pgd_page(pgd_t pgd); (((pte_t *) pmd_page_vaddr(*(dir))) + pte_index(addr)) #define pte_offset_map(dir,addr) pte_offset_kernel((dir), (addr)) -#define pte_unmap(pte) do { } while(0) +#define pte_unmap(pte) (void)(pte) /* to find an entry in a kernel page-table-directory */ /* This now only contains the vmalloc pages */ diff --git a/arch/powerpc/include/asm/nohash/64/pgtable.h b/arch/powerpc/include/asm/nohash/64/pgtable.h index e77ed9761632..103071afab3d 100644 --- a/arch/powerpc/include/asm/nohash/64/pgtable.h +++ b/arch/powerpc/include/asm/nohash/64/pgtable.h @@ -205,7 +205,7 @@ static inline void pgd_set(pgd_t *pgdp, unsigned long val) (((pte_t *) pmd_page_vaddr(*(dir))) + (((addr) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))) #define pte_offset_map(dir,addr) pte_offset_kernel((dir), (addr)) -#define pte_unmap(pte) do { } while(0) +#define pte_unmap(pte) (void)(pte) /* to find an entry in a kernel page-table-directory */ /* This now only contains the vmalloc pages */ -- 2.17.2 (Apple Git-113)