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=-19.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 D797DC433ED for ; Wed, 5 May 2021 17:50:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A9F2C611ED for ; Wed, 5 May 2021 17:50:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234732AbhEERvN (ORCPT ); Wed, 5 May 2021 13:51:13 -0400 Received: from conssluserg-04.nifty.com ([210.131.2.83]:48680 "EHLO conssluserg-04.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234283AbhEERuP (ORCPT ); Wed, 5 May 2021 13:50:15 -0400 Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) (authenticated) by conssluserg-04.nifty.com with ESMTP id 145HmlZd022765; Thu, 6 May 2021 02:48:48 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-04.nifty.com 145HmlZd022765 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1620236928; bh=ir46Etvd5HEmsWvvFCQEwM57MdYnrHyoHbe/TY2pWzc=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=LNOr7+LT36L3hMmoIpQlw1KSWsGcQ8iTqxP+zvh4E3ASO2V0LSG7a84Hu40OLhWre p/EjMtKaS+GK6WMyyP/X9n/OMlTrMkXLA2DM0WECrVxW3/e5DPIuFHsEJz2yb/2WRQ xkPakWttikbI9V2YirUlPjaxi8bMhRS2QLBN0abxLrGTvGrUn3OJLyT9u7I8wRRutd JEakrqgfZjelHPPtCNosmDxAe7ecdzIcs0V0F0GnJLdHghh44Ts/huRp3QVSCzByAx tPRDFuJRP40tEBnYkNqj30U1NJuPpUCbKAhJN6g/r6rCaKCfwi3sXAuoLeGEX0rdIZ Eo46c3+uQpc5g== X-Nifty-SrcIP: [209.85.210.181] Received: by mail-pf1-f181.google.com with SMTP id k19so2559973pfu.5; Wed, 05 May 2021 10:48:48 -0700 (PDT) X-Gm-Message-State: AOAM530DDvNWoh7d/VmROT8HBh7H92R1Ze6oyxcnprNuPu8DZN4Eh7d8 6/A5SeeeQWpqmrOrxKtUwY3oukm4UMAsNKJPNvI= X-Google-Smtp-Source: ABdhPJyCdBNyaOJiflaHdKR5PDKWCDLq+i4udJVtRFg/IF7IUqeC4W+j41RUQLwaR6bp40Gl4VrnSwz494BFHuJN31U= X-Received: by 2002:a63:e044:: with SMTP id n4mr107487pgj.47.1620236927301; Wed, 05 May 2021 10:48:47 -0700 (PDT) MIME-Version: 1.0 References: <20210429012350.600951-1-nathan@kernel.org> In-Reply-To: <20210429012350.600951-1-nathan@kernel.org> From: Masahiro Yamada Date: Thu, 6 May 2021 02:48:09 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] Makefile: Move -Wno-unused-but-set-variable out of GCC only block To: Nathan Chancellor Cc: Michal Marek , Nick Desaulniers , Linux Kbuild mailing list , Linux Kernel Mailing List , clang-built-linux , stable Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 29, 2021 at 10:24 AM Nathan Chancellor wrote: > > Currently, -Wunused-but-set-variable is only supported by GCC so it is > disabled unconditionally in a GCC only block (it is enabled with W=1). > clang currently has its implementation for this warning in review so > preemptively move this statement out of the GCC only block and wrap it > with cc-disable-warning so that both compilers function the same. > > Cc: stable@vger.kernel.org > Link: https://reviews.llvm.org/D100581 > Signed-off-by: Nathan Chancellor > --- Applied to linux-kbuild. Thanks. > Makefile | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/Makefile b/Makefile > index f03888cdba4e..911d839cfea8 100644 > --- a/Makefile > +++ b/Makefile > @@ -775,16 +775,16 @@ KBUILD_CFLAGS += -Wno-gnu > KBUILD_CFLAGS += -mno-global-merge > else > > -# These warnings generated too much noise in a regular build. > -# Use make W=1 to enable them (see scripts/Makefile.extrawarn) > -KBUILD_CFLAGS += -Wno-unused-but-set-variable > - > # Warn about unmarked fall-throughs in switch statement. > # Disabled for clang while comment to attribute conversion happens and > # https://github.com/ClangBuiltLinux/linux/issues/636 is discussed. > KBUILD_CFLAGS += $(call cc-option,-Wimplicit-fallthrough,) > endif > > +# These warnings generated too much noise in a regular build. > +# Use make W=1 to enable them (see scripts/Makefile.extrawarn) > +KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable) > + > KBUILD_CFLAGS += $(call cc-disable-warning, unused-const-variable) > ifdef CONFIG_FRAME_POINTER > KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls > > base-commit: d8201efe75e13146ebde433745c7920e15593baf > -- > 2.31.1.362.g311531c9de > -- Best Regards Masahiro Yamada