gpu: nvgpu: Remove usage of sort in volt_dev unit

Using of sort is no longer needed in volt dev
as the input which is provided is in ascending order.
Removed the sort dependence.

Change-Id: Iddbf508357ddaf2bc30bb1a24d09c25c9e516d9c
Signed-off-by: rmylavarapu <rmylavarapu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2247512
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
rmylavarapu
2019-11-26 10:22:31 +05:30
committed by Alex Waterman
parent f569ac4f46
commit ebb43a005a

View File

@@ -21,7 +21,6 @@
*/
#include <nvgpu/types.h>
#include <nvgpu/sort.h>
#include <nvgpu/pmu/pmuif/nvgpu_cmdif.h>
#include <nvgpu/bios.h>
#include <nvgpu/kmem.h>
@@ -429,17 +428,6 @@ static int _volt_device_devgrp_pmudata_instget(struct gk20a *g,
return 0;
}
static int volt_device_volt_cmp(const void *a, const void *b)
{
const struct voltage_device_entry *a_entry;
const struct voltage_device_entry *b_entry;
a_entry = *(const struct voltage_device_entry * const *)a;
b_entry = *(const struct voltage_device_entry * const *)b;
return (int)a_entry->voltage_uv - (int)b_entry->voltage_uv;
}
static int volt_device_state_init(struct gk20a *g,
struct voltage_device *pvolt_dev)
{
@@ -447,10 +435,6 @@ static int volt_device_state_init(struct gk20a *g,
struct voltage_rail *pRail = NULL;
u8 rail_idx = 0;
sort(pvolt_dev->pentry, pvolt_dev->num_entries,
sizeof(*pvolt_dev->pentry), volt_device_volt_cmp,
NULL);
/* Initialize VOLT_DEVICE step size. */
if (pvolt_dev->num_entries <= VOLTAGE_TABLE_MAX_ENTRIES_ONE) {
pvolt_dev->volt_step_uv = NV_PMU_VOLT_VALUE_0V_IN_UV;