Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp680175imm; Fri, 31 Aug 2018 10:16:54 -0700 (PDT) X-Google-Smtp-Source: ANB0VdajHsaRLZxhNMV5800PshDLt8WarLVtUHC0n4AanZBypCrzMf6RGoSzaXDu7rWBKUciZIjc X-Received: by 2002:a17:902:8506:: with SMTP id bj6-v6mr16218337plb.210.1535735814124; Fri, 31 Aug 2018 10:16:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535735814; cv=none; d=google.com; s=arc-20160816; b=eWsqoZMYfVGjyHDngKNipsRoaXGzrHrJ6ohYTaui287BPlpjS/uiV+GyS+8RzNgFGi t8OJ/1nDfKVFpb9sS6v45ou+B84bUe/ocdmHeu3m472mjcpiXY+O2Po12yqbkD8SH1wn j/vBy1nm6F6R5GcdtIaslAZFlBsEhTjtGhikgKRxjNtsJQotw1O/0AntfwxbF5yGv1xY DpR4gWbdLvmCqyPz2PjHvjCqO/yjFsOTXjKVB+RxRAKwemXAElNZ5ICVGe2j/2uCx0Dx G5sGCwAEExJCya9eHFmWlD8Zv0wrHlTSL1mF6oTNmWObmIDQvu/ElyVcslzxNV7XyXTY 8J4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=MattRFtonwDaxU1QdB3LlHBD2lClNUTulWxSVvPqfV4=; b=Ffn6Tb/XB+8YSIZrqRRWHoD6/Bx+zEM6V2nLrvShorgCGKNGGcrxBahSNAM0uyeln/ y4A1Ibr6Uyzs1N3rHD7B87V8EhCMWANOhGW39tdzqDB9RhkSsEd0QjD37A7/fldD1EIF YB/PmRwTwE/o/W0fXP8oxsxdBVokpXCNG4W1KcUmQwdoXCmHXSIl69ZdXPTTZ4KQDUsu OM1P1bEFhfUV4ndtKJ8Li19ZVaMlO/u3xzyETiQO6tp8y469XWGM4feOtM6X6lArBhXU RHRbe/SFiEjKjr8Zvl4ADAU/iG2AngzmqNMOq4k0oRuBGpB0G0OAoUiKKagwIoY5Seyy hXxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Oz0tvJh8; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x24-v6si8382827pgv.685.2018.08.31.10.16.39; Fri, 31 Aug 2018 10:16:54 -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=@gmail.com header.s=20161025 header.b=Oz0tvJh8; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728165AbeHaVNt (ORCPT + 99 others); Fri, 31 Aug 2018 17:13:49 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:34173 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727501AbeHaVNt (ORCPT ); Fri, 31 Aug 2018 17:13:49 -0400 Received: by mail-wm0-f66.google.com with SMTP id j25-v6so3822108wmc.1 for ; Fri, 31 Aug 2018 10:05:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=MattRFtonwDaxU1QdB3LlHBD2lClNUTulWxSVvPqfV4=; b=Oz0tvJh81l/+cJktUQCCwgeDOu87PT/dPzt13F8UfNf73t3NjAjYQaAGwRCs6jyF6n 3bnuksa1siQ69roacdWrTdxyLJJXFNitbRgLhESDExwMmueXUzcLKpwWmciTrxdMTPLj fN32YbX3QJ2u671IOm5rbZ24wk9a10QzpXqPFaDE4mgrh6+8XcGrx6edeaDhLp8UjEKr It2V0wgg/sevhu1zjj9iwhV7GzWsYFlz/mb8HHiHi5zoE0n4ugaVpgHtl8fYL0F+bvaF WpS35ma5OiKishAgPp8+A6cBs4MDZvrKbfEjn7KpoEXbBGOsMgAoWYJ/CR/7jSR8LH57 rwkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=MattRFtonwDaxU1QdB3LlHBD2lClNUTulWxSVvPqfV4=; b=jKbd8fcFaz2Uign6dxwJ4qHsn/oZ0Edef3eXy/KDnbFewFouQN+xmUiRZF1Cwm9Jc2 obULhnrAp3Sga5gyn0Yct3lq1cXdLjpiyF4nrVnsKgJFRdlVPJe6jQ8ujywK/C6z1dOL oCRA/OCl4cfSximCIlNMMwvDA9qq8TUsl9QbFH3lnMYqArtEPxYuBmQyt+sHAb89tvuh Y4u7fANK3lThjr+Ecg0HXXUn/PEyNI7GBZkSN0NI2Gtz3IL8GVp7zlH3N1AVdhkwu0pw YMwP84+WFkl2Aeio3K40POkkrcg9z4fCX2HyRi4jGuLzma9xe4K79CrJONUGbbl8yeDx oAqg== X-Gm-Message-State: APzg51B9/aL0dPYMID1mT6TXVnHO8HAB4ieFXAYfnrRH4PCnJ83A5Q4t HibbsIWtEhUCPpOEjs4+XTA= X-Received: by 2002:a1c:e54:: with SMTP id 81-v6mr5402205wmo.84.1535735122249; Fri, 31 Aug 2018 10:05:22 -0700 (PDT) Received: from localhost.localdomain (62.83.35.8.dyn.user.ono.com. [62.83.35.8]) by smtp.gmail.com with ESMTPSA id c19-v6sm11280332wre.86.2018.08.31.10.05.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Aug 2018 10:05:21 -0700 (PDT) From: Miguel Ojeda To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, Miguel Ojeda , Eli Friedman , Christopher Li , Kees Cook , Ingo Molnar , Geert Uytterhoeven , Arnd Bergmann , Greg Kroah-Hartman , Masahiro Yamada , Joe Perches , Dominique Martinet , Nick Desaulniers Subject: [PATCH 2/7] Compiler Attributes: use the no-underscores syntax Date: Fri, 31 Aug 2018 19:05:09 +0200 Message-Id: <20180831170514.24665-2-miguel.ojeda.sandonis@gmail.com> In-Reply-To: <20180831170514.24665-1-miguel.ojeda.sandonis@gmail.com> References: <20180831170514.24665-1-miguel.ojeda.sandonis@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The attribute syntax optionally allows to surround attribute names with "__" in order to avoid collisions with macros of the same name (see https://gcc.gnu.org/onlinedocs/gcc/Attribute-Syntax.html). This homogenizes all attributes to use the syntax without underscores. Cc: Eli Friedman Cc: Christopher Li Cc: Kees Cook Cc: Ingo Molnar Cc: Geert Uytterhoeven Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: Masahiro Yamada Cc: Joe Perches Cc: Dominique Martinet Cc: Nick Desaulniers Cc: Linus Torvalds Signed-off-by: Miguel Ojeda --- include/linux/compiler-clang.h | 2 +- include/linux/compiler-gcc.h | 4 ++-- include/linux/compiler.h | 4 ++-- include/linux/compiler_types.h | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/linux/compiler-clang.h b/include/linux/compiler-clang.h index b1ce500fe8b3..efda74f4eeba 100644 --- a/include/linux/compiler-clang.h +++ b/include/linux/compiler-clang.h @@ -43,4 +43,4 @@ #define barrier() __asm__ __volatile__("" : : : "memory") #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0])) #define __assume_aligned(a, ...) \ - __attribute__((__assume_aligned__(a, ## __VA_ARGS__))) + __attribute__((assume_aligned(a, ## __VA_ARGS__))) diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index 0a2d06677d83..dbfbecf703f8 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h @@ -132,7 +132,7 @@ } while (0) /* Mark a function definition as prohibited from being cloned. */ -#define __noclone __attribute__((__noclone__, __optimize__("no-tracer"))) +#define __noclone __attribute__((noclone, optimize("no-tracer"))) #if defined(RANDSTRUCT_PLUGIN) && !defined(__CHECKER__) #define __randomize_layout __attribute__((randomize_layout)) @@ -165,7 +165,7 @@ * compiler should see some alignment anyway, when the return value is * massaged by 'flags = ptr & 3; ptr &= ~3;'). */ -#define __assume_aligned(a, ...) __attribute__((__assume_aligned__(a, ## __VA_ARGS__))) +#define __assume_aligned(a, ...) __attribute__((assume_aligned(a, ## __VA_ARGS__))) #endif /* diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 7c0157d50964..e0e55eb3f242 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -23,7 +23,7 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val, #define __branch_check__(x, expect, is_constant) ({ \ long ______r; \ static struct ftrace_likely_data \ - __attribute__((__aligned__(4))) \ + __attribute__((aligned(4))) \ __attribute__((section("_ftrace_annotated_branch"))) \ ______f = { \ .data.func = __func__, \ @@ -59,7 +59,7 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val, ({ \ int ______r; \ static struct ftrace_branch_data \ - __attribute__((__aligned__(4))) \ + __attribute__((aligned(4))) \ __attribute__((section("_ftrace_branch"))) \ ______f = { \ .func = __func__, \ diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h index b6534292ea33..7cd958360ead 100644 --- a/include/linux/compiler_types.h +++ b/include/linux/compiler_types.h @@ -159,7 +159,7 @@ struct ftrace_likely_data { sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long)) #ifndef __attribute_const__ -#define __attribute_const__ __attribute__((__const__)) +#define __attribute_const__ __attribute__((const)) #endif #ifndef __noclone @@ -203,14 +203,14 @@ struct ftrace_likely_data { #define __maybe_unused __attribute__((unused)) #define __always_unused __attribute__((unused)) #define __mode(x) __attribute__((mode(x))) -#define __malloc __attribute__((__malloc__)) -#define __used __attribute__((__used__)) +#define __malloc __attribute__((malloc)) +#define __used __attribute__((used)) #define __noreturn __attribute__((noreturn)) #define __packed __attribute__((packed)) #define __weak __attribute__((weak)) #define __alias(symbol) __attribute__((alias(#symbol))) #define __cold __attribute__((cold)) -#define __section(S) __attribute__((__section__(#S))) +#define __section(S) __attribute__((section(#S))) #ifdef CONFIG_ENABLE_MUST_CHECK -- 2.17.1