From patchwork Fri May 25 21:34:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 136998 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp88831lji; Fri, 25 May 2018 14:35:48 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKAKFKIQqDAWvpnJQq0jMWr4DY/X9/9AiiEccaEmPWGrf9WZkcXQCN/HjtdezGkofSlxkKX X-Received: by 2002:a17:902:b590:: with SMTP id a16-v6mr291210pls.225.1527284148057; Fri, 25 May 2018 14:35:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527284148; cv=none; d=google.com; s=arc-20160816; b=voN2K+1Z+INZA5bjaGVtnxNLbpcec0bZeoj2Y7QQlRlC/jCQn1Ev3HJ1UAGofK4WnQ Ji/5KrtHKBioypRbZSdGRZXeOh5G/ubCYe8miMN0ocxUqHFYw/3Tsqp7G1EgzZU0l2zS jwbJ68XZMWDLfS+q9W4J+XGokhgmotGtXeYtkZETg5zOo6PZqZvCKkPR1Fo/NuYK2FEP TpEvNZuhRSffvbuNLzqb3azaFDDbx92jCQkJguodZsippLZjTjB98VaNQl45A+dMxAdn lsT0ysQH1CBp82+5e25kswoeDt7pwy+m9exG184vO8gmPloFt0xV+wqOEMCxumDlNHS9 HZyQ== 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 :arc-authentication-results; bh=tmBJbOkI/XfTwMbZ9bHqcA7eUjRPEd476+NePyaRvm8=; b=OJGj9h8nlVw0VIQlbotIg69FCxWjZyEiEXCQCQHs4FauFe1Az7mLcIR92Oj9qQNPJs G9kmo60ZUWOLeZlpBrjGB/POrMXIk0NbXpJrQqNGa9RT3uvShVdtC/DW7Dvdsy/wowtj j8/k9Ugckk+/VbpGDVBRU4gAYP5a9vesbG6sUtmcfk1sAI08Bhwse6ipTnBqh/jBkTdA GCuoyub3BxTvERC5ExJ+fs1YCqIuvxDs7UW8Mlp7lxfZZk1G+ForDhV0QAKU2Yw/gIfK bv0nU0clnF7YBetTmFezPCXrvZpu95W0cmTuGpTRi87KmdAJK2gg1INWvmO/+u2vnC9t CBUw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e20-v6si18975370pgn.130.2018.05.25.14.35.47; Fri, 25 May 2018 14:35:48 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030492AbeEYVfo (ORCPT + 30 others); Fri, 25 May 2018 17:35:44 -0400 Received: from mout.kundenserver.de ([217.72.192.74]:41027 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030318AbeEYVfi (ORCPT ); Fri, 25 May 2018 17:35:38 -0400 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue104 [212.227.15.145]) with ESMTPA (Nemesis) id 0MTgXI-1fmpSz2kqW-00QPXM; Fri, 25 May 2018 23:35:29 +0200 From: Arnd Bergmann To: Ganesh Goudar , "David S. Miller" , Rahul Lakkireddy Cc: Arnd Bergmann , Andrew Morton , Alexey Dobriyan , linux-kernel@vger.kernel.org Subject: [PATCH, net-next] vmcore: hide vmcoredd_mmap_dumps() for nommu builds Date: Fri, 25 May 2018 23:34:57 +0200 Message-Id: <20180525213526.2117790-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K1:APn3fuVWucgr21fPwJWrtH3rwIFB/lp8HBxeASlJQxDXdojmkhK oFb634yx/esXJOMPvgxFyD1+6CyvUFwD0A7ccvmNXw94jp7d38PBN58iyJq8y+Qy9qO+ipa ECzIIipxt/ldIC+jjDxL05uzRBIb6A+K3A8NE1EAK1E933/wki44F9GljXbebFXu4DAwsEM vDHfDeqdVBujnqvdGm8oQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:Icidxji6ck4=:ycuDj06w4HxKnay/EJHTou jBDIQPsb2GBHAm66zaXQ5+u3sonl3IIUrI1Kn9vbf3NLVDW1sdeSWaDZY2KDYl5h3+AzVMZK4 KPMeTjK2SSdD4ULA9I15uPHJrfRXwlBsdaOSzoVEwpvzT0xiV94Bf31CuhFKEsoPs3uv9mBSz HKBxP6kSCarXfb14b9Y6pMB8yZykriNrMRnMih1qRYtRAP/QhqjkiDdAPTHq5e+ZFtsQgjtsA urXvvSb4/kEqmzA1EWbs5k2q++kW/AviV5D1MQ5xcT6uUIU2opvVd6A65jI+zrb3XogTHLtma +hI8AIsL0Ngq3DULXYQzWXjPwb0861DcowxUMDJY01dsAgHwlEn6RBKSjUBb7bqJ3HrpNPzbX ViccROmPKhD7FR/rtNQf00g1hkCiFmIYZj8doJjgeXki5Q1d+uHDDF8vCVdYfpafSAVGiCdvX 347nTyWw6i/Q9mFFfdgN+POZkhQkmH8CezEmmmBQ2GFI3oHTL765zQQHPa/6LfbpzA59BQq4f 4K8PnxIi5rAN0gK4LrAulzi8giGOXr4EZxVUkbzI46lyy6PAfi/6Jv3XD+oWLlpq2t/aPcpss BEEuNMQXyuIk7WUl71IYug+5SVb0mpnx1p6GdLBEaSIz/LDxcoYp6zKD6eR9q4OlsL6K8f+RG SxrcNXxXikzHc7wFUUPWw+sS68GG0OSTidrFYC/phga7BS4s1Usn4O6C7IsStcLeGrso= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Without CONFIG_MMU, we get a build warning: fs/proc/vmcore.c:228:12: error: 'vmcoredd_mmap_dumps' defined but not used [-Werror=unused-function] static int vmcoredd_mmap_dumps(struct vm_area_struct *vma, unsigned long dst, The function is only referenced from an #ifdef'ed caller, so this uses the same #ifdef around it. Fixes: 7efe48df8a3d ("vmcore: append device dumps to vmcore as elf notes") Signed-off-by: Arnd Bergmann --- fs/proc/vmcore.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.9.0 diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c index cfb6674331fd..0651646dd04d 100644 --- a/fs/proc/vmcore.c +++ b/fs/proc/vmcore.c @@ -225,6 +225,7 @@ static int vmcoredd_copy_dumps(void *dst, u64 start, size_t size, int userbuf) return ret; } +#ifdef CONFIG_MMU static int vmcoredd_mmap_dumps(struct vm_area_struct *vma, unsigned long dst, u64 start, size_t size) { @@ -259,6 +260,7 @@ static int vmcoredd_mmap_dumps(struct vm_area_struct *vma, unsigned long dst, mutex_unlock(&vmcoredd_mutex); return ret; } +#endif /* CONFIG_MMU */ #endif /* CONFIG_PROC_VMCORE_DEVICE_DUMP */ /* Read from the ELF header and then the crash dump. On error, negative value is