mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: MISRA 10.1 boolean fixes
MISRA rule 10.1 doesn't allow the usage of non-boolean variables as booleans. Fix violations where a variable of type non-boolean is used as a boolean. JIRA NVGPU-646 Change-Id: If451037ada9a5f41b0cddb50778de57f60864f5c Signed-off-by: Amurthyreddy <amurthyreddy@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1815742 GVS: Gerrit_Virtual_Submit Reviewed-by: Adeel Raza <araza@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
359a8b82d9
commit
b68e465fab
@@ -244,7 +244,7 @@ int nvgpu_lwpr_mclk_change(struct gk20a *g, u32 pstate)
|
||||
|
||||
pstate_info = pstate_get_clk_set_info(g, pstate,
|
||||
clkwhich_mclk);
|
||||
if (!pstate_info) {
|
||||
if (pstate_info == NULL) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -325,7 +325,7 @@ bool nvgpu_lpwr_is_mscg_supported(struct gk20a *g, u32 pstate_num)
|
||||
|
||||
nvgpu_log_fn(g, " ");
|
||||
|
||||
if (!pstate) {
|
||||
if (pstate == NULL) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -348,7 +348,7 @@ bool nvgpu_lpwr_is_rppg_supported(struct gk20a *g, u32 pstate_num)
|
||||
|
||||
nvgpu_log_fn(g, " ");
|
||||
|
||||
if (!pstate) {
|
||||
if (pstate == NULL) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -381,7 +381,7 @@ int nvgpu_lpwr_enable_pg(struct gk20a *g, bool pstate_lock)
|
||||
is_mscg_supported = nvgpu_lpwr_is_mscg_supported(g,
|
||||
present_pstate);
|
||||
if (is_mscg_supported && g->mscg_enabled) {
|
||||
if (!pmu->mscg_stat) {
|
||||
if (pmu->mscg_stat == 0U) {
|
||||
pmu->mscg_stat = PMU_MSCG_ENABLED;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user