gpu: nvgpu: clk: 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: Ib4539239363f106f1fba8d523072b28d0b8369ad
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2011434
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:49:57 -05:00
committed by mobile promotions
parent 0510641114
commit 2beed190a7
6 changed files with 23 additions and 23 deletions

View File

@@ -430,7 +430,7 @@ static struct fll_device *construct_fll_device(struct gk20a *g,
nvgpu_log_info(g, " ");
status = boardobj_construct_super(g, &board_obj_ptr,
(u32)sizeof(struct fll_device), pargs);
sizeof(struct fll_device), pargs);
if (status != 0) {
return NULL;
}

View File

@@ -97,7 +97,7 @@ static int clk_freq_controller_pmudatainit_pi(struct gk20a *g,
static int clk_freq_controller_construct_super(struct gk20a *g,
struct boardobj **ppboardobj,
u16 size, void *pargs)
size_t size, void *pargs)
{
struct clk_freq_controller *pfreq_cntlr = NULL;
struct clk_freq_controller *pfreq_cntlr_tmp = NULL;
@@ -128,7 +128,7 @@ static int clk_freq_controller_construct_super(struct gk20a *g,
static int clk_freq_controller_construct_pi(struct gk20a *g,
struct boardobj **ppboardobj,
u16 size, void *pargs)
size_t size, void *pargs)
{
struct clk_freq_controller_pi *pfreq_cntlr_pi = NULL;
struct clk_freq_controller_pi *pfreq_cntlr_pi_tmp = NULL;
@@ -169,7 +169,7 @@ static struct clk_freq_controller *clk_clk_freq_controller_construct(
}
status = clk_freq_controller_construct_pi(g, &board_obj_ptr,
(u16)sizeof(struct clk_freq_controller_pi), pargs);
sizeof(struct clk_freq_controller_pi), pargs);
if (status != 0) {
return NULL;
}

View File

@@ -194,7 +194,7 @@ int nvgpu_clk_freq_domain_sw_setup(struct gk20a *g)
pboardobj = NULL;
status = boardobj_construct_super(g,&pboardobj,
(u16)sizeof(struct nvgpu_clk_freq_domain),
sizeof(struct nvgpu_clk_freq_domain),
(void*)&freq_domain_data);
if(status != 0) {
nvgpu_err(g, "Failed to construct nvgpu_clk_freq_domain Board obj");

View File

@@ -951,7 +951,7 @@ static int clk_prog_construct_super(struct gk20a *g,
int status = 0;
status = boardobj_construct_super(g, ppboardobj,
(u16)size, pargs);
size, pargs);
if (status != 0) {
return -EINVAL;
}

View File

@@ -163,7 +163,7 @@ int clk_vf_point_pmu_setup(struct gk20a *g)
static int clk_vf_point_construct_super(struct gk20a *g,
struct boardobj **ppboardobj,
u16 size, void *pargs)
size_t size, void *pargs)
{
struct clk_vf_point *pclkvfpoint;
struct clk_vf_point *ptmpvfpoint =
@@ -246,7 +246,7 @@ static int _clk_vf_point_pmudatainit_freq(struct gk20a *g,
static int clk_vf_point_construct_volt(struct gk20a *g,
struct boardobj **ppboardobj,
u16 size, void *pargs)
size_t size, void *pargs)
{
struct boardobj *ptmpobj = (struct boardobj *)pargs;
struct clk_vf_point_volt *pclkvfpoint;
@@ -277,7 +277,7 @@ static int clk_vf_point_construct_volt(struct gk20a *g,
static int clk_vf_point_construct_freq(struct gk20a *g,
struct boardobj **ppboardobj,
u16 size, void *pargs)
size_t size, void *pargs)
{
struct boardobj *ptmpobj = (struct boardobj *)pargs;
struct clk_vf_point_freq *pclkvfpoint;
@@ -308,7 +308,7 @@ static int clk_vf_point_construct_freq(struct gk20a *g,
static int clk_vf_point_construct_volt_35(struct gk20a *g,
struct boardobj **ppboardobj,
u16 size, void *pargs)
size_t size, void *pargs)
{
struct boardobj *ptmpobj = (struct boardobj *)pargs;
struct clk_vf_point_volt *pclkvfpoint;
@@ -339,7 +339,7 @@ static int clk_vf_point_construct_volt_35(struct gk20a *g,
static int clk_vf_point_construct_freq_35(struct gk20a *g,
struct boardobj **ppboardobj,
u16 size, void *pargs)
size_t size, void *pargs)
{
struct boardobj *ptmpobj = (struct boardobj *)pargs;
struct clk_vf_point_freq *pclkvfpoint;
@@ -377,22 +377,22 @@ struct clk_vf_point *construct_clk_vf_point(struct gk20a *g, void *pargs)
switch (BOARDOBJ_GET_TYPE(pargs)) {
case CTRL_CLK_CLK_VF_POINT_TYPE_FREQ:
status = clk_vf_point_construct_freq(g, &board_obj_ptr,
(u16)sizeof(struct clk_vf_point_freq), pargs);
sizeof(struct clk_vf_point_freq), pargs);
break;
case CTRL_CLK_CLK_VF_POINT_TYPE_VOLT:
status = clk_vf_point_construct_volt(g, &board_obj_ptr,
(u16)sizeof(struct clk_vf_point_volt), pargs);
sizeof(struct clk_vf_point_volt), pargs);
break;
case CTRL_CLK_CLK_VF_POINT_TYPE_35_FREQ:
status = clk_vf_point_construct_freq_35(g, &board_obj_ptr,
(u16)sizeof(struct clk_vf_point_freq), pargs);
sizeof(struct clk_vf_point_freq), pargs);
break;
case CTRL_CLK_CLK_VF_POINT_TYPE_35_VOLT:
status = clk_vf_point_construct_volt_35(g, &board_obj_ptr,
(u16)sizeof(struct clk_vf_point_volt), pargs);
sizeof(struct clk_vf_point_volt), pargs);
break;
default:

View File

@@ -39,13 +39,13 @@ static int devinit_get_vin_device_table(struct gk20a *g,
static int vin_device_construct_v10(struct gk20a *g,
struct boardobj **ppboardobj,
u16 size, void *pargs);
size_t size, void *pargs);
static int vin_device_construct_v20(struct gk20a *g,
struct boardobj **ppboardobj,
u16 size, void *pargs);
size_t size, void *pargs);
static int vin_device_construct_super(struct gk20a *g,
struct boardobj **ppboardobj,
u16 size, void *pargs);
size_t size, void *pargs);
static struct vin_device *construct_vin_device(struct gk20a *g, void *pargs);
static int vin_device_init_pmudata_v10(struct gk20a *g,
@@ -375,7 +375,7 @@ done:
static int vin_device_construct_v10(struct gk20a *g,
struct boardobj **ppboardobj,
u16 size, void *pargs)
size_t size, void *pargs)
{
struct boardobj *ptmpobj = (struct boardobj *)pargs;
struct vin_device_v10 *pvin_device_v10;
@@ -405,7 +405,7 @@ static int vin_device_construct_v10(struct gk20a *g,
static int vin_device_construct_v20(struct gk20a *g,
struct boardobj **ppboardobj,
u16 size, void *pargs)
size_t size, void *pargs)
{
struct boardobj *ptmpobj = (struct boardobj *)pargs;
struct vin_device_v20 *pvin_device_v20;
@@ -436,7 +436,7 @@ static int vin_device_construct_v20(struct gk20a *g,
}
static int vin_device_construct_super(struct gk20a *g,
struct boardobj **ppboardobj,
u16 size, void *pargs)
size_t size, void *pargs)
{
struct vin_device *pvin_device;
struct vin_device *ptmpvin_device = (struct vin_device *)pargs;
@@ -468,12 +468,12 @@ static struct vin_device *construct_vin_device(struct gk20a *g, void *pargs)
switch (BOARDOBJ_GET_TYPE(pargs)) {
case CTRL_CLK_VIN_TYPE_V10:
status = vin_device_construct_v10(g, &board_obj_ptr,
(u16)sizeof(struct vin_device_v10), pargs);
sizeof(struct vin_device_v10), pargs);
break;
case CTRL_CLK_VIN_TYPE_V20:
status = vin_device_construct_v20(g, &board_obj_ptr,
(u16)sizeof(struct vin_device_v20), pargs);
sizeof(struct vin_device_v20), pargs);
break;
default: