mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 18:16:01 +03:00
gpu: nvgpu: clk: fix return type for vflookup()
This changes the return type for the API fvlookup() from a u32 to an int. The implementation of the API in vflookup_prob_1x_master() was already trying to return negative values. This allows users of the API to properly check the return value. JIRA NVGPU-1008 Change-Id: Ifb12b5ffbde7fed501e7dfec9bd6a28dcc1b242e Signed-off-by: Philip Elcan <pelcan@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2001225 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
99ed40b7fb
commit
76acbc02bc
@@ -41,7 +41,7 @@ static int vfflatten_prog_1x_master(struct gk20a *g,
|
|||||||
struct clk_pmupstate *pclk,
|
struct clk_pmupstate *pclk,
|
||||||
struct clk_prog_1x_master *p1xmaster,
|
struct clk_prog_1x_master *p1xmaster,
|
||||||
u8 clk_domain_idx, u16 *pfreqmaxlastmhz);
|
u8 clk_domain_idx, u16 *pfreqmaxlastmhz);
|
||||||
static u32 vflookup_prog_1x_master(struct gk20a *g,
|
static int vflookup_prog_1x_master(struct gk20a *g,
|
||||||
struct clk_pmupstate *pclk,
|
struct clk_pmupstate *pclk,
|
||||||
struct clk_prog_1x_master *p1xmaster,
|
struct clk_prog_1x_master *p1xmaster,
|
||||||
u8 *slave_clk_domain,
|
u8 *slave_clk_domain,
|
||||||
@@ -1474,7 +1474,7 @@ done:
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
static u32 vflookup_prog_1x_master
|
static int vflookup_prog_1x_master
|
||||||
(
|
(
|
||||||
struct gk20a *g,
|
struct gk20a *g,
|
||||||
struct clk_pmupstate *pclk,
|
struct clk_pmupstate *pclk,
|
||||||
|
|||||||
@@ -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"),
|
||||||
@@ -36,7 +36,7 @@ typedef int vf_flatten(struct gk20a *g, struct clk_pmupstate *pclk,
|
|||||||
struct clk_prog_1x_master *p1xmaster,
|
struct clk_prog_1x_master *p1xmaster,
|
||||||
u8 clk_domain_idx, u16 *pfreqmaxlastmhz);
|
u8 clk_domain_idx, u16 *pfreqmaxlastmhz);
|
||||||
|
|
||||||
typedef u32 vf_lookup(struct gk20a *g, struct clk_pmupstate *pclk,
|
typedef int vf_lookup(struct gk20a *g, struct clk_pmupstate *pclk,
|
||||||
struct clk_prog_1x_master *p1xmaster,
|
struct clk_prog_1x_master *p1xmaster,
|
||||||
u8 *slave_clk_domain_idx, u16 *pclkmhz,
|
u8 *slave_clk_domain_idx, u16 *pclkmhz,
|
||||||
u32 *pvoltuv, u8 rail);
|
u32 *pvoltuv, u8 rail);
|
||||||
|
|||||||
Reference in New Issue
Block a user