Re: [v6 12/14] iio: imu: add BNO055 serdev driver

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

 



On Wed, Jun 15, 2022 at 11:13 PM Andy Shevchenko
<andy.shevchenko@xxxxxxxxx> wrote:
> On Wed, Jun 15, 2022 at 10:57 PM kernel test robot <lkp@xxxxxxxxx> wrote:
>
> ...
>
> > >> drivers/iio/imu/bno055/./bno055_ser_trace.h:91:23: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' {aka 'long unsigned int'} [-Wformat=]
>
> >     80              TP_PROTO(size_t len, const unsigned char *buf),
> >     81              TP_ARGS(len, buf),
> >     82              TP_STRUCT__entry(
> >     83                      __field(size_t, len)
> >     84                      __dynamic_array(unsigned char, buf, len)
> >     85              ),
> >     86              TP_fast_assign(
> >     87                      __entry->len = len;
> >     88                      memcpy(__get_dynamic_array(buf),
> >     89                             buf, __entry->len);
> >     90              ),
> >   > 91              TP_printk("len: %d, data: = %*ph",
>
> Obviously it must be %zu
>
> >     92                        __entry->len, __entry->len, __get_dynamic_array(buf)

...and the second len here should be casted to (int) explicitly, since
* in the printf() format specifier means int argument.

> >     93              )

-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux