mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: volt: fix MISRA 10.3 violations
Fix MISRA Rule 10.3 violations in common/pmu/volt for assigning objects of different size or essential type. JIRA NVGPU-1008 Change-Id: I876df3828effd52cab555cc6c1bacfec56e87d23 Signed-off-by: Philip Elcan <pelcan@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2027657 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> Reviewed-by: Adeel Raza <araza@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
767dc82ccf
commit
aa72f2d03a
@@ -68,7 +68,6 @@ static int volt_pmu_rpc_execute(struct gk20a *g,
|
||||
struct nv_pmu_volt_rpc *prpc_call)
|
||||
{
|
||||
struct pmu_cmd cmd;
|
||||
struct pmu_msg msg;
|
||||
struct pmu_payload payload;
|
||||
int status = 0;
|
||||
u32 seqdesc;
|
||||
@@ -76,7 +75,6 @@ static int volt_pmu_rpc_execute(struct gk20a *g,
|
||||
|
||||
(void) memset(&payload, 0, sizeof(struct pmu_payload));
|
||||
(void) memset(&cmd, 0, sizeof(struct pmu_cmd));
|
||||
(void) memset(&msg, 0, sizeof(struct pmu_msg));
|
||||
(void) memset(&handler, 0,
|
||||
sizeof(struct volt_rpc_pmucmdhandler_params));
|
||||
|
||||
@@ -84,7 +82,6 @@ static int volt_pmu_rpc_execute(struct gk20a *g,
|
||||
cmd.hdr.size = (u32)sizeof(struct nv_pmu_volt_cmd) +
|
||||
(u32)sizeof(struct pmu_hdr);
|
||||
cmd.cmd.volt.cmd_type = NV_PMU_VOLT_CMD_ID_RPC;
|
||||
msg.hdr.size = sizeof(struct pmu_msg);
|
||||
|
||||
payload.in.buf = (u8 *)prpc_call;
|
||||
payload.in.size = (u32)sizeof(struct nv_pmu_volt_rpc);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* 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
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
@@ -267,7 +267,7 @@ struct nv_pmu_volt_cmd_rpc {
|
||||
};
|
||||
|
||||
#define NV_PMU_VOLT_CMD_RPC_ALLOC_OFFSET \
|
||||
offsetof(struct nv_pmu_volt_cmd_rpc, request)
|
||||
(u32)offsetof(struct nv_pmu_volt_cmd_rpc, request)
|
||||
|
||||
struct nv_pmu_volt_cmd {
|
||||
union {
|
||||
@@ -308,7 +308,7 @@ struct nv_pmu_volt_msg_rpc {
|
||||
};
|
||||
|
||||
#define NV_PMU_VOLT_MSG_RPC_ALLOC_OFFSET \
|
||||
offsetof(struct nv_pmu_volt_msg_rpc, response)
|
||||
(u32)offsetof(struct nv_pmu_volt_msg_rpc, response)
|
||||
|
||||
struct nv_pmu_volt_msg {
|
||||
union {
|
||||
|
||||
Reference in New Issue
Block a user