mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: nvgpu_memcpy changes to linux os code
MISRA Rule 21.15 prohibits use of memcpy() with incompatible ptrs to qualified/unqualified types. To circumvent this issue we've introduced a new MISRA-compliant nvgpu_memcpy() function. While linux os code does not need to be MISRA-compliant this change switches over all memcpy() uses to nvgpu_memcpy() with appropriate casts applied to maintain consistency within the nvgpu source base. JIRA NVGPU-849 Change-Id: I2c21a7845df5709dafa19508c121f8afa27cc4fc Signed-off-by: Scott Long <scottl@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1950995 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Nitin Kumbhar <nkumbhar@nvidia.com> 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
mobile promotions
parent
df92b05e43
commit
e24df49765
@@ -24,6 +24,7 @@
|
||||
#include <nvgpu/bug.h>
|
||||
#include <nvgpu/barrier.h>
|
||||
#include <nvgpu/gk20a.h>
|
||||
#include <nvgpu/string.h>
|
||||
|
||||
#include "gk20a/gr_gk20a.h"
|
||||
#include "sched.h"
|
||||
@@ -418,8 +419,9 @@ int gk20a_sched_dev_open(struct inode *inode, struct file *filp)
|
||||
goto free_ref;
|
||||
}
|
||||
|
||||
(void) memcpy(sched->recent_tsg_bitmap, sched->active_tsg_bitmap,
|
||||
sched->bitmap_size);
|
||||
nvgpu_memcpy((u8 *)sched->recent_tsg_bitmap,
|
||||
(u8 *)sched->active_tsg_bitmap,
|
||||
sched->bitmap_size);
|
||||
(void) memset(sched->ref_tsg_bitmap, 0, sched->bitmap_size);
|
||||
|
||||
filp->private_data = sched;
|
||||
|
||||
Reference in New Issue
Block a user