gpu: nvgpu: therm: update type for size param

Update interfaces to use size_t to align with boardobj_construct_super()
and avoid unnecessary casts.

JIRA NVGPU-1008

Change-Id: I5aac3483ed5080bf633ba564e8684db425c50a22
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2011437
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com>
Reviewed-by: Scott Long <scottl@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Adeel Raza <araza@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Philip Elcan
2019-02-04 10:55:50 -05:00
committed by mobile promotions
parent 699c2a15fa
commit 0a0d866400
2 changed files with 10 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2016-2019, 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"),
@@ -65,7 +65,7 @@ done:
return status;
}
static struct boardobj *construct_channel_device(struct gk20a *g,
void *pargs, u16 pargs_size, u8 type)
void *pargs, size_t pargs_size, u8 type)
{
struct boardobj *board_obj_ptr = NULL;
struct therm_channel *pchannel;
@@ -135,7 +135,7 @@ static int devinit_get_therm_channel_table(struct gk20a *g,
struct therm_channel_1x_entry *therm_channel_table_entry = NULL;
u32 index;
u32 obj_index = 0;
u16 therm_channel_size = 0;
size_t therm_channel_size = 0;
union {
struct boardobj boardobj;
struct therm_channel therm_channel;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2016-2019, 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"),
@@ -58,19 +58,19 @@ static int _therm_device_pmudata_instget(struct gk20a *g,
}
static int construct_therm_device(struct gk20a *g,
struct boardobj **ppboardobj, u16 size, void *pargs)
struct boardobj **ppboardobj, size_t size, void *pargs)
{
return boardobj_construct_super(g, ppboardobj, size, pargs);
}
static int construct_therm_device_gpu(struct gk20a *g,
struct boardobj **ppboardobj, u16 size, void *pargs)
struct boardobj **ppboardobj, size_t size, void *pargs)
{
return construct_therm_device(g, ppboardobj, size, pargs);
}
static int construct_therm_device_gpu_sci(struct gk20a *g,
struct boardobj **ppboardobj, u16 size, void *pargs)
struct boardobj **ppboardobj, size_t size, void *pargs)
{
return construct_therm_device(g, ppboardobj, size, pargs);
}
@@ -99,7 +99,7 @@ exit:
}
static int construct_therm_device_gpu_tsosc(struct gk20a *g,
struct boardobj **ppboardobj, u16 size, void *pargs)
struct boardobj **ppboardobj, size_t size, void *pargs)
{
struct therm_device_gpu_gpc_tsosc *pdev = NULL;
struct therm_device_gpu_gpc_tsosc *ptmp_dev =
@@ -144,7 +144,7 @@ exit:
}
static int construct_therm_device_hbm2_site(struct gk20a *g,
struct boardobj **ppboardobj, u16 size, void *pargs)
struct boardobj **ppboardobj, size_t size, void *pargs)
{
struct therm_device_hbm2_site *pdev = NULL;
struct therm_device_hbm2_site *ptmp_dev =
@@ -167,7 +167,7 @@ static int construct_therm_device_hbm2_site(struct gk20a *g,
}
static int construct_therm_device_hbm2_combined(struct gk20a *g,
struct boardobj **ppboardobj, u16 size, void *pargs)
struct boardobj **ppboardobj, size_t size, void *pargs)
{
return construct_therm_device(g, ppboardobj, size, pargs);
}