From: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
To: Joe Perches <joe@perches.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
clang-built-linux <clang-built-linux@googlegroups.com>
Subject: Re: [PATCH] compiler*.h: Add '__' prefix and suffix to all __attribute__ #defines
Date: Mon, 28 Oct 2019 18:37:17 +0100 [thread overview]
Message-ID: <CANiq72=B6XKwfkC9L4=+OxWtjxCp-94TWRG1a=pC=y636gzckA@mail.gmail.com> (raw)
In-Reply-To: <7a15bc8ad7437dc3a044a4f9cd283500bd0b5f36.camel@perches.com>
On Mon, Oct 28, 2019 at 12:43 PM Joe Perches <joe@perches.com> wrote:
>
> diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h
> index 72393a..b8c2145 100644
> --- a/include/linux/compiler_types.h
> +++ b/include/linux/compiler_types.h
> @@ -5,27 +5,27 @@
> #ifndef __ASSEMBLY__
>
> #ifdef __CHECKER__
> -# define __user __attribute__((noderef, address_space(1)))
> -# define __kernel __attribute__((address_space(0)))
> -# define __safe __attribute__((safe))
> -# define __force __attribute__((force))
> -# define __nocast __attribute__((nocast))
> -# define __iomem __attribute__((noderef, address_space(2)))
> -# define __must_hold(x) __attribute__((context(x,1,1)))
> -# define __acquires(x) __attribute__((context(x,0,1)))
> -# define __releases(x) __attribute__((context(x,1,0)))
> -# define __acquire(x) __context__(x,1)
> -# define __release(x) __context__(x,-1)
> +# define __user __attribute__((__noderef__, __address_space__(1)))
> +# define __kernel __attribute__((__address_space__(0)))
> +# define __safe __attribute__((__safe__))
> +# define __force __attribute__((__force__))
> +# define __nocast __attribute__((__nocast__))
> +# define __iomem __attribute__((__noderef__, __address_space__(2)))
> +# define __must_hold(x) __attribute__((__context__(x, 1, 1)))
> +# define __acquires(x) __attribute__((__context__(x, 0, 1)))
> +# define __releases(x) __attribute__((__context__(x, 1, 0)))
> +# define __acquire(x) __context__(x, 1)
> +# define __release(x) __context__(x, -1)
> # define __cond_lock(x,c) ((c) ? ({ __acquire(x); 1; }) : 0)
> -# define __percpu __attribute__((noderef, address_space(3)))
> -# define __rcu __attribute__((noderef, address_space(4)))
> -# define __private __attribute__((noderef))
> +# define __percpu __attribute__((__noderef__, __address_space__(3)))
> +# define __rcu __attribute__((__noderef__, __address_space__(4)))
> +# define __private __attribute__((__noderef__))
Just in case: for these ones (i.e. __CHECKER__), did you check if
sparse handles this syntax? (I don't recall myself if it does).
Other than that, thanks for the cleanup too! I can pick it up in the
the compiler-attributes tree and put it in -next.
Cheers,
Miguel
next prev parent reply other threads:[~2019-10-28 17:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-27 22:03 [PATCH] compiler*.h: Add '__' prefix and suffix to all __attribute__ #defines Joe Perches
2019-10-28 16:12 ` Nick Desaulniers
2019-10-28 17:37 ` Miguel Ojeda [this message]
2019-10-28 17:59 ` Joe Perches
2019-10-28 18:17 ` [PATCH V2] " Joe Perches
2019-10-28 22:15 ` [PATCH] " Luc Van Oostenryck
2019-10-28 22:28 ` Joe Perches
2019-10-28 23:03 ` Luc Van Oostenryck
2019-10-29 2:38 ` Ramsay Jones
2019-10-29 8:07 ` Luc Van Oostenryck
2019-10-29 18:54 ` Ramsay Jones
2019-10-30 9:38 ` kbuild test robot
2019-10-30 13:45 ` kbuild test robot
2019-10-30 16:29 ` kbuild test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CANiq72=B6XKwfkC9L4=+OxWtjxCp-94TWRG1a=pC=y636gzckA@mail.gmail.com' \
--to=miguel.ojeda.sandonis@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=clang-built-linux@googlegroups.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).