mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 18:16:01 +03:00
gpu: nvgpu: fix CERT-C EXP36-C issue in posix utils
Use uintptr_t for for pointer arithmmatic instead of char * to fix following CERT-C violations. cert_exp36_c_violation: Pointer "char *" is more strictly aligned than pointer "struct gk20a_event_id_data_rmos const *". cert_exp36_c_violation: Pointer "struct nvgpu_clk_dev_rmos *" is more strictly aligned than pointer "char *". JIRA NVGPU-3908 JIRA NVGPU-3561 Change-Id: I9d40b3337ed0ddaf172ad4f4c9dd319996d479a1 Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2197151 Reviewed-by: Scott Long <scottl@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Alex Waterman
parent
ecc3ad902f
commit
bd2334d79d
@@ -257,7 +257,7 @@ static inline unsigned int nvgpu_posix_hweight64(uint64_t x)
|
||||
|
||||
#define container_of(ptr, type, member) ({ \
|
||||
typeof(((type *)0)->member) *__mptr = (ptr); \
|
||||
(type *)((char *)__mptr - offsetof(type, member)); })
|
||||
(type *)((uintptr_t)__mptr - offsetof(type, member)); })
|
||||
|
||||
#define MAX_ERRNO 4095
|
||||
|
||||
|
||||
Reference in New Issue
Block a user