gpu: nvgpu: fix MISRA violations in bitops unit

MISRA rule 21.1 states that #define and #undef shall not be used on
a reserved identifier or reserved macro name.  Fix violations of
rule 21.1 in bitops unit.
MISRA rule 21.2 states that a reserved identifier or macro name
shall not be declared.  Fix violations of rule 21.2 in bitops unit.

Jira NVGPU-3545

Change-Id: Ie551d7ce5e19287107403f2c991bcc55bd11a4e8
Signed-off-by: ajesh <akv@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2125842
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
ajesh
2019-05-27 14:17:08 +05:30
committed by mobile promotions
parent 795940faee
commit 8901faae57
8 changed files with 20 additions and 21 deletions

View File

@@ -103,7 +103,7 @@ static unsigned long __find_next_bit(const unsigned long *addr,
w = addr[idx] ^ invert_mask;
}
return min(n, __ffs(w) + idx * BITS_PER_LONG);
return min(n, (ffs(w) - 1UL) + idx * BITS_PER_LONG);
}
unsigned long find_first_bit(const unsigned long *addr, unsigned long size)