[PATCH v5 04/10] fs, iov_iter: define meta io descriptor
Christoph Hellwig
hch at lst.de
Tue Oct 29 22:03:55 PDT 2024
On Tue, Oct 29, 2024 at 09:53:56PM +0530, Anuj Gupta wrote:
> +/* flags for integrity meta */
> +typedef __u16 __bitwise uio_meta_flags_t;
> +
> +struct uio_meta {
> + uio_meta_flags_t flags;
.. this is a bitwise type
> +/* flags for integrity meta */
> +#define IO_INTEGRITY_CHK_GUARD (1U << 0) /* enforce guard check */
> +#define IO_INTEGRITY_CHK_REFTAG (1U << 1) /* enforce ref check */
> +#define IO_INTEGRITY_CHK_APPTAG (1U << 2) /* enforce app check */
.. but these aren't. Leading to warnings like:
CHECK block/bio-integrity.c
block/bio-integrity.c:371:17: warning: restricted uio_meta_flags_t degrades to integer
block/bio-integrity.c:373:17: warning: restricted uio_meta_flags_t degrades to integer
block/bio-integrity.c:375:17: warning: restricted uio_meta_flags_t degrades to integer
block/bio-integrity.c:402:33: warning: restricted uio_meta_flags_t degrades to integer
from sparse. Given that the flags are uapi, the it's probably best
to just drop the __bitwise annotation.
More information about the Linux-nvme
mailing list