accel/qaic: Use check_add_overflow in sahara for 64b types
authorZack McKevitt <zmckevit@qti.qualcomm.com>
Wed, 15 Oct 2025 16:54:08 +0000 (18:54 +0200)
committerJeff Hugo <jeff.hugo@oss.qualcomm.com>
Mon, 20 Oct 2025 14:30:37 +0000 (08:30 -0600)
commit9cfe6abee1ac3309fe15961b22a8d8b71b9e113a
tree6b9cb89239595511d5822e28c81bc8facabdcdf4
parent4e39740d77e9cf6c20972fde14197db7aee36f35
accel/qaic: Use check_add_overflow in sahara for 64b types

Use check_add_overflow instead of size_add in sahara when
64b types are being added to ensure compatibility with 32b
systems. The size_add function parameters are of size_t, so
64b data types may be truncated when cast to size_t on 32b
systems. When using check_add_overflow, no type casts are made,
making it a more portable option.

Signed-off-by: Zack McKevitt <zmckevit@qti.qualcomm.com>
Signed-off-by: Youssef Samir <youssef.abdulrahman@oss.qualcomm.com>
Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Reviewed-by: Carl Vanderlip <carl.vanderlip@oss.qualcomm.com>
Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20251015165408.213645-1-youssef.abdulrahman@oss.qualcomm.com
drivers/accel/qaic/sahara.c