From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 49A5BC433F5 for ; Mon, 20 Sep 2021 16:27:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 260F061019 for ; Mon, 20 Sep 2021 16:27:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233925AbhITQ23 (ORCPT ); Mon, 20 Sep 2021 12:28:29 -0400 Received: from mail-ua1-f52.google.com ([209.85.222.52]:39439 "EHLO mail-ua1-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229914AbhITQ21 (ORCPT ); Mon, 20 Sep 2021 12:28:27 -0400 Received: by mail-ua1-f52.google.com with SMTP id o13so11529695uat.6; Mon, 20 Sep 2021 09:27:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9xo0jIRnxuOOhc30CoYi6LuiF/umxAgJKZ4MGnDGawY=; b=AvbAGzmFZrVlKy02rhpai2UDe2k2fRcVQCIo8Cf5AP/tqrfdBVVqyhHDCGwVloe8GA i1Y+ItCUBbpJps8OjHbxe5ce1r/TzjRnz3njhy3XP5/0Nn+SrSbCASMbhGurJ0VDf0CF Sv8/55IjhgONNhrn6xLPlDoCuGn7SJUt10L/CrPRHn6eI5q9gQ1jJUWhyFLElXH9Tmt1 bZM5hV2y+sqxFsKDT1LN3XKQq1Kea8jnmScItGLZRqB9uXpfogHTd+S4NZrMNJtnEHDf Ax9Kdr+kC2JAHEFC/HAthiHSA4jJjl2lS7V6AemPEj1MPFOa+HAFY1MecWYb+jjbu+Ly HinA== X-Gm-Message-State: AOAM533GBVXpl2NVjfxeQGFZW/t1rw/hT6Qs6T22J0IxAyIj1r1UAELu 7LjRf+xMJ6wU+U3NaGNZs+uedINMh7s3YeGwjLQ= X-Google-Smtp-Source: ABdhPJwoB/0/VBD9Bv7XJkpjjyCTFva9x1S/l0eGg68vZoWX7Uope7tWe5j8vOPoSsjhkKDy81kIFBG7m6cIsfz+iVo= X-Received: by 2002:ab0:6dc7:: with SMTP id r7mr12548577uaf.14.1632155219490; Mon, 20 Sep 2021 09:26:59 -0700 (PDT) MIME-Version: 1.0 References: <20210907183843.33028-1-ndesaulniers@google.com> <20210913093256.GA12225@amd> <20210913100230.GB11752@amd> In-Reply-To: <20210913100230.GB11752@amd> From: Geert Uytterhoeven Date: Mon, 20 Sep 2021 18:26:48 +0200 Message-ID: Subject: Re: [PATCH] Revert "Enable '-Werror' by default for all kernel builds" To: Pavel Machek Cc: Greg Kroah-Hartman , Randy Dunlap , Linus Torvalds , Marco Elver , Nick Desaulniers , llvm@lists.linux.dev, LSM List , linux-toolchains@vger.kernel.org, Arnd Bergmann , Guenter Roeck , Kees Cook , Mark Brown , Masahiro Yamada , Nathan Chancellor , Michal Marek , Andrew Morton , Vipin Sharma , Chris Down , Rasmus Villemoes , Daniel Borkmann , Vlastimil Babka , Linux Kbuild mailing list , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-toolchains@vger.kernel.org On Mon, Sep 13, 2021 at 12:50 PM Pavel Machek wrote: > > > Do we really want developers treat warnings as errors? When the code > > > is okay but some random version of gcc dislikes it... > > > > > > Plus, there's question of stable. We already get ton of churn there > > > ("this fixes random warning"). WERROR will only encourage that... > > > > I will not be backporting this patch to older stable kernels, but I > > _want_ to see stable builds build with no warnings. When we add > > warnings, they are almost always things we need to fix up properly. > > Well, everyone _wants_ to see clean builds... unless the price is too > high. > > > Over time, I have worked to reduce the number of build warnings in older > > stable kernels. For newer versions of gcc, sometimes that is > > impossible, but we are close... > > You clearly can't backport this patch, but for 5.16-stable, you'll > have it in, and now warnings are same as errors... and I don't believe > that's good idea for stable. The good thing about the config option is that there's now a single point to enable or disable -Werror. In the past, maintainers sprinkled -Werror all over the various Makefiles in the tree, which means you have to edit multiple files to disable it again. Background: I've been investigating an issue that involved building old v2.6.x kernels. Apart from having to use very old compilers, it still caused compiler warnings that obviously weren't seen with the slightly different compiler versions used by maintainers who added -Werror. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds