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

From: Joe Perches
Date: Thu May 14 2020 - 20:21:41 EST


On Thu, 2020-05-14 at 17:09 -0700, Alexei Starovoitov wrote:
> 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.

It is a pretty print output format.