From patchwork Tue Jul 18 19:53:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9849379 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 57ECB602A7 for ; Tue, 18 Jul 2017 19:53:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3E6BA22BF1 for ; Tue, 18 Jul 2017 19:53:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3301227FA6; Tue, 18 Jul 2017 19:53:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D24FF22BF1 for ; Tue, 18 Jul 2017 19:53:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D60956E109; Tue, 18 Jul 2017 19:53:43 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-oi0-x244.google.com (mail-oi0-x244.google.com [IPv6:2607:f8b0:4003:c06::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 281DF6E109 for ; Tue, 18 Jul 2017 19:53:42 +0000 (UTC) Received: by mail-oi0-x244.google.com with SMTP id n2so3428791oig.3 for ; Tue, 18 Jul 2017 12:53:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=28HPSD1568qfVuy1t7FDYmMjxyYgogy3OIv3ndSn7ag=; b=MTHE5FvXMoKhaK6kntI2mOl4gdGWyG/bf2ImbcFg5MnBi9lPrAXilVyr7/O5Wu6umI ZdQssx6HvVHpHsj7IEWQRh8JU66LcsvHFWyEWnybVa/HHmOAaCwVvhdJ7ib2ID6RVTJ2 h56eRjtsi2u8dV/TKL11D5ngjr4f+nOGCnrag7WCga0u8Fqlq/ptVn53M70jo1VDdY1z Ey5oMjOX4kWZs2HVGJHXq2M1k182zcY5ji4451Hhuvp+2Z0gSeyolybO1ygdZfeMet+x W5wNP6UzA0v2dYzNCN0vY0X6kDDx6oYMGeWCzBBktnSgobxoKhO3u/uH9ga/2VKu5hBm YpdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=28HPSD1568qfVuy1t7FDYmMjxyYgogy3OIv3ndSn7ag=; b=cRwAOdt6K6RQV9RiD3WL+zYviHPcmOJrorKpSkKjb/ggwsK5LDzNfDooSQKLFShPfp w/0UprEaSj7vh4XP/IvMZWZhWKCWWE7qTDHwa/3tntVTEQsUgt3rvnzxLLOleC08HBDH w611bk0Xl5AzPZ0lnG5EG3R82Wp+cZnYl48IgUhiaoG92oVuLe54hVSmkivI5d4CkPzl k19GXeiVQDy824/Fvf6YAvbHM3GqyzY7tdRl89FtU/8K+8GPd44jgIHO/H6NMpWAkf1m 5OaawCPTH/J8T2xgOf0ma27ov1WLC0EYUJwjRbDYNdHa5aPOjhHEkvsuQXr3ax+FI/BK IC7Q== X-Gm-Message-State: AIVw112S9vxxF3Axbh7bgwh+XqtHtXOcrAFhGLhhMinx5FZND6jzZ4iu vHgKk+AcRkeaMejfLfYV63HQdd9Wgg== X-Received: by 10.202.208.206 with SMTP id j75mr2042073oiy.61.1500407621373; Tue, 18 Jul 2017 12:53:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.80.170 with HTTP; Tue, 18 Jul 2017 12:53:40 -0700 (PDT) In-Reply-To: References: <20170714092540.1217397-1-arnd@arndb.de> <20170714092540.1217397-8-arnd@arndb.de> From: Arnd Bergmann Date: Tue, 18 Jul 2017 21:53:40 +0200 X-Google-Sender-Auth: wumBE5T1hi98gpVrj3xH0Jk5uu0 Message-ID: Subject: Re: [PATCH 07/14] proc/kcore: hide a harmless warning To: Ard Biesheuvel Cc: Pratyush Anand , Kees Cook , Greg Kroah-Hartman , "linux-kernel@vger.kernel.org" , dri-devel , IDE-ML , Jiri Olsa , Tejun Heo , Andrew Morton , Linus Torvalds , Ingo Molnar , Guenter Roeck , Linux Media Mailing List X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP On Fri, Jul 14, 2017 at 2:28 PM, Ard Biesheuvel wrote: > On 14 July 2017 at 10:25, Arnd Bergmann wrote: >> gcc warns when MODULES_VADDR/END is defined to the same value as >> VMALLOC_START/VMALLOC_END, e.g. on x86-32: >> >> fs/proc/kcore.c: In function ‘add_modules_range’: >> fs/proc/kcore.c:622:161: error: self-comparison always evaluates to false [-Werror=tautological-compare] >> if (/*MODULES_VADDR != VMALLOC_START && */MODULES_END != VMALLOC_END) { >> > > Does it occur for subtraction as well? Or only for comparison? This replacement patch would also address the warning: I have also verified that four of the 14 patches are not needed when building without ccache, this is one of them: acpi: thermal: fix gcc-6/ccache warning proc/kcore: hide a harmless warning SFI: fix tautological-compare warning [media] fix warning on v4l2_subdev_call() result interpreted as bool Not sure what to do with those, we could either ignore them all and not care about ccache, or we try to address them all in some way. Arnd diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c index 45629f4b5402..35824e986c2c 100644 --- a/fs/proc/kcore.c +++ b/fs/proc/kcore.c @@ -623,7 +623,7 @@ static void __init proc_kcore_text_init(void) struct kcore_list kcore_modules; static void __init add_modules_range(void) { - if (MODULES_VADDR != VMALLOC_START && MODULES_END != VMALLOC_END) { + if (MODULES_VADDR - VMALLOC_START && MODULES_END - VMALLOC_END) { kclist_add(&kcore_modules, (void *)MODULES_VADDR, MODULES_END - MODULES_VADDR, KCORE_VMALLOC); }