mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: Fix kmem function definition
Use the correct type for the size argument in __nvgpu_kmalloc() and make sure the size_t type is available for usage. Bug 1799159 Bug 1823380 Change-Id: I7d6aea964e065e576c8bc3383a9b2326639c018f Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: http://git-master/r/1318308 Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
29d2147744
commit
dd947aeec4
@@ -26,6 +26,16 @@
|
||||
|
||||
struct gk20a;
|
||||
|
||||
/*
|
||||
* When there's other implementations make sure they are included instead of
|
||||
* Linux when not compiling on Linux!
|
||||
*
|
||||
* Also note this is above any usage of size_t. At the moment we don't have a
|
||||
* cross OS way of defining the necessary types used by these APIs. Eventually
|
||||
* we will need a <nvgpu/types.h> include to handle this.
|
||||
*/
|
||||
#include <nvgpu/kmem_linux.h>
|
||||
|
||||
/**
|
||||
* DOC: Kmem cache support
|
||||
*
|
||||
@@ -214,12 +224,6 @@ void nvgpu_kmem_fini(struct gk20a *g, int flags);
|
||||
#define NVGPU_KMEM_FINI_WARN (1 << 2)
|
||||
#define NVGPU_KMEM_FINI_BUG (1 << 3)
|
||||
|
||||
/*
|
||||
* When there's other implementations make sure they are included instead of
|
||||
* Linux when not compiling on Linux!
|
||||
*/
|
||||
#include <nvgpu/kmem_linux.h>
|
||||
|
||||
static inline void *__nvgpu_big_alloc(struct gk20a *g, size_t size, bool clear)
|
||||
{
|
||||
void *p;
|
||||
|
||||
@@ -52,7 +52,7 @@ static inline void nvgpu_kmem_debugfs_init(struct device *dev)
|
||||
* nvgpu. This should not be included directly - instead include <nvgpu/kmem.h>.
|
||||
*/
|
||||
|
||||
static inline void *__nvgpu_kmalloc(struct gk20a *g, unsigned long size,
|
||||
static inline void *__nvgpu_kmalloc(struct gk20a *g, size_t size,
|
||||
unsigned long ip)
|
||||
{
|
||||
#ifdef CONFIG_NVGPU_TRACK_MEM_USAGE
|
||||
|
||||
Reference in New Issue
Block a user