gpu: nvgpu: volt: 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: Ie890296a9a3db1af0d6c37c4319d6225cba1fcb7
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2011439
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:56:40 -05:00
committed by mobile promotions
parent a789034209
commit 824b8b5a41
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 * 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"),
@@ -88,7 +88,7 @@ static int volt_device_pmu_data_init_pwm(struct gk20a *g,
} }
static int construct_volt_device(struct gk20a *g, static int construct_volt_device(struct gk20a *g,
struct boardobj **ppboardobj, u16 size, void *pargs) struct boardobj **ppboardobj, size_t size, void *pargs)
{ {
struct voltage_device *ptmp_dev = (struct voltage_device *)pargs; struct voltage_device *ptmp_dev = (struct voltage_device *)pargs;
struct voltage_device *pvolt_dev = NULL; struct voltage_device *pvolt_dev = NULL;
@@ -118,7 +118,7 @@ static int construct_volt_device(struct gk20a *g,
static int construct_pwm_volt_device(struct gk20a *g, static int construct_pwm_volt_device(struct gk20a *g,
struct boardobj **ppboardobj, struct boardobj **ppboardobj,
u16 size, void *pargs) size_t size, void *pargs)
{ {
struct boardobj *pboard_obj = NULL; struct boardobj *pboard_obj = NULL;
struct voltage_device_pwm *ptmp_dev = struct voltage_device_pwm *ptmp_dev =

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 * 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"),
@@ -40,7 +40,7 @@ static int volt_policy_pmu_data_init_super(struct gk20a *g,
} }
static int construct_volt_policy(struct gk20a *g, static int construct_volt_policy(struct gk20a *g,
struct boardobj **ppboardobj, u16 size, void *pArgs) struct boardobj **ppboardobj, size_t size, void *pArgs)
{ {
struct voltage_policy *pvolt_policy = NULL; struct voltage_policy *pvolt_policy = NULL;
int status = 0; int status = 0;
@@ -58,7 +58,7 @@ static int construct_volt_policy(struct gk20a *g,
} }
static int construct_volt_policy_split_rail(struct gk20a *g, static int construct_volt_policy_split_rail(struct gk20a *g,
struct boardobj **ppboardobj, u16 size, void *pArgs) struct boardobj **ppboardobj, size_t size, void *pArgs)
{ {
struct voltage_policy_split_rail *ptmp_policy = struct voltage_policy_split_rail *ptmp_policy =
(struct voltage_policy_split_rail *)pArgs; (struct voltage_policy_split_rail *)pArgs;
@@ -83,7 +83,7 @@ static int construct_volt_policy_split_rail(struct gk20a *g,
} }
static int construct_volt_policy_single_rail(struct gk20a *g, static int construct_volt_policy_single_rail(struct gk20a *g,
struct boardobj **ppboardobj, u16 size, void *pArgs) struct boardobj **ppboardobj, size_t size, void *pArgs)
{ {
struct voltage_policy_single_rail *ptmp_policy = struct voltage_policy_single_rail *ptmp_policy =
(struct voltage_policy_single_rail *)pArgs; (struct voltage_policy_single_rail *)pArgs;
@@ -124,7 +124,7 @@ done:
} }
static int volt_construct_volt_policy_single_rail(struct gk20a *g, static int volt_construct_volt_policy_single_rail(struct gk20a *g,
struct boardobj **ppboardobj, u16 size, void *pArgs) struct boardobj **ppboardobj, size_t size, void *pArgs)
{ {
struct boardobj *pboardobj = NULL; struct boardobj *pboardobj = NULL;
int status = 0; int status = 0;
@@ -165,7 +165,7 @@ done:
} }
static int volt_construct_volt_policy_single_rail_multi_step(struct gk20a *g, static int volt_construct_volt_policy_single_rail_multi_step(struct gk20a *g,
struct boardobj **ppboardobj, u16 size, void *pargs) struct boardobj **ppboardobj, size_t size, void *pargs)
{ {
struct boardobj *pboardobj = NULL; struct boardobj *pboardobj = NULL;
struct voltage_policy_single_rail_multi_step *p_volt_policy = NULL; struct voltage_policy_single_rail_multi_step *p_volt_policy = NULL;
@@ -222,7 +222,7 @@ done:
} }
static int volt_construct_volt_policy_split_rail_single_step(struct gk20a *g, static int volt_construct_volt_policy_split_rail_single_step(struct gk20a *g,
struct boardobj **ppboardobj, u16 size, void *pargs) struct boardobj **ppboardobj, size_t size, void *pargs)
{ {
struct boardobj *pboardobj = NULL; struct boardobj *pboardobj = NULL;
int status = 0; int status = 0;