Skip to content

Commit

Permalink
drivers/base/arch_topology.c: fix build error
Browse files Browse the repository at this point in the history
../drivers/base/arch_topology.c:115:6: error: implicit declaration of function 'is_sched_lib_based_app' [-Werror,-Wimplicit-function-declaration]
        if (is_sched_lib_based_app(current->pid))
            ^
../drivers/base/arch_topology.c:118:65: error: too few arguments to function call, expected 2, have 1
        return sprintf(buf, "%lu\n", topology_get_cpu_scale(cpu->dev.id));
  • Loading branch information
raystef66 committed Oct 13, 2023
1 parent 4351f5f commit 26e44cb
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/base/arch_topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,7 @@ static ssize_t cpu_capacity_show(struct device *dev,
{
struct cpu *cpu = container_of(dev, struct cpu, dev);

if (is_sched_lib_based_app(current->pid))
return scnprintf(buf, PAGE_SIZE, "%lu\n", SCHED_CAPACITY_SCALE);

return sprintf(buf, "%lu\n", topology_get_cpu_scale(cpu->dev.id));
return sysfs_emit(buf, "%lu\n", topology_get_cpu_scale(NULL, cpu->dev.id));
}

static void update_topology_flags_workfn(struct work_struct *work);
Expand Down

0 comments on commit 26e44cb

Please sign in to comment.