mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 09:57:08 +03:00
gpu: nvgpu: clk: fix MISRA 10.3 issue in clk_prog
MISRA Rule 10.3 prohibits implicit assignment of an object from a different size type. This fixes a MISRA 10.3 violation for assigning a u16 to a u8 in clk_prog.c. JIRA NVGPU-1008 Change-Id: I565a4aba62dac30943d9c9d012ca0a0d6a256578 Signed-off-by: Philip Elcan <pelcan@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2001227 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
fea84c09fa
commit
69d975fcbc
@@ -1410,8 +1410,9 @@ static int vfflatten_prog_1x_master(struct gk20a *g,
|
||||
freq_step_size_mhz =
|
||||
p1xmaster->super.source_data.pll.freq_step_size_mhz;
|
||||
step_count = (freq_step_size_mhz == 0U) ? 0U :
|
||||
(p1xmaster->super.freq_max_mhz - *pfreqmaxlastmhz - 1U) /
|
||||
freq_step_size_mhz;
|
||||
(u8)(p1xmaster->super.freq_max_mhz -
|
||||
*pfreqmaxlastmhz - 1U) /
|
||||
freq_step_size_mhz;
|
||||
/* Intentional fall-through.*/
|
||||
|
||||
case CTRL_CLK_PROG_1X_SOURCE_ONE_SOURCE:
|
||||
|
||||
Reference in New Issue
Block a user