lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VctKV0sbZsjHjPutqo+WDJr5HemWjc50CCqSsScbh5p9A@mail.gmail.com>
Date:   Wed, 15 Jun 2022 23:15:58 +0200
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     kernel test robot <lkp@...el.com>
Cc:     Andrea Merello <andrea.merello@....it>,
        Jonathan Cameron <jic23@...nel.org>,
        Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
        linux-iio <linux-iio@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        devicetree <devicetree@...r.kernel.org>, kbuild-all@...ts.01.org,
        Lars-Peter Clausen <lars@...afoo.de>,
        Rob Herring <robh+dt@...nel.org>,
        Matt Ranostay <matt.ranostay@...sulko.com>,
        Alexandru Ardelean <ardeleanalex@...il.com>,
        jmondi <jacopo@...ndi.org>
Subject: Re: [v6 12/14] iio: imu: add BNO055 serdev driver

On Wed, Jun 15, 2022 at 11:13 PM Andy Shevchenko
<andy.shevchenko@...il.com> wrote:
> On Wed, Jun 15, 2022 at 10:57 PM kernel test robot <lkp@...el.com> 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ