Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2330874imm; Thu, 20 Sep 2018 11:19:21 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY4MG5AQitVJw7doqKMWKcQrWfdics6rxOcxtEk5oAbu1a4keaWXitiqTWdxCxOKYO50BVm X-Received: by 2002:a62:e11:: with SMTP id w17-v6mr43083419pfi.242.1537467560971; Thu, 20 Sep 2018 11:19:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537467560; cv=none; d=google.com; s=arc-20160816; b=C2sT0mJRjHdWOB09mTwT7e53Z6CIGacNgeOe+1BsyCq/iF8tO+9iztvx1+H2mxS2Pe 8ra/iVBGr8AF4ekLJJ1RKfNkzlpi4MfnJRjqY+cAuglwYNVYDfXunHl9SwYGShA5vtaj ISC1Em7h6ny51MpHlqkYUe2NsQAoBB/hGG6m//5Qw+Nu0kgbw0ikgdc4Mt3oL7XDzYnm eYrtVL27O10kkN8qoORjHVYJSgEdizMOzyMLJORfDK83xCt33kBLV4jfgiH/lJCJgyHQ KxlRzdMTG579B8NMe0ZlrncgE/WpxKljXaHZOf5DqiyTdUQiLnuuOhyE3ljDLM5TvbKm sJbw== 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=6dLv9BFMsAwxCi/XYmlJKxqLD7eDnACUAKnEAGhV/fQ=; b=vBzNgIihF/lFw5Qcdao2FcIrPMK4lPvuRLevNQpGHkE6LxlxG5MkDnNTl1yi0vRIlr zt0dOagM9oR+rdNKAMqd9v7ly9TauZyNjKuE4SuQV2TpiAdD7yekYFtrWHjuKEigxy+Q QJ+vAGtlflZrk/Vu4rFPMvpAakT943CrxThCorQLMuBIApbM35awPq1VQ83sFmLRW1ck rQpCNSAV5Ry9T5X3+33BiT/kmGqqhQviNFCLQlMrq15evl5gNgQyb1eSJHiEdsSVc6Us YpeJlRIJ1CbiuVt8VmrJloMsme3lxWUYELFgNw5AKZhN73ZgWMysWrF4ixL3z6iLwDmu bCQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=OqRd8fsY; 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 w135-v6si27309134pff.8.2018.09.20.11.19.05; Thu, 20 Sep 2018 11:19:20 -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=OqRd8fsY; 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 S2387951AbeIUADP (ORCPT + 99 others); Thu, 20 Sep 2018 20:03:15 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:34560 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727813AbeIUADO (ORCPT ); Thu, 20 Sep 2018 20:03:14 -0400 Received: by mail-pg1-f194.google.com with SMTP id d19-v6so4825358pgv.1 for ; Thu, 20 Sep 2018 11:18:29 -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=6dLv9BFMsAwxCi/XYmlJKxqLD7eDnACUAKnEAGhV/fQ=; b=OqRd8fsY65MwISMMW5lykrjmCcOT34FiK3qyFvRNMMqtivOS4oWGCJ+hBS4tpwLWYj 5glFiTQqmU6VVycj4LmI1uknhSxb6+qqpwM9pFwRevOQhbVdzNOmZ13M+pHIzWza8iO4 mG8+3XMBQUo7LYMn9zkpeRdowzcW4EVYBaAH29qDZdV5zvVA1XLpny8YG1D2f3pDuAt7 J3OhVtICODVPRlAEjeawPR2D07of4QACCWlGlf65YakLJsiR82UeAFPOhomLb6Osgtid lI5cDGTK+0pVsQyx8iInmv4BBWuPyj/bBxNYGEp4vyiuoOIU5eYwpk3aGP3p3fXYWKPn k2OA== 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=6dLv9BFMsAwxCi/XYmlJKxqLD7eDnACUAKnEAGhV/fQ=; b=Nnjz9A7DmJPw8hyKYko11Htf6rbpHElhnLJiLV8alAd2bMzscTJYQAy9aSPelzjgP1 gx9+mpJTbUOcz4nK5H+wkjegQhJFd35Rlncz2eGZWx7zG+W4JyaD6jcHpnjhajd8iqIT l6uNviuFLD5okMbisg71NGYMNaZrtPqG6owrJNxg69bAzIAavluMdwRqE89ZgmfzRNib /cb1MemwUtCjXWaD0zIJDJT9Mu+GtyrhIwNqFwy530oo/89t0jfB3P1VowwFH6wMI+Rr BEOkYs0MCZyAp6ZGpko0w/8RfI1V/cdCOVvRRgbF16TeZY0g7VbM1t0kGjY5IOjSpitd qW/A== X-Gm-Message-State: APzg51BvvIvRDCBxAxwlpObfDgL+iWYvN04nlY/eOom/MF1r009FWT2L 4nMbid7Jm6kQLNrbQ1+GzQrmR3WIiiw1ClfXERZ8SQ== X-Received: by 2002:a62:591a:: with SMTP id n26-v6mr42590521pfb.94.1537467508667; Thu, 20 Sep 2018 11:18:28 -0700 (PDT) MIME-Version: 1.0 References: <20180920172301.21868-1-miguel.ojeda.sandonis@gmail.com> In-Reply-To: <20180920172301.21868-1-miguel.ojeda.sandonis@gmail.com> From: Nick Desaulniers Date: Thu, 20 Sep 2018 11:18:17 -0700 Message-ID: Subject: Re: [PATCH v5 00/15] Compiler Attributes To: Miguel Ojeda Cc: Greg KH , LKML , adilger.kernel@dilger.ca, Masahiro Yamada , Michal Marek , rostedt@goodmis.org, mchehab+samsung@kernel.org, olof@lxom.net, konstantin@linuxfoundation.org, "David S. Miller" , Andrey Ryabinin , Kees Cook , Thomas Gleixner , Ingo Molnar , Paul Lawrence , sandipan@linux.vnet.ibm.com, Andrey Konovalov , David Woodhouse , Will Deacon , Philippe Ombredanne , paul.burton@mips.com, David Rientjes , w@1wt.eu, msebor@gmail.com, sparse@chrisli.org, Jonathan Corbet , tytso@mit.edu, Geert Uytterhoeven , Rasmus Villemoes , joe@perches.com, Arnd Bergmann , asmadeus@codewreck.org, Stefan Agner , Luc Van Oostenryck , Andrew Morton , Linus Torvalds , linux-doc@vger.kernel.org, linux-ext4@vger.kernel.org, linux-sparse@vger.kernel.org, Linux Kbuild mailing list 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 Thu, Sep 20, 2018 at 10:23 AM Miguel Ojeda wrote: > > The Compiler Attributes series is an effort to disentangle > the include/linux/compiler*.h headers and bring them up to date. > > The main idea behind the series is to use feature checking macros > (i.e. __has_attribute) instead of compiler version checks (e.g. GCC_VERSION), > which are compiler-agnostic (so they can be shared, reducing the size > of compiler-specific headers) and version-agnostic. > > Other related improvements have been performed in the headers as well, > which on top of the use of __has_attribute it has amounted to a significant > simplification of these headers (e.g. GCC_VERSION is now only guarding 4 > non-attribute macros). > > This series should also help the efforts to support compiling the kernel > with clang and icc. A fair amount of documentation and comments have also > been added, clarified or removed; and the headers are now more readable, > which should help kernel developers in general. > > The series was triggered due to the move to gcc >= 4.6. In turn, this series > has also triggered Sparse to gain the ability to recognize __has_attribute > on its own. > > Finally, the nonstring variable attribute series has been applied on top > of this one. > > You can also fetch it from: > > https://github.com/ojeda/linux/tree/compiler-attributes-v5 > > Enjoy! > > Cheers, > Miguel Thanks for this series. I've reviewed the rest of the patches in the series that didn't already have my reviewed by tags on them. They look good to go to me. > > Cc: Andreas Dilger > Cc: Masahiro Yamada > Cc: Michal Marek > Cc: Steven Rostedt > Cc: Mauro Carvalho Chehab > Cc: Olof Johansson > Cc: Konstantin Ryabitsev > Cc: David S. Miller > Cc: Andrey Ryabinin > Cc: Kees Cook > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: Paul Lawrence > Cc: Sandipan Das > Cc: Andrey Konovalov > Cc: David Woodhouse > Cc: Will Deacon > Cc: Philippe Ombredanne > Cc: Paul Burton > Cc: David Rientjes > Cc: Willy Tarreau > Cc: Martin Sebor > Cc: Christopher Li > Cc: Jonathan Corbet > Cc: Theodore Ts'o > Cc: Geert Uytterhoeven > Cc: Rasmus Villemoes > Cc: Joe Perches > Cc: Arnd Bergmann > Cc: Dominique Martinet > Cc: Stefan Agner > Cc: Luc Van Oostenryck > Cc: Nick Desaulniers > Cc: Andrew Morton > Cc: Greg Kroah-Hartman > Cc: Linus Torvalds > Cc: linux-doc@vger.kernel.org > Cc: linux-ext4@vger.kernel.org > Cc: linux-sparse@vger.kernel.org > Cc: linux-kbuild@vger.kernel.org > > v4 -> v5 > > * Removed the 2 __naked patches, since Greg just applied them to master; > and rebased on top of that. The only change in the range-diff is in > "Compiler Attributes: always use the extra-underscores syntax" due > to the move of __naked to compiler_types.h. > > * Applied the nonstring series on top of this one (last 4 patches). > Rationale: > - the nonstring series would anyway be modified again by this one > (so it has been rebased after the general cleanup). > - ext4's "local" nonstring was merged > - easier to manage (and easier to see the end result) > > The first 2 patches of the last 4 add the warning back at W=1 and > add the __nonstring attribute. The other two serve as an example > of usage and as a cleanup. > > * Cc lists removed from each commit; using a single list in the cover letter; > and a new, revised list of Cc (wider audience). > > Miguel Ojeda (15): > Compiler Attributes: remove unused attributes > Compiler Attributes: always use the extra-underscores syntax > Compiler Attributes: remove unneeded tests > Compiler Attributes: homogenize __must_be_array > Compiler Attributes: remove unneeded sparse (__CHECKER__) tests > Compiler Attributes: add missing SPDX ID in compiler_types.h > Compiler Attributes: use feature checks instead of version checks > Compiler Attributes: KENTRY used twice the "used" attribute > Compiler Attributes: remove uses of __attribute__ from compiler.h > Compiler Attributes: add Doc/process/programming-language.rst > Compiler Attributes: add MAINTAINERS entry > Compiler Attributes: add support for __nonstring (gcc >= 8) > Compiler Attributes: enable -Wstringop-truncation on W=1 (gcc >= 8) > Compiler Attributes: auxdisplay: panel: use __nonstring > Compiler Attributes: ext4: remove local __nonstring definition > > Documentation/process/index.rst | 1 + > .../process/programming-language.rst | 45 +++ > MAINTAINERS | 5 + > drivers/auxdisplay/panel.c | 7 +- > fs/ext4/ext4.h | 9 - > include/linux/compiler-clang.h | 5 - > include/linux/compiler-gcc.h | 70 +---- > include/linux/compiler-intel.h | 9 - > include/linux/compiler.h | 19 +- > include/linux/compiler_attributes.h | 258 ++++++++++++++++++ > include/linux/compiler_types.h | 101 +------ > scripts/Makefile.extrawarn | 1 + > 12 files changed, 341 insertions(+), 189 deletions(-) > create mode 100644 Documentation/process/programming-language.rst > create mode 100644 include/linux/compiler_attributes.h > > -- > 2.17.1 > -- Thanks, ~Nick Desaulniers