mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: clk: fix MISRA 10.3 issues for size_t
MISRA Rule 10.3 prohibits implicit casting of objects to a different type. This change addresses a number of MISRA 10.3 violations in clk_domain.c where size_t values were being implicitly cast to u16. JIRA NVGPU-1008 Change-Id: If2dc6c6a288fe4b16425a210bc6d76bbef2ce019 Signed-off-by: Philip Elcan <pelcan@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2001224 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
2cff6844fb
commit
99ed40b7fb
@@ -846,14 +846,14 @@ static int clkdomaingetfpoints_stub(
|
||||
|
||||
static int clk_domain_construct_super(struct gk20a *g,
|
||||
struct boardobj **ppboardobj,
|
||||
u16 size, void *pargs)
|
||||
size_t size, void *pargs)
|
||||
{
|
||||
struct clk_domain *pdomain;
|
||||
struct clk_domain *ptmpdomain = (struct clk_domain *)pargs;
|
||||
int status = 0;
|
||||
|
||||
status = boardobj_construct_super(g, ppboardobj,
|
||||
size, pargs);
|
||||
(u16)size, pargs);
|
||||
|
||||
if (status != 0) {
|
||||
return -EINVAL;
|
||||
@@ -907,7 +907,7 @@ static int _clk_domain_pmudatainit_3x(struct gk20a *g,
|
||||
|
||||
static int clk_domain_construct_3x(struct gk20a *g,
|
||||
struct boardobj **ppboardobj,
|
||||
u16 size, void *pargs)
|
||||
size_t size, void *pargs)
|
||||
{
|
||||
struct boardobj *ptmpobj = (struct boardobj *)pargs;
|
||||
struct clk_domain_3x *pdomain;
|
||||
@@ -1241,7 +1241,7 @@ static int _clk_domain_pmudatainit_3x_prog(struct gk20a *g,
|
||||
|
||||
static int clk_domain_construct_35_prog(struct gk20a *g,
|
||||
struct boardobj **ppboardobj,
|
||||
u16 size, void *pargs)
|
||||
size_t size, void *pargs)
|
||||
{
|
||||
struct boardobj *ptmpobj = (struct boardobj *)pargs;
|
||||
struct clk_domain_35_prog *pdomain;
|
||||
@@ -1294,7 +1294,7 @@ static int clk_domain_construct_35_prog(struct gk20a *g,
|
||||
|
||||
static int clk_domain_construct_3x_prog(struct gk20a *g,
|
||||
struct boardobj **ppboardobj,
|
||||
u16 size, void *pargs)
|
||||
size_t size, void *pargs)
|
||||
{
|
||||
struct boardobj *ptmpobj = (struct boardobj *)pargs;
|
||||
struct clk_domain_3x_prog *pdomain;
|
||||
@@ -1389,7 +1389,7 @@ static int clk_domain_pmudatainit_3x_slave(struct gk20a *g,
|
||||
|
||||
static int clk_domain_construct_35_slave(struct gk20a *g,
|
||||
struct boardobj **ppboardobj,
|
||||
u16 size, void *pargs)
|
||||
size_t size, void *pargs)
|
||||
{
|
||||
struct boardobj *ptmpobj = (struct boardobj *)pargs;
|
||||
struct clk_domain_35_slave *pdomain;
|
||||
@@ -1422,7 +1422,7 @@ static int clk_domain_construct_35_slave(struct gk20a *g,
|
||||
|
||||
static int clk_domain_construct_3x_slave(struct gk20a *g,
|
||||
struct boardobj **ppboardobj,
|
||||
u16 size, void *pargs)
|
||||
size_t size, void *pargs)
|
||||
{
|
||||
struct boardobj *ptmpobj = (struct boardobj *)pargs;
|
||||
struct clk_domain_3x_slave *pdomain;
|
||||
@@ -1555,7 +1555,7 @@ static int _clk_domain_pmudatainit_3x_master(struct gk20a *g,
|
||||
|
||||
static int clk_domain_construct_35_master(struct gk20a *g,
|
||||
struct boardobj **ppboardobj,
|
||||
u16 size, void *pargs)
|
||||
size_t size, void *pargs)
|
||||
{
|
||||
struct boardobj *ptmpobj = (struct boardobj *)pargs;
|
||||
struct clk_domain_35_master *pdomain;
|
||||
@@ -1588,7 +1588,7 @@ static int clk_domain_construct_35_master(struct gk20a *g,
|
||||
|
||||
static int clk_domain_construct_3x_master(struct gk20a *g,
|
||||
struct boardobj **ppboardobj,
|
||||
u16 size, void *pargs)
|
||||
size_t size, void *pargs)
|
||||
{
|
||||
struct boardobj *ptmpobj = (struct boardobj *)pargs;
|
||||
struct clk_domain_3x_master *pdomain;
|
||||
@@ -1651,7 +1651,7 @@ static int _clk_domain_pmudatainit_3x_fixed(struct gk20a *g,
|
||||
|
||||
static int clk_domain_construct_3x_fixed(struct gk20a *g,
|
||||
struct boardobj **ppboardobj,
|
||||
u16 size, void *pargs)
|
||||
size_t size, void *pargs)
|
||||
{
|
||||
struct boardobj *ptmpobj = (struct boardobj *)pargs;
|
||||
struct clk_domain_3x_fixed *pdomain;
|
||||
|
||||
Reference in New Issue
Block a user