[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200321172217.18d9e01b@archlinux>
Date: Sat, 21 Mar 2020 17:22:17 +0000
From: Jonathan Cameron <jic23@...nel.org>
To: Alexandru Ardelean <alexandru.ardelean@...log.com>
Cc: <linux-iio@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<devicetree@...r.kernel.org>, <robh+dt@...nel.org>,
<Laszlo.Nagy@...log.com>, <Andrei.Grozav@...log.com>,
<Michael.Hennerich@...log.com>, <Istvan.Csomortani@...log.com>,
<Adrian.Costina@...log.com>, <Dragos.Bogdan@...log.com>
Subject: Re: [PATCH v11 3/8] iio: buffer-dmaengine: use %zu specifier for
sprintf(align)
On Sat, 21 Mar 2020 10:53:10 +0200
Alexandru Ardelean <alexandru.ardelean@...log.com> wrote:
> The 'size_t' type behaves differently on 64-bit architectures, and causes
> compiler a warning of the sort "format '%u' expects argument of type
> 'unsigned int', but argument 3 has type 'size_t {aka long unsigned int}'".
>
> This change adds the correct specifier for the 'align' field.
>
> Fixes: 4538c18568099 ("iio: buffer-dmaengine: Report buffer length requirements")
> Reported-by: kbuild test robot <lkp@...el.com>
> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@...log.com>
Applied thanks.
Given lack of users of this infrastructure, I'm not that fussed
about marking this for stable or similar. However, I don't
mind someone requesting a backport if it is useful to them.
Jonathan
> ---
> drivers/iio/buffer/industrialio-buffer-dmaengine.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/buffer/industrialio-buffer-dmaengine.c b/drivers/iio/buffer/industrialio-buffer-dmaengine.c
> index b129693af0fd..94da3b1ca3a2 100644
> --- a/drivers/iio/buffer/industrialio-buffer-dmaengine.c
> +++ b/drivers/iio/buffer/industrialio-buffer-dmaengine.c
> @@ -134,7 +134,7 @@ static ssize_t iio_dmaengine_buffer_get_length_align(struct device *dev,
> struct dmaengine_buffer *dmaengine_buffer =
> iio_buffer_to_dmaengine_buffer(indio_dev->buffer);
>
> - return sprintf(buf, "%u\n", dmaengine_buffer->align);
> + return sprintf(buf, "%zu\n", dmaengine_buffer->align);
> }
>
> static IIO_DEVICE_ATTR(length_align_bytes, 0444,
Powered by blists - more mailing lists