mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +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-2019, 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"),
|
||||
@@ -54,6 +54,10 @@ static int __nvgpu_do_dma_alloc(struct gk20a *g, unsigned long flags,
|
||||
enum nvgpu_aperture ap)
|
||||
{
|
||||
void *memory;
|
||||
|
||||
(void)g;
|
||||
(void)flags;
|
||||
|
||||
#ifdef NVGPU_UNITTEST_FAULT_INJECTION_ENABLEMENT
|
||||
if (nvgpu_posix_fault_injection_handle_call(
|
||||
nvgpu_dma_alloc_get_fault_injection())) {
|
||||
@@ -111,6 +115,7 @@ static u64 __nvgpu_dma_alloc(struct nvgpu_allocator *allocator, u64 at,
|
||||
|
||||
static size_t mock_fb_get_vidmem_size(struct gk20a *g)
|
||||
{
|
||||
(void)g;
|
||||
return SZ_4G;
|
||||
}
|
||||
|
||||
@@ -252,6 +257,8 @@ void nvgpu_dma_free_vid(struct gk20a *g, struct nvgpu_mem *mem)
|
||||
|
||||
void nvgpu_dma_free_sys(struct gk20a *g, struct nvgpu_mem *mem)
|
||||
{
|
||||
(void)g;
|
||||
|
||||
if (!(mem->mem_flags & NVGPU_MEM_FLAG_SHADOW_COPY)) {
|
||||
free(mem->cpu_va);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user