Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp602670pxb; Thu, 9 Sep 2021 08:01:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmDOEsTQvss8q5feuNgsXtzQWfi8svDDwnklppRsdHR6RR9FK5y349HdDgtUZ5XZGM09VA X-Received: by 2002:a05:6638:5aa:: with SMTP id b10mr250326jar.76.1631199693522; Thu, 09 Sep 2021 08:01:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631199693; cv=none; d=google.com; s=arc-20160816; b=Q5lR2QNXxGYToBSkqd+Xj8CGwGWH7Hkh+UKl1ophWl5atPHxKLwYrBNbR7RZ1lEYw/ SaSocAzvugDv46Tg2qkuHWGYqppKWeu28YP7VFJJzdWdWg0pWQjKBJ/67hzlbvr+UGFN MPavR7mNGMN6bMuh5esC+CdTpG8LEd6hZK1F27OD/cII+gi71N3PF8pLNssXcP9Y1jq7 D8xxiaz8ygUgvy9ONyGw3HhTTVNuQ40HvDJcdU4rKt6wXeSLNzt0tbsBOIy6zmfuyDWQ AK9zn1mcmaITQoSaEsaHf5SM3NyYJtgiXV+zGlPTzpLkTlpgJsfjY+UFJRUAGwOIY5Mi sdzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:sender:dkim-signature; bh=cdZ5UReirNbJCz4qtRz9jPX8lIr89503B9bA6FIRuzQ=; b=KVsw7IGZ+1l0sJTsyqaXWFx0yJJ8tDU8bq3pUIV6/aP6BbDeZOPQPnFoyHnr+iO2WO O6xtRqXAacEulwBzbSLmTI5/aksGQusGNjWQHxuiBPcS/erco8qLAdN35AUGZ62UBeed PD1WwRP4ihTsn5D7D5hnzfGSBlsdyxhJITgUZOmP+qV3MQ1Ty0stUVncZuvngVi2IhL6 hQ0mFZHimmdNwdZEKq4jNTS4Leco3zVhHhUFWti92LGBDVMEUdwtrJE4SigQox5xtfQb JKeLPwwSspdqK5mAucsEMRhHteFT0OC+kjksAnpcFo89NY8TJrTBa3Plzed4wjX3KgT2 u8hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=jDgnkGSK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h9si1706130ioh.20.2021.09.09.08.01.11; Thu, 09 Sep 2021 08:01:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=jDgnkGSK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236587AbhIIPBP (ORCPT + 99 others); Thu, 9 Sep 2021 11:01:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236425AbhIIPBK (ORCPT ); Thu, 9 Sep 2021 11:01:10 -0400 Received: from mail-oi1-x234.google.com (mail-oi1-x234.google.com [IPv6:2607:f8b0:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9375EC061574 for ; Thu, 9 Sep 2021 08:00:00 -0700 (PDT) Received: by mail-oi1-x234.google.com with SMTP id 6so2820910oiy.8 for ; Thu, 09 Sep 2021 08:00:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=cdZ5UReirNbJCz4qtRz9jPX8lIr89503B9bA6FIRuzQ=; b=jDgnkGSK/AzbQ/fvUe+F8Q6VZgBkRHWd4DcBMpA845U1VP2maB6KuDUGyL8c2z1MQ5 UX6S2hMX3XaL+wIg8XPiRW3uTqvaEgPp8GwPJPJByHRkVu8WdVGBxNU7ND2J8PWd6MjQ 1BL0tMyxa7ZdE0Z2Q+WzTnNgCJ+YMSVMHlQ3G1GlF5G2afc7lU4RB3k5FIovm8QarUG7 RPmR6TFjaMcSuvD67sPx0N8yWJj2K9lVY4kxvs9O3saKM+uEhuFWmi956IZGiUFIdrmY hqz6C5u3zKx731XS7IajOTZL1HWrKGy6fsTJ74ufvBqwljrPlIixlbiTt+K2g3iOZX5u avbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=cdZ5UReirNbJCz4qtRz9jPX8lIr89503B9bA6FIRuzQ=; b=AaCqov0hhO/9VyFyEd/zvAcQBB5SZfMYe/p4ZwuIzOsuH/m91Uq/6E2OlDUhrdicwH 7JVH7G5ZgR1omXf6dgn3ufiWCu8uEEkeo4SA+97VboR63KaaikX0C/ZkNebjYfKLZNi/ I2tV3Fiba3yq3x2VLw+kl4Y4ULNmzkB2e1W0doND+RcVtYy8+7aSDKJFzJmLy+FpdO/q mdI1yYe7PSybNs2rcOGptV17/Yxguf/3UGn9eJTlqsbxGZnkKjANsSKDC5F3dOa0iWSl MJzVWw8iOczNUpKUe2qGG8jGL1S0LPxLGp3AuB2j9J2Y1M/opr7xrp9M8o8Gt/07g59b 68XA== X-Gm-Message-State: AOAM533Vrxak+H7jQ6bkqnSROWzgCQfzE0Fws2WcOHoxwlb5Hxk/jhX0 foeHE0AACGzxt7EnDH6YWO4= X-Received: by 2002:aca:1709:: with SMTP id j9mr233084oii.120.1631199599971; Thu, 09 Sep 2021 07:59:59 -0700 (PDT) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id l44sm475368otv.81.2021.09.09.07.59.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 09 Sep 2021 07:59:59 -0700 (PDT) Sender: Guenter Roeck Subject: Re: [PATCH] Enable '-Werror' by default for all kernel builds To: =?UTF-8?Q?Christian_K=c3=b6nig?= , Christoph Hellwig , Marco Elver Cc: Nathan Chancellor , Arnd Bergmann , Linus Torvalds , Linux Kernel Mailing List , llvm@lists.linux.dev, Nick Desaulniers , Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-riscv@lists.infradead.org, Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Andrey Konovalov , kasan-dev@googlegroups.com, "Pan, Xinhui" , amd-gfx@lists.freedesktop.org References: <20210906142615.GA1917503@roeck-us.net> <75a10e8b-9f11-64c4-460b-9f3ac09965e2@roeck-us.net> <78aeab09-de88-966f-9f03-a2d56a0a6064@amd.com> From: Guenter Roeck Message-ID: <80a56a5a-5351-1897-b87e-3c3cd84bb13c@roeck-us.net> Date: Thu, 9 Sep 2021 07:59:56 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <78aeab09-de88-966f-9f03-a2d56a0a6064@amd.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/9/21 12:30 AM, Christian König wrote: > Am 09.09.21 um 08:07 schrieb Guenter Roeck: >> On 9/8/21 10:58 PM, Christoph Hellwig wrote: >>> On Wed, Sep 08, 2021 at 11:58:56PM +0200, Marco Elver wrote: >>>> It'd be good to avoid. It has helped uncover build issues with KASAN in >>>> the past. Or at least make it dependent on the problematic architecture. >>>> For example if arm is a problem, something like this: >>> >>> I'm also seeing quite a few stack size warnings with KASAN on x86_64 >>> without COMPILT_TEST using gcc 10.2.1 from Debian.  In fact there are a >>> few warnings without KASAN, but with KASAN there are a lot more. >>> I'll try to find some time to dig into them. >>> >>> While we're at it, with -Werror something like this is really futile: >>> >>> drivers/gpu/drm/amd/amdgpu/amdgpu_object.c: In function ‘amdgpu_bo_support_uswc’: >>> drivers/gpu/drm/amd/amdgpu/amdgpu_object.c:493:2: warning: #warning >>> Please enable CONFIG_MTRR and CONFIG_X86_PAT for better performance thanks to write-combining [-Wcpp >>>    493 | #warning Please enable CONFIG_MTRR and CONFIG_X86_PAT for better performance \ >>>        |  ^~~~~~~ > > Ah, yes good point! > >> >> I have been wondering if all those #warning "errors" should either >> be removed or be replaced with "#pragma message". > > Well we started to add those warnings because people compiled their kernel with CONFIG_MTRR and CONFIG_X86_PAT and was then wondering why the performance of the display driver was so crappy. > > When those warning now generate an error which you have to disable explicitly then that might not be bad at all. > > It at least points people to this setting and makes it really clear that they are doing something very unusual and need to keep in mind that it might not have the desired result. > That specific warning is surrounded with "#ifndef CONFIG_COMPILE_TEST" so it doesn't really matter because it doesn't cause test build failures. Of course, we could do the same for any #warning which does now cause a test build failure. Guenter