mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user