mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: Fix LibC MISRA 17.7 in common
MISRA Rule-17.7 requires the return value of all functions to be used. Fix is either to use the return value or change the function to return void. This patch contains fix for all 17.7 violations instandard C functions in common code. JIRA NVGPU-1036 Change-Id: Id6dea92df371e71b22b54cd7a521fc22812f9b69 Signed-off-by: Nicolas Benech <nbenech@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1929899 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
27b47c20bd
commit
cb2a05dd92
@@ -240,7 +240,7 @@ void nvgpu_mem_rd_n(struct gk20a *g, struct nvgpu_mem *mem,
|
||||
u8 *src = (u8 *)mem->cpu_va + offset;
|
||||
|
||||
WARN_ON(mem->cpu_va == NULL);
|
||||
memcpy(dest, src, size);
|
||||
(void) memcpy(dest, src, size);
|
||||
} else if (mem->aperture == APERTURE_VIDMEM) {
|
||||
nvgpu_pramin_rd_n(g, mem, offset, size, dest);
|
||||
} else {
|
||||
@@ -281,7 +281,7 @@ void nvgpu_mem_wr_n(struct gk20a *g, struct nvgpu_mem *mem, u32 offset,
|
||||
u8 *dest = (u8 *)mem->cpu_va + offset;
|
||||
|
||||
WARN_ON(mem->cpu_va == NULL);
|
||||
memcpy(dest, src, size);
|
||||
(void) memcpy(dest, src, size);
|
||||
} else if (mem->aperture == APERTURE_VIDMEM) {
|
||||
nvgpu_pramin_wr_n(g, mem, offset, size, src);
|
||||
if (!mem->skip_wmb) {
|
||||
@@ -305,7 +305,7 @@ void nvgpu_memset(struct gk20a *g, struct nvgpu_mem *mem, u32 offset,
|
||||
u8 *dest = (u8 *)mem->cpu_va + offset;
|
||||
|
||||
WARN_ON(mem->cpu_va == NULL);
|
||||
memset(dest, c, size);
|
||||
(void) memset(dest, c, size);
|
||||
} else if (mem->aperture == APERTURE_VIDMEM) {
|
||||
u32 repeat_value = c | (c << 8) | (c << 16) | (c << 24);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user