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
@@ -59,7 +59,7 @@ static int nvgpu_netlist_alloc_load_u32_list(struct gk20a *g, u8 *src, u32 len,
|
||||
struct netlist_u32_list *u32_list)
|
||||
{
|
||||
u32_list->count = (len + sizeof(u32) - 1) / sizeof(u32);
|
||||
if (!nvgpu_netlist_alloc_u32_list(g, u32_list)) {
|
||||
if (nvgpu_netlist_alloc_u32_list(g, u32_list) == NULL) {
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ static int nvgpu_netlist_alloc_load_av_list(struct gk20a *g, u8 *src, u32 len,
|
||||
struct netlist_av_list *av_list)
|
||||
{
|
||||
av_list->count = len / sizeof(struct netlist_av);
|
||||
if (!nvgpu_netlist_alloc_av_list(g, av_list)) {
|
||||
if (nvgpu_netlist_alloc_av_list(g, av_list) == NULL) {
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ static int nvgpu_netlist_alloc_load_av_list64(struct gk20a *g, u8 *src, u32 len,
|
||||
struct netlist_av64_list *av64_list)
|
||||
{
|
||||
av64_list->count = len / sizeof(struct netlist_av64);
|
||||
if (!nvgpu_netlist_alloc_av64_list(g, av64_list)) {
|
||||
if (nvgpu_netlist_alloc_av64_list(g, av64_list) == NULL) {
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ static int nvgpu_netlist_alloc_load_aiv_list(struct gk20a *g, u8 *src, u32 len,
|
||||
struct netlist_aiv_list *aiv_list)
|
||||
{
|
||||
aiv_list->count = len / sizeof(struct netlist_aiv);
|
||||
if (!nvgpu_netlist_alloc_aiv_list(g, aiv_list)) {
|
||||
if (nvgpu_netlist_alloc_aiv_list(g, aiv_list) == NULL) {
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ static int nvgpu_netlist_init_ctx_vars_fw(struct gk20a *g)
|
||||
}
|
||||
|
||||
netlist_fw = nvgpu_request_firmware(g, name, 0);
|
||||
if (!netlist_fw) {
|
||||
if (netlist_fw == NULL) {
|
||||
nvgpu_warn(g, "failed to load netlist %s", name);
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user