Pull misc fixes from Miguel Ojeda: "A trivial patch for auxdisplay: - Replace HTTP links with HTTPS ones (Alexander A. Klimov) The usual clang-format trivial update: - Update with the latest for_each macro list (Miguel Ojeda) And Luc requested me to pick a sparse fix on my queue, so here it goes along with other two trivial Compiler Attributes ones (also from Luc). - sparse: use static inline for __chk_{user,io}_ptr() (Luc Van Oostenryck) - Compiler Attributes: fix comment concerning GCC 4.6 (Luc Van Oostenryck) - Compiler Attributes: remove comment about sparse not supporting __has_attribute (Luc Van Oostenryck)" * tag 'auxdisplay-for-linus-v5.9-rc4' of git://github.com/ojeda/linux: auxdisplay: Replace HTTP links with HTTPS ones * tag 'clang-format-for-linus-v5.9-rc4' of git://github.com/ojeda/linux: clang-format: Update with the latest for_each macro list * tag 'compiler-attributes-for-linus-v5.9-rc4' of git://github.com/ojeda/linux: sparse: use static inline for __chk_{user,io}_ptr() Compiler Attributes: fix comment concerning GCC 4.6 Compiler Attributes: remove comment about sparse not supporting __has_attribute
Showing the changes to include/linux (2 of 4 files). Show all
Unified · Split
| @@ -22,14 +22,8 @@ · 21 unmodified lines | |||
| 22 | 22 | ||
| 23 | /* | 23 | /* |
| 24 | * __has_attribute is supported on gcc >= 5, clang >= 2.9 and icc >= 17. | 24 | * __has_attribute is supported on gcc >= 5, clang >= 2.9 and icc >= 17. |
| 25 | * In the meantime, to support 4.6 <= gcc < 5, we implement __has_attribute | 25 | * In the meantime, to support gcc < 5, we implement __has_attribute |
| 26 | * by hand. | 26 | * by hand. |
| 27 | * | ||
| 28 | * sparse does not support __has_attribute (yet) and defines __GNUC_MINOR__ | ||
| 29 | * depending on the compiler used to build it; however, these attributes have | ||
| 30 | * no semantic effects for sparse, so it does not matter. Also note that, | ||
| 31 | * in order to avoid sparse's warnings, even the unsupported ones must be | ||
| 32 | * defined to 0. | ||
| 33 | */ | 27 | */ |
| 34 | #ifndef __has_attribute | 28 | #ifndef __has_attribute |
| 35 | # define __has_attribute(x) __GCC4_has_attribute_##x | 29 | # define __has_attribute(x) __GCC4_has_attribute_##x |
| @@ -11,8 +11,8 @@ · 10 unmodified lines | |||
| 11 | # define __iomem __attribute__((noderef, address_space(__iomem))) | 11 | # define __iomem __attribute__((noderef, address_space(__iomem))) |
| 12 | # define __percpu __attribute__((noderef, address_space(__percpu))) | 12 | # define __percpu __attribute__((noderef, address_space(__percpu))) |
| 13 | # define __rcu __attribute__((noderef, address_space(__rcu))) | 13 | # define __rcu __attribute__((noderef, address_space(__rcu))) |
| 14 | extern void __chk_user_ptr(const volatile void __user *); | 14 | static inline void __chk_user_ptr(const volatile void __user *ptr) { } |
| 15 | extern void __chk_io_ptr(const volatile void __iomem *); | 15 | static inline void __chk_io_ptr(const volatile void __iomem *ptr) { } |
| 16 | /* context/locking */ | 16 | /* context/locking */ |
| 17 | # define __must_hold(x) __attribute__((context(x,1,1))) | 17 | # define __must_hold(x) __attribute__((context(x,1,1))) |
| 18 | # define __acquires(x) __attribute__((context(x,0,1))) | 18 | # define __acquires(x) __attribute__((context(x,0,1))) |