tegra: hwpm: fix credit programming count logic

The num_entries variable indicates the number of credit
programming requests that is sent from user space test app.
Current implementation has been configured to loop through
this in such a way that leads to an additional loop.
This change fixes the issue.

Bug 4571175

Signed-off-by: vasukis <vasukis@nvidia.com>
Change-Id: Id9fd4315e5ef470c697bf2815e16b42e746edf45
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/3212369
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
vasukis
2024-09-14 22:47:02 +00:00
committed by mobile promotions
parent 29c34c51d1
commit b6fa559660

View File

@@ -244,7 +244,7 @@ int tegra_hwpm_credit_program(struct tegra_soc_hwpm *hwpm,
return -EINVAL;
}
for (idx = 0; idx <= credit_prog->num_entries; idx++) {
for (idx = 0; idx < credit_prog->num_entries; idx++) {
//Extract the credit_info pointer for a given Credit packet.
//This contains the num_credits param
//which has to be updated in chip specific HALs.