Re: [PATCH v2 bpf-next 4/7] printk: add type-printing %pT format specifier which uses BTF

From: Alexei Starovoitov
Date: Thu May 14 2020 - 20:09:27 EST


On Thu, May 14, 2020 at 04:43:24PM -0700, Joe Perches wrote:
> The ``BTF_INT_BITS()`` specifies the number of actual bits held by this int
> type. For example, a 4-bit bitfield encodes ``BTF_INT_BITS()`` equals to 4.
> diff --git a/include/uapi/linux/btf.h b/include/uapi/linux/btf.h
> index 5a667107ad2c..36f309209786 100644
> --- a/include/uapi/linux/btf.h
> +++ b/include/uapi/linux/btf.h
> @@ -90,6 +90,7 @@ struct btf_type {
> #define BTF_INT_SIGNED (1 << 0)
> #define BTF_INT_CHAR (1 << 1)
> #define BTF_INT_BOOL (1 << 2)
> +#define BTF_INT_HEX (1 << 3)

Nack.
Hex is not a type.