mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
Here, the freq_counter is set to track the count of number of frequencies enumerated and capped by GP10B_MAX_SUPPORTED_FREQS. There is an early terminating condition when new_rate equals max_rate. The line following this is set to WARN_ON(freq_counter == GP10B_MAX_SUPPORTED_FREQS); This line is probably incorrect and contradicts the above loop as in there is definite probability of freq_counter equaling GP10B_MAX_SUPPORTED_FREQS. Probably the original intention might have been to catch an off-by-1 error where freq_counter equals GP10B_MAX_SUPPORTED_FREQS + 1. Even then instead of printing a warning message, a better idea is to handle the possible bug in the code itself. Bug 3407276 Change-Id: I7f2a9d5c41be62227d08045e959e16c4228fbff4 Signed-off-by: Debarshi Dutta <ddutta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2623380 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit