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: 9849383 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 9A54E602A7 for ; Tue, 18 Jul 2017 19:53:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 818C222BF1 for ; Tue, 18 Jul 2017 19:53:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7604727FA6; Tue, 18 Jul 2017 19:53:57 +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=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0E3F522BF1 for ; Tue, 18 Jul 2017 19:53:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752197AbdGRTxp (ORCPT ); Tue, 18 Jul 2017 15:53:45 -0400 Received: from mail-oi0-f68.google.com ([209.85.218.68]:35469 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751500AbdGRTxm (ORCPT ); Tue, 18 Jul 2017 15:53:42 -0400 Received: by mail-oi0-f68.google.com with SMTP id h143so1731313oic.2; Tue, 18 Jul 2017 12:53:41 -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=YRcWVB231QvD35IZDX+ZvIuSLmW+xhXvdTvauWzIVYLxB0CtL180l6oamRt4VFvn2z Aox4V1Q5s31XJFgw1jomq9vDr8rR8Je3NzKZTL1PnInNBUhjx2ecQjaqKrESzUdWh2Jd nE20JiaW2OhY5/YqwBPmygPiB3eXP7WdVFLECTHVZ1f7BBBqBSf0D9bOzx+z/I0g6e/P XyJ0MCPKGSkb0zHEVkfEuM4mRljAC/Lp6hUj5k7ptM+wEsYotUyEHPLSLX3a3sVFuSGN ReY2iiJZIsqZ6pNcZTp7P96hZUVy7Z8AiVM5cgKjck6QsoqsqEIPtPcwJXHHAsurMmvx osvg== X-Gm-Message-State: AIVw111LyZmvXsGx1Dh9xtGq9agB/Vabyg1tq+2ZCLG2bifYNZ4wbXu5 LZAb0ajkWlWsYlcjQ43rrFj5bASE9A== 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: "linux-kernel@vger.kernel.org" , Jiri Olsa , Greg Kroah-Hartman , Linus Torvalds , Tejun Heo , Guenter Roeck , IDE-ML , Linux Media Mailing List , Andrew Morton , dri-devel , Kees Cook , Ingo Molnar , Laura Abbott , Pratyush Anand Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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); }