Re: [PATCH v2 02/34] compiler-capability-analysis: Add infrastructure for Clang's capability analysis

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 04, 2025 at 10:21:01AM +0100, Marco Elver wrote:

> +# define __asserts_cap(var)			__attribute__((assert_capability(var)))
> +# define __asserts_shared_cap(var)		__attribute__((assert_shared_capability(var)))

> +	static __always_inline void __assert_cap(const struct name *var)				\
> +		__attribute__((overloadable)) __asserts_cap(var) { }					\
> +	static __always_inline void __assert_shared_cap(const struct name *var)				\
> +		__attribute__((overloadable)) __asserts_shared_cap(var) { }				\

Since this does not in fact check -- that's __must_hold(), I would
suggest renaming these like s/assert/assume/.





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux