From patchwork Thu Oct 12 15:31:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 115643 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp2072316qgn; Thu, 12 Oct 2017 08:32:12 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCWVIwuW8zL++frILKfTqnpdSsmYdmjRAbvoDFiZOdXvCAagjMrYZCGnFGnfqtzbVh0flnO X-Received: by 10.99.125.79 with SMTP id m15mr561822pgn.314.1507822332036; Thu, 12 Oct 2017 08:32:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507822332; cv=none; d=google.com; s=arc-20160816; b=IEcTnKll3q67uOkSONqja7H/HkafRzimotH6Ro1aybrUIaOQqR3P57IotJitsuqgDA 0MAbAFLdJGF58AvWK/doFOC4TmUB/N72FuEzYWgAo1on+epf6PzcDSaT840Wd3oKPq3A tCTeFjUFzx7MuBOGBH1DXisnVxjhdNhQHDNxpH79FTe6KmIHlrASpCF7Sui14QeazG0A 43ghAPHsoJTQyQP1gTIeaomzPCepCeQhxl3+PmyTyFiznGTWxFsi5zo1pes/TehiWlwO ybpDsPQEWxTCK2Ml/VcuNz/dEgyDKHur0FDVb2OPU4Dy5fiJjekyjZAjB0WGhcyJ9WQr m/6Q== 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=zRb/G70BS5xG/eJaReodaVu8odNrSeeMu6h2/H70Ryo=; b=NXlhthW91nsGy8S45gB4I1O3+5WJJ3T9dwtonQQFt/vmXjI1WyxyTnDg4biGN5YRho aKW+OMJBapYOuIRRuz962lKTXvTkkCJyja8TJotwtmrrtOPMVfbJnaP32D0nnHX0LH5r iNRrTfRDFzfkD31aB0oYwaF8r0NtZGsJpUHum7jGn4eUVRWtgExa20hwBf0Nmis6rxfa nfzIuYCJHuWYPYo5IiDgE4eV0nLiKVkikW1O8UtoSV819/DcvpdwLyPo02jZR4hTE6Kt xyT+ofcZ+CutuO5OsoBxGddeMGqf0e5eXOFlXQ8Ttvg5r1qJdLaEUh6xmSF1Dpgnd/eC 2EJA== 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 1si9045922pli.36.2017.10.12.08.32.11; Thu, 12 Oct 2017 08:32:12 -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 S1752752AbdJLPcK (ORCPT + 27 others); Thu, 12 Oct 2017 11:32:10 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:51747 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751682AbdJLPcI (ORCPT ); Thu, 12 Oct 2017 11:32:08 -0400 Received: from wuerfel.lan ([46.223.139.202]) by mrelayeu.kundenserver.de (mreue001 [212.227.15.129]) with ESMTPA (Nemesis) id 0MVEI1-1dm0iQ49Mb-00YTWE; Thu, 12 Oct 2017 17:32:00 +0200 From: Arnd Bergmann To: Alexander Viro Cc: Nicolas Pitre , Arnd Bergmann , Ingo Molnar , Nicolas Pitre , Frederic Weisbecker , Mickael GUENE , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] elf_fdpic: fix unused variable warning Date: Thu, 12 Oct 2017 17:31:46 +0200 Message-Id: <20171012153158.2840511-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:Vex8M6TMwnskJ++iUWvvqbM6D2n3D/JIzKYuRczlJ7Q0PZzi8sU LYjz+Aa2HTmsMzCuAmspPmxcjMRfN4lDT6a4sDTE0G4ZFzfpL1HmkX2lotdlkoBPj0OJ8bL jykBzP6dDb5EoFRsBaEQb/alXT8tf8tO71Yt8IAIA7UuN2HjaMb+MflSrWc3bglXAz5rIfc r7aAP0QQaMgzeD9qCn0ag== X-UI-Out-Filterresults: notjunk:1; V01:K0:ZG04KqudSMo=:gX4RS2uoxBd9Tmp676OSAX fwE67T7GXbhumDmbUJ+Y2gBKQ0yr9+niL3rGW4D3IY2WXjmonUCe/+u0K5LADzHHnYEgVbBPp rkAoMhxXnAjjJ6kGUTRlxfc39URwfrlx0YWWvYp8SUlHHd2/rdJ//C+nDNBeh1vXyUTOnX6l7 l+Ukw6fwHeFJBOycR0awsXvIxMJQuqZX4tdcCklpMWXOSnXk9LBMshJoPFRn/5NfGQpyTpAkM jhPSurVRxRHam4rIFFekURdBr4UXpkecObHmLjgc+C3pz5Y0NS20pIWG6WcXErXQh1rE/G3uU wTcmdYJoK3eMPZwFOAj8L8hpl6Juf1Wlbvv3GQpFgFMwngxo1lC4KYmUOsTaaOHEU3r5MgBSu S8XXySI01RvikO9tAYDnuXVVgr9xPZ4RzR5CGSvhDf8RtheXhni09Bc1t60yr9VVD/t5/9WlW vspVLptrdcijof/kvux5PZCkJcebfjNOK/UVuk9cFOeqNS6VPAG4aVqZFHrZJFfLdKooDmUgX fS/519Q9/WWkjimil8XyAaotofNU8OFxydbDdnW8tGJRojsYUxWR+1mwETP3PvZV6rdSiMJuP CRba38sYqC4LY2V1OwYXnzbNOtmqo2m8TzbeR751II5fvMHjdHg7o6UcyKvfv2X3z+H6j84+G Y/hnZ0U+Vixy7zI4su28w/3rkiLK+QufX87OMyJz/gygUDqLu6HjqA9oQ4qSITLgrF2oZbChM D/jfFhJHx+qJBn7vnNkesgXhdHGwoTsRon4JMA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The elf_fdpic code shows a harmless warning when built with MMU disabled, I ran into this now that fdpic is available on ARM randconfig builds since commit 50b2b2e691cd ("ARM: add ELF_FDPIC support"). fs/binfmt_elf_fdpic.c: In function 'elf_fdpic_dump_segments': fs/binfmt_elf_fdpic.c:1501:17: error: unused variable 'addr' [-Werror=unused-variable] This adds another #ifdef around the variable declaration to shut up the warning. Fixes: e6c1baa9b562 ("convert the rest of binfmt_elf_fdpic to dump_emit()") Acked-by: Nicolas Pitre Signed-off-by: Arnd Bergmann --- v2: fixed changelog text --- fs/binfmt_elf_fdpic.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.9.0 diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c index 5429b035e249..429326b6e2e7 100644 --- a/fs/binfmt_elf_fdpic.c +++ b/fs/binfmt_elf_fdpic.c @@ -1498,7 +1498,9 @@ static bool elf_fdpic_dump_segments(struct coredump_params *cprm) struct vm_area_struct *vma; for (vma = current->mm->mmap; vma; vma = vma->vm_next) { +#ifdef CONFIG_MMU unsigned long addr; +#endif if (!maydump(vma, cprm->mm_flags)) continue;