mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +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
@@ -136,7 +136,7 @@ static int nvgpu_init_task_pg_init(struct gk20a *g)
|
||||
|
||||
nvgpu_cond_init(&pmu->pg_init.wq);
|
||||
|
||||
snprintf(thread_name, sizeof(thread_name),
|
||||
(void) snprintf(thread_name, sizeof(thread_name),
|
||||
"nvgpu_pg_init_%s", g->name);
|
||||
|
||||
err = nvgpu_thread_create(&pmu->pg_init.state_task, g,
|
||||
@@ -411,7 +411,7 @@ int nvgpu_pmu_process_init_msg(struct nvgpu_pmu *pmu,
|
||||
BUG_ON(sizeof(pmu->gid_info.gid) !=
|
||||
sizeof(gid_data.gid));
|
||||
|
||||
memcpy(pmu->gid_info.gid, gid_data.gid,
|
||||
(void) memcpy(pmu->gid_info.gid, gid_data.gid,
|
||||
sizeof(pmu->gid_info.gid));
|
||||
}
|
||||
}
|
||||
@@ -658,7 +658,7 @@ int nvgpu_pmu_super_surface_alloc(struct gk20a *g,
|
||||
void nvgpu_pmu_surface_free(struct gk20a *g, struct nvgpu_mem *mem)
|
||||
{
|
||||
nvgpu_dma_free(g, mem);
|
||||
memset(mem, 0, sizeof(struct nvgpu_mem));
|
||||
(void) memset(mem, 0, sizeof(struct nvgpu_mem));
|
||||
}
|
||||
|
||||
struct gk20a *gk20a_from_pmu(struct nvgpu_pmu *pmu)
|
||||
|
||||
Reference in New Issue
Block a user