mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 11:04:51 +03:00
gpu: nvgpu: add more compile flags to posix iGPU
Added bellow CFLAGS:
-Werror -Wall -Wextra \
-Wmissing-braces -Wpointer-arith -Wundef \
-Wconversion -Wsign-conversion \
-Wformat-security \
-Wmissing-declarations -Wredundant-decls -Wimplicit-fallthrough
Also fixed all of compile errors for posix.
It's preparing for porting gpu server.
Jira GVSCI-11640
Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Change-Id: I30b09a62a57396abd642922e22f2e550a96f42c2
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2555059
Reviewed-by: Shashank Singh <shashsingh@nvidia.com>
Reviewed-by: Aparna Das <aparnad@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
mobile promotions
parent
9e5c88c1ef
commit
09cf3642ef
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2020, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -103,11 +103,14 @@ u64 nvgpu_mem_sgl_phys(struct gk20a *g, void *sgl)
|
||||
{
|
||||
struct nvgpu_mem_sgl *mem = (struct nvgpu_mem_sgl *)sgl;
|
||||
|
||||
(void)g;
|
||||
return (u64)(uintptr_t)mem->phys;
|
||||
}
|
||||
|
||||
u64 nvgpu_mem_sgl_ipa_to_pa(struct gk20a *g, void *sgl, u64 ipa, u64 *pa_len)
|
||||
{
|
||||
(void)ipa;
|
||||
(void)pa_len;
|
||||
return nvgpu_mem_sgl_phys(g, sgl);
|
||||
}
|
||||
|
||||
@@ -145,6 +148,7 @@ bool nvgpu_mem_sgt_iommuable(struct gk20a *g, struct nvgpu_sgt *sgt)
|
||||
{
|
||||
struct nvgpu_os_posix *p = nvgpu_os_posix_from_gk20a(g);
|
||||
|
||||
(void)sgt;
|
||||
return p->mm_sgt_is_iommuable;
|
||||
}
|
||||
|
||||
@@ -301,6 +305,8 @@ int nvgpu_mem_create_from_mem(struct gk20a *g,
|
||||
u64 start = start_page * U64(NVGPU_CPU_PAGE_SIZE);
|
||||
u64 size = U64(nr_pages) * U64(NVGPU_CPU_PAGE_SIZE);
|
||||
|
||||
(void)g;
|
||||
|
||||
if (src->aperture != APERTURE_SYSMEM) {
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -327,6 +333,10 @@ int nvgpu_mem_create_from_mem(struct gk20a *g,
|
||||
int __nvgpu_mem_create_from_phys(struct gk20a *g, struct nvgpu_mem *dest,
|
||||
u64 src_phys, int nr_pages)
|
||||
{
|
||||
(void)g;
|
||||
(void)dest;
|
||||
(void)src_phys;
|
||||
(void)nr_pages;
|
||||
BUG();
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user