mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 02:52:51 +03:00
gpu: nvgpu: MISRA 14.4 err/ret/status as boolean
MISRA rule 14.4 doesn't allow the usage of integer types as booleans in the controlling expression of an if statement or an iteration statement. Fix violations where the integer variables err, ret, status are used as booleans in the controlling expression of if and loop statements. JIRA NVGPU-1019 Change-Id: I9e18ffc961d485225732c34d3ca561e84d182d07 Signed-off-by: Amurthyreddy <amurthyreddy@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1921370 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
30aeb71693
commit
a39c48e3e2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2016-2018, 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"),
|
||||
@@ -25,12 +25,12 @@
|
||||
#include "thrm.h"
|
||||
#include "thrmpmu.h"
|
||||
|
||||
u32 therm_domain_sw_setup(struct gk20a *g)
|
||||
int therm_domain_sw_setup(struct gk20a *g)
|
||||
{
|
||||
u32 status;
|
||||
int status;
|
||||
|
||||
status = therm_device_sw_setup(g);
|
||||
if (status) {
|
||||
if (status != 0) {
|
||||
nvgpu_err(g,
|
||||
"error creating boardobjgrp for therm devices, status - 0x%x",
|
||||
status);
|
||||
@@ -38,7 +38,7 @@ u32 therm_domain_sw_setup(struct gk20a *g)
|
||||
}
|
||||
|
||||
status = therm_channel_sw_setup(g);
|
||||
if (status) {
|
||||
if (status != 0) {
|
||||
nvgpu_err(g,
|
||||
"error creating boardobjgrp for therm channel, status - 0x%x",
|
||||
status);
|
||||
|
||||
Reference in New Issue
Block a user