gpu: nvgpu: VM fixup for MISRA 10.3

The function parameter of nvgpu_vm_map function is fixed for MISRA
where implicit assignment of objects to a narrower or different
essential type not allowed.This fixes few enum violations.

JIRA NVGPU-1584

Change-Id: I2353f7501c3326f792f5942b2e247badf03349cf
Signed-off-by: Dinesh T <dt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1986509
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
dinesh
2018-12-27 00:03:28 +05:30
committed by mobile promotions
parent 0f2bbca0df
commit 9578ed6c4e
4 changed files with 8 additions and 7 deletions

View File

@@ -826,7 +826,7 @@ struct nvgpu_mapped_buf *nvgpu_vm_map(struct vm_gk20a *vm,
u64 map_addr, u64 map_addr,
u64 map_size, u64 map_size,
u64 phys_offset, u64 phys_offset,
int rw, enum gk20a_mem_rw_flag rw,
u32 flags, u32 flags,
s16 compr_kind, s16 compr_kind,
s16 incompr_kind, s16 incompr_kind,

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2017-2019, NVIDIA CORPORATION. All rights reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License, * under the terms and conditions of the GNU General Public License,
@@ -38,6 +38,7 @@ struct device;
struct vm_gk20a; struct vm_gk20a;
struct vm_gk20a_mapping_batch; struct vm_gk20a_mapping_batch;
struct nvgpu_vm_area; struct nvgpu_vm_area;
enum gk20a_mem_rw_flag;
struct nvgpu_os_buffer { struct nvgpu_os_buffer {
struct dma_buf *dmabuf; struct dma_buf *dmabuf;
@@ -59,7 +60,7 @@ int nvgpu_vm_map_linux(struct vm_gk20a *vm,
u32 page_size, u32 page_size,
s16 compr_kind, s16 compr_kind,
s16 incompr_kind, s16 incompr_kind,
int rw_flag, enum gk20a_mem_rw_flag rw_flag,
u64 buffer_offset, u64 buffer_offset,
u64 mapping_size, u64 mapping_size,
struct vm_gk20a_mapping_batch *mapping_batch, struct vm_gk20a_mapping_batch *mapping_batch,

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2017-2019, NVIDIA CORPORATION. All rights reserved.
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"), * copy of this software and associated documentation files (the "Software"),
@@ -256,7 +256,7 @@ struct nvgpu_mapped_buf *nvgpu_vm_map(struct vm_gk20a *vm,
u64 map_addr, u64 map_addr,
u64 map_size, u64 map_size,
u64 phys_offset, u64 phys_offset,
int rw, enum gk20a_mem_rw_flag rw,
u32 flags, u32 flags,
s16 compr_kind, s16 compr_kind,
s16 incompr_kind, s16 incompr_kind,

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2017-2019, NVIDIA CORPORATION. All rights reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License, * under the terms and conditions of the GNU General Public License,
@@ -181,7 +181,7 @@ int nvgpu_vm_map_linux(struct vm_gk20a *vm,
u32 page_size, u32 page_size,
s16 compr_kind, s16 compr_kind,
s16 incompr_kind, s16 incompr_kind,
int rw_flag, enum gk20a_mem_rw_flag rw_flag,
u64 buffer_offset, u64 buffer_offset,
u64 mapping_size, u64 mapping_size,
struct vm_gk20a_mapping_batch *batch, struct vm_gk20a_mapping_batch *batch,