gpu: nvgpu: fuse: return int for cal APIs

The APIs read_vin_cal_slope_intercept_fuse() and
read_vin_cal_gain_offset_fuse() where prototyped for u32 return types,
but they were actually returning negative errno's for errors. Change the
return type to int so the errors can be checked properly.

clk_vin.c still stores the return values as u32's. This will be fixed in
a future patch.

JIRA NVGPU-938

Change-Id: I4fc47468dcf39f923c4f302919c705b50e10f446
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1943383
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Philip Elcan
2018-10-31 10:52:15 -04:00
committed by mobile promotions
parent 0c8be8a596
commit e156066256
3 changed files with 6 additions and 6 deletions

View File

@@ -44,7 +44,7 @@ u32 gp106_fuse_read_vin_cal_fuse_rev(struct gk20a *g)
gk20a_readl(g, fuse_vin_cal_fuse_rev_r()));
}
u32 gp106_fuse_read_vin_cal_slope_intercept_fuse(struct gk20a *g,
int gp106_fuse_read_vin_cal_slope_intercept_fuse(struct gk20a *g,
u32 vin_id, u32 *slope,
u32 *intercept)
{
@@ -180,7 +180,7 @@ u32 gp106_fuse_read_vin_cal_slope_intercept_fuse(struct gk20a *g,
return 0;
}
u32 gp106_fuse_read_vin_cal_gain_offset_fuse(struct gk20a *g,
int gp106_fuse_read_vin_cal_gain_offset_fuse(struct gk20a *g,
u32 vin_id, s8 *gain,
s8 *offset)
{

View File

@@ -29,10 +29,10 @@ struct gk20a;
int gp106_fuse_check_priv_security(struct gk20a *g);
u32 gp106_fuse_read_vin_cal_fuse_rev(struct gk20a *g);
u32 gp106_fuse_read_vin_cal_slope_intercept_fuse(struct gk20a *g,
int gp106_fuse_read_vin_cal_slope_intercept_fuse(struct gk20a *g,
u32 vin_id, u32 *slope,
u32 *intercept);
u32 gp106_fuse_read_vin_cal_gain_offset_fuse(struct gk20a *g,
int gp106_fuse_read_vin_cal_gain_offset_fuse(struct gk20a *g,
u32 vin_id, s8 *gain,
s8 *offset);

View File

@@ -1319,10 +1319,10 @@ struct gpu_ops {
u32 (*fuse_opt_sec_debug_en)(struct gk20a *g);
u32 (*fuse_opt_priv_sec_en)(struct gk20a *g);
u32 (*read_vin_cal_fuse_rev)(struct gk20a *g);
u32 (*read_vin_cal_slope_intercept_fuse)(struct gk20a *g,
int (*read_vin_cal_slope_intercept_fuse)(struct gk20a *g,
u32 vin_id, u32 *slope,
u32 *intercept);
u32 (*read_vin_cal_gain_offset_fuse)(struct gk20a *g,
int (*read_vin_cal_gain_offset_fuse)(struct gk20a *g,
u32 vin_id, s8 *gain,
s8 *offset);
} fuse;