gpu: nvgpu: misra 12.1 fixes

MISRA Advisory Rule states that the precedence of operators within
expressions should be made explicit.

This change removes the Advisory Rule 12.1 violations from various
common units.

Jira NVGPU-3178

Change-Id: I4b77238afdb929c81320efa93ac105f9e69af9cd
Signed-off-by: Scott Long <scottl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2277480
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Scott Long
2020-01-10 10:48:28 -08:00
committed by Alex Waterman
parent a54c207c37
commit 5ee9a446b5
8 changed files with 17 additions and 17 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017-2019, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2017-2020, 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"),
@@ -410,8 +410,8 @@ void nvgpu_rbtree_range_search(u64 key,
struct nvgpu_rbtree_node *curr = root;
while (curr != NULL) {
if (key >= curr->key_start &&
key < curr->key_end) {
if ((key >= curr->key_start) &&
(key < curr->key_end)) {
*node = curr;
return;
} else if (key < curr->key_start) {