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=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham 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 ECA67C433F4 for ; Sun, 26 Aug 2018 18:50:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 888FE204EC for ; Sun, 26 Aug 2018 18:50:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 888FE204EC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=perches.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726847AbeHZWdc (ORCPT ); Sun, 26 Aug 2018 18:33:32 -0400 Received: from smtprelay0074.hostedemail.com ([216.40.44.74]:38805 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726625AbeHZWdc (ORCPT ); Sun, 26 Aug 2018 18:33:32 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay06.hostedemail.com (Postfix) with ESMTP id 6B1931801DFA2; Sun, 26 Aug 2018 18:50:09 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: wheel42_3b48526abfd4e X-Filterd-Recvd-Size: 1894 Received: from XPS-9350.home (unknown [47.151.153.53]) (Authenticated sender: joe@perches.com) by omf02.hostedemail.com (Postfix) with ESMTPA; Sun, 26 Aug 2018 18:50:07 +0000 (UTC) Message-ID: <6c81222980f0f81732726b405df6dbf2b8f98844.camel@perches.com> Subject: Re: [PATCH] include/linux/compiler*.h: Use feature checking instead of version checks for attributes From: Joe Perches To: Miguel Ojeda , Linus Torvalds Cc: Eli Friedman , Christopher Li , Kees Cook , Ingo Molnar , Geert Uytterhoeven , Arnd Bergmann , Greg Kroah-Hartman , Masahiro Yamada , Dominique Martinet , Nick Desaulniers , linux-kernel@vger.kernel.org Date: Sun, 26 Aug 2018 11:50:06 -0700 In-Reply-To: <20180826175748.GA29525@gmail.com> References: <20180826175748.GA29525@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.28.1-2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2018-08-26 at 19:57 +0200, Miguel Ojeda wrote: > Instead of using version checks per-compiler to define (or not) each attribute, > use __has_attribute to test for them, following the cleanup started with > commit 815f0ddb346c ("include/linux/compiler*.h: make compiler-*.h mutually exclusive"). Very nice. Thank you Miguel. trivia: I believe the alphabetic sorting of the required attributes makes reading by use a bit difficult and I would prefer that various required attributes are sorted by logical use instead. ie: keep noinline and __always_inline together, keep __used and __always_unused together, etc...