Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1989925yba; Sun, 7 Apr 2019 05:56:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqwEzTevHgKFVdGTiXX1KVdtCBDIPLE6GgfXbRS6AqfCpWOuYGjSZW0ibnzaEtXWFqoHg0az X-Received: by 2002:a62:5a42:: with SMTP id o63mr24292979pfb.170.1554641765251; Sun, 07 Apr 2019 05:56:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554641765; cv=none; d=google.com; s=arc-20160816; b=LD9NTdVshOlwYgVndYLbg/qf/dminoWmE2feyg1So8V/na38Oh3f6V906bHm/kD3wk tqngjwPZ76BgU3EbLTjoEuzJ/1ZPIClYwQOJr3Mrk/DIVZqQAg7NY/8rpxSC0c5VoLuM CwwvV86MxLMXuBjEh2jX+ckgX58/M4Nq61B2CqB996HIWk1C+x8jIGemivMc9PV+o1gD 4lZrQynu2INUEU9MJ2B5et6UntUQNON7CYGlBCTIvLSuKqtwmsTmzoS/7XPsk2XTgYhH 3wGFkSaU/W7u+h2N8M2WfPcVLucHwhk3x7CHhZcyAy7FZY7zFXV5qdQZkDnzNZPfXLGK QjVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=q6GvCOXUCK4tBiwXLhJBH0g5cljGJzLOdSjX1r8GVmE=; b=km4aPcEdUrrqFc4JAvhKdulUdIJAVGKHSPxbeK6WcRjkmbbIgGe6g/Uj6jt4zZ73kj Sq2Z45HALZ8PpmShf0qFBXpUYOgU7xkVnt68Z8B1098JMxKYR7kZSjImxAcCHsbZqkUb PWAkYHRdzCE2e8kVfQz6U7hVItyNE1hm8akldFpiLWBStB86Y8cPO5u3OJQIFsZMsI8N RpMzrT3OSUnUx55VzTyaOGxbhipRG8sdQW5a2GDMRl/f+Re061yz7z9MrdZ/iNRCmGml he36iOkaOll9ZmSvklibheEMV2vfJZoKrtksOA+3OptgwtiFUPmb69898KGoRwJEDpug gJgg== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i62si848534pge.481.2019.04.07.05.55.49; Sun, 07 Apr 2019 05:56:05 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726396AbfDGMzQ (ORCPT + 99 others); Sun, 7 Apr 2019 08:55:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60824 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726040AbfDGMzP (ORCPT ); Sun, 7 Apr 2019 08:55:15 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A2B2E30642AA; Sun, 7 Apr 2019 12:55:15 +0000 (UTC) Received: from thuth.com (ovpn-116-96.ams2.redhat.com [10.36.116.96]) by smtp.corp.redhat.com (Postfix) with ESMTP id E8E1C600C1; Sun, 7 Apr 2019 12:55:11 +0000 (UTC) From: Thomas Huth To: Martin Schwidefsky , Heiko Carstens , linux-s390@vger.kernel.org Cc: David Hildenbrand , linux-kernel@vger.kernel.org Subject: [PATCH] s390/mm: Silence compiler warning when compiling without CONFIG_PGSTE Date: Sun, 7 Apr 2019 14:55:09 +0200 Message-Id: <20190407125509.6380-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Sun, 07 Apr 2019 12:55:15 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If CONFIG_PGSTE is not set (e.g. when compiling without KVM), GCC complains: CC arch/s390/mm/pgtable.o arch/s390/mm/pgtable.c:413:15: warning: ‘pmd_alloc_map’ defined but not used [-Wunused-function] static pmd_t *pmd_alloc_map(struct mm_struct *mm, unsigned long addr) ^~~~~~~~~~~~~ Wrap the function with "#ifdef CONFIG_PGSTE" to silence the warning. Signed-off-by: Thomas Huth --- arch/s390/mm/pgtable.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c index 8485d6dc2754..9ebd01219812 100644 --- a/arch/s390/mm/pgtable.c +++ b/arch/s390/mm/pgtable.c @@ -410,6 +410,7 @@ static inline pmd_t pmdp_flush_lazy(struct mm_struct *mm, return old; } +#ifdef CONFIG_PGSTE static pmd_t *pmd_alloc_map(struct mm_struct *mm, unsigned long addr) { pgd_t *pgd; @@ -427,6 +428,7 @@ static pmd_t *pmd_alloc_map(struct mm_struct *mm, unsigned long addr) pmd = pmd_alloc(mm, pud, addr); return pmd; } +#endif pmd_t pmdp_xchg_direct(struct mm_struct *mm, unsigned long addr, pmd_t *pmdp, pmd_t new) -- 2.21.0