aboutsummaryrefslogtreecommitdiff
path: root/src/ethosu_device.c
diff options
context:
space:
mode:
authorPer Åstrand <per.astrand@arm.com>2020-09-28 08:41:45 +0200
committerPer Åstrand <per.astrand@arm.com>2020-09-28 12:44:35 +0200
commitc6c1db160f8dbb817420d6bda906bc57a0defa2a (patch)
tree3d15903ab607cbfb6d75995a842977dfd17261f1 /src/ethosu_device.c
parente07b1f9cfc5ae797c58af30637a5ca5c21c148e2 (diff)
downloadethos-u-core-driver-c6c1db160f8dbb817420d6bda906bc57a0defa2a.tar.gz
Avoid casting to integer of different size
Avoid casting pointers to integer types larger than the pointer itself, and let assignement handle the conversion. Change-Id: Icfd2401617f2cd0fc96c2a6a9ad8d2d8bec94c55
Diffstat (limited to 'src/ethosu_device.c')
-rw-r--r--src/ethosu_device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ethosu_device.c b/src/ethosu_device.c
index 4729c49..ba7e0d5 100644
--- a/src/ethosu_device.c
+++ b/src/ethosu_device.c
@@ -100,7 +100,7 @@ enum ethosu_error_codes ethosu_run_command_stream(struct ethosu_device *dev,
#if !defined(ARM_NPU_STUB)
ASSERT(num_base_addr <= ETHOSU_DRIVER_BASEP_INDEXES);
- uint64_t qbase = (uint64_t)cmd_stream_ptr + BASE_POINTER_OFFSET;
+ uint64_t qbase = (uintptr_t)cmd_stream_ptr + BASE_POINTER_OFFSET;
ASSERT(qbase <= ADDRESS_MASK);
LOG_DEBUG("QBASE=0x%016llx, QSIZE=%u, base_pointer_offset=0x%08x\n", qbase, cms_length, BASE_POINTER_OFFSET);
ethosu_write_reg(dev, NPU_REG_QBASE0, qbase & 0xffffffff);