Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2817910ybi; Mon, 17 Jun 2019 10:54:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqyToqLHsJd+ha1cRWGWeYK2DtVVkBWlDqoGE8uVQBBgwjPwQFji/++uWMlzjnMwPoCZ+96J X-Received: by 2002:a17:902:f01:: with SMTP id 1mr108186091ply.170.1560793783343; Mon, 17 Jun 2019 10:49:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560793782; cv=none; d=google.com; s=arc-20160816; b=pQCkjOxeVwZHrcys/d2xK7Lgsx5FYnWB9oY8SClN9QSMVbbdTSwP9UDgoh4oQonDyy hGZTwfqNKGurL9a+tj26QuL6BX+rIQ5M/FfMVX6vb8IUAx365s6gwHHA/RNN91pN3D7/ hqJ5FOtVoqg2tqkApeMgFasySPTtQgLAgnRhYaq2Mn9s66y0mol3EinjU1wINeb2pqBb CdhotpuuN9PEQWtrkdjN4hPDjt7VqaUYcNy8He6v6tfKVrKBnA350HIssuIQFxRYApk5 rCRGfsyrrK72tmScRSRTW2ImtPd+AoTTbWu7Bz2uYUkYeQ9jkL3quezEfvBeb8wxwxin HBeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=H7vdD9VPFK0+Xky8RLVoGN1gXzJuRD+60CWyOI7Wh4A=; b=rDVN1fHh/QA+1Jh628EX+kVGpToJk03ekUHnhhZQ3rPuwK2hh91wcvecu2EdqvWWeW +kQf95UgetbHfaQd5EBwMOX2STFtLk4WM5jA82nmK02TKCxnXPjWa1ORQxrJQq9s92eQ ytr4GICnAVXGZTAkNVDXJrlXoesVYsI9od69X4LFN9UeUULJE6mHzX31XA1x+cJR30QK Nwc8/x9GHikEhG3e8HHnHCKSxq+KPjUUptD591/0p2/5q0LWwox6Hy4yLPjuDdfZGdxW AaceY26Kt4eUshzEj+czhi/2D0hq/O7Q15bAWR7yka+RHohlkTXSPVd4VIZ8C0pWaoLG xoIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=LedKRuqO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a64si2754854pla.432.2019.06.17.10.49.23; Mon, 17 Jun 2019 10:49:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=LedKRuqO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727783AbfFQRtT (ORCPT + 99 others); Mon, 17 Jun 2019 13:49:19 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:42415 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726004AbfFQRtT (ORCPT ); Mon, 17 Jun 2019 13:49:19 -0400 Received: by mail-pg1-f196.google.com with SMTP id l19so6203151pgh.9 for ; Mon, 17 Jun 2019 10:49:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=H7vdD9VPFK0+Xky8RLVoGN1gXzJuRD+60CWyOI7Wh4A=; b=LedKRuqOQ3UYxWZRgPkUVmbQ4KRO9oI0h/OfrWpqyJbhKuReDUkOD57gXsf+wE1Gfg bqnbC+Rr3DYGd9Wv3sXqe6ZhTP7XbDDHNZ9WCGO+v6FM2EHOqNfglqV9XAzdq/P/Nkf5 N7ork70khfcfYUBTDJc314YGJYi8yHI+UCY3OUzIyQQxSJHYABm7XTwrKjejEntYpSKs UFh2R5bwKkvyoXsP6+OZYFS/OW1RmlsRV7ZDCXQz9Q7ufcyg4u+SoNEi3ueSfzjaaKA5 IGc1OL0juhlJUK8kAmNu+I/Qeo0GefNCwXxyGhrBWTw876uuRJDlTzc8PqvZuv0oBmV3 EBZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=H7vdD9VPFK0+Xky8RLVoGN1gXzJuRD+60CWyOI7Wh4A=; b=EOdcLgEd1ImlqkNXWuq2ZOcmaORoO/5r8Tk6GIIGjD96jLaxJjHA4FqwZwlnonAMdj XJf4G4aET9/39hGrgxnkumD6HbccTdXAnsPod7M1vQuVtPSoaJAaZVdJwoeFWT6vOuSo zADkw0z5YFl2fT1YEF9A3dZM7VnI0nSzimlG/QmoJkOb76Yhq9x7TMiDwYlOrF4WDsoI pKG8hb0KcvR4Juk/QKVV3BG6C6h4hD722kheYWOkCllRgSlzK/72QTKQjeea757vwHvK EdmLn1tHQnsREkr+0x4qJi144VFvh9a3nflgcYJ8IyZiMzgE51l0oi8CgwBGqpqZOXhS wO7w== X-Gm-Message-State: APjAAAUaaGYONsyZiwc3/+iu7KQ6QsJjj55O4tVHmbwpBn53Op8Ax0Qm TA5bdnS7Jzytl1pJm+797uB012SlvxdwdVIkEPqgVQ== X-Received: by 2002:a17:90a:2488:: with SMTP id i8mr26781289pje.123.1560793742592; Mon, 17 Jun 2019 10:49:02 -0700 (PDT) MIME-Version: 1.0 References: <20190617172829.164520-1-nhuck@google.com> In-Reply-To: <20190617172829.164520-1-nhuck@google.com> From: Nick Desaulniers Date: Mon, 17 Jun 2019 10:48:51 -0700 Message-ID: Subject: Re: [PATCH] kbuild: Remove unnecessary -Wno-unused-value To: Nathan Huckleberry Cc: Masahiro Yamada , Michal Marek , Linux Kbuild mailing list , LKML , clang-built-linux Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 17, 2019 at 10:28 AM Nathan Huckleberry wrote: > > This flag turns off several other warnings that would > be useful. Most notably -warn_unused_result is disabled. > All of the following warnings are currently disabled: > > UnusedValue > |-UnusedComparison > |-warn_unused_comparison > |-UnusedResult > |-warn_unused_result > |-UnevaluatedExpression > |-PotentiallyEvaluatedExpression > |-warn_side_effects_typeid > |-warn_side_effects_unevaluated_context > |-warn_unused_expr > |-warn_unused_voidptr > |-warn_unused_container_subscript_expr > |-warn_unused_call > > With this flag removed there are ~10 warnings. > Patches have been submitted for each of these warnings. > > Reported-by: Nick Desaulniers > Cc: clang-built-linux@googlegroups.com > Link: https://github.com/ClangBuiltLinux/linux/issues/520 > Signed-off-by: Nathan Huckleberry Most importantly, it fixes __must_check, which has been silently not working w/ Clang. Nathan sent patches for the issues we could find w/ x86_65 and arm64 allyesconfig builds, and even fixed a bug in Clang. https://reviews.llvm.org/D63369 Thanks for all of the work that went into this. Reviewed-by: Nick Desaulniers > --- > scripts/Makefile.extrawarn | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn > index 3ab8d1a303cd..b293246e48fe 100644 > --- a/scripts/Makefile.extrawarn > +++ b/scripts/Makefile.extrawarn > @@ -68,7 +68,6 @@ else > > ifdef CONFIG_CC_IS_CLANG > KBUILD_CFLAGS += -Wno-initializer-overrides > -KBUILD_CFLAGS += -Wno-unused-value > KBUILD_CFLAGS += -Wno-format > KBUILD_CFLAGS += -Wno-sign-compare > KBUILD_CFLAGS += -Wno-format-zero-length > -- > 2.22.0.410.gd8fdbe21b5-goog > -- Thanks, ~Nick Desaulniers