diff options
author | Martin Kelly <mkelly@xevo.com> | 2018-03-27 00:27:51 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2018-03-30 13:14:32 +0300 |
commit | c043ec1ca5baae63726aae32abbe003192bc6eec (patch) | |
tree | 51574cd7d82dec8175c75f9f4498fd38fa8bb68d /drivers/fpga/fpga-bridge.c | |
parent | d58109dcf37fc9baec354385ec9fdcd8878d174d (diff) | |
download | linux-c043ec1ca5baae63726aae32abbe003192bc6eec.tar.xz |
iio:buffer: make length types match kfifo types
Currently, we use int for buffer length and bytes_per_datum. However,
kfifo uses unsigned int for length and size_t for element size. We need
to make sure these matches or we will have bugs related to overflow (in
the range between INT_MAX and UINT_MAX for length, for example).
In addition, set_bytes_per_datum uses size_t while bytes_per_datum is an
int, which would cause bugs for large values of bytes_per_datum.
Change buffer length to use unsigned int and bytes_per_datum to use
size_t.
Signed-off-by: Martin Kelly <mkelly@xevo.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/fpga/fpga-bridge.c')
0 files changed, 0 insertions, 0 deletions