diff options
author | Alexandru Ardelean <alexandru.ardelean@analog.com> | 2020-03-24 14:46:31 +0100 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2020-04-19 17:56:21 +0200 |
commit | 6eb3b8acfd079104571c207d4524743b6acc6550 (patch) | |
tree | 03c790679674b72cdd1bc4a1f4e4fbe3acf5a1ea | |
parent | include: fpga: adi-axi-common.h: add version helper macros (diff) | |
download | linux-6eb3b8acfd079104571c207d4524743b6acc6550.tar.xz linux-6eb3b8acfd079104571c207d4524743b6acc6550.zip |
iio: buffer-dmaengine: use %zu specifier for sprintf(align)
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@intel.com>
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-rw-r--r-- | drivers/iio/buffer/industrialio-buffer-dmaengine.c | 2 |
1 files changed, 1 insertions, 1 deletions
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, |