Skip to content

Commit

Permalink
perf: phytium: fix phytium_ddr_pmu.c on 6.9
Browse files Browse the repository at this point in the history
Declare multiple functions as static functions to suppress warnings about
missing prototypes.

Signed-off-by: Mingcong Bai <baimingcong@uniontech.com>
  • Loading branch information
MingcongBai committed Jun 28, 2024
1 parent ed7788b commit 9c0eae9
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions drivers/perf/phytium/phytium_ddr_pmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ static const u32 ddr_counter_reg_offset[] = {
DDR_EVENT_RXREQ_WNSF, DDR_EVENT_BANDWIDTH
};

ssize_t phytium_ddr_pmu_format_sysfs_show(struct device *dev,
static ssize_t phytium_ddr_pmu_format_sysfs_show(struct device *dev,
struct device_attribute *attr,
char *buf)
{
Expand All @@ -98,7 +98,7 @@ ssize_t phytium_ddr_pmu_format_sysfs_show(struct device *dev,
return sprintf(buf, "%s\n", (char *)eattr->var);
}

ssize_t phytium_ddr_pmu_event_sysfs_show(struct device *dev,
static ssize_t phytium_ddr_pmu_event_sysfs_show(struct device *dev,
struct device_attribute *attr,
char *page)
{
Expand Down Expand Up @@ -318,7 +318,7 @@ static void phytium_ddr_pmu_unmark_event(struct phytium_ddr_pmu *ddr_pmu,
clear_bit(idx, ddr_pmu->pmu_events.used_mask);
}

int phytium_ddr_pmu_event_init(struct perf_event *event)
static int phytium_ddr_pmu_event_init(struct perf_event *event)
{
struct hw_perf_event *hwc = &event->hw;
struct phytium_ddr_pmu *ddr_pmu;
Expand Down Expand Up @@ -355,7 +355,7 @@ int phytium_ddr_pmu_event_init(struct perf_event *event)
return 0;
}

void phytium_ddr_pmu_event_update(struct perf_event *event)
static void phytium_ddr_pmu_event_update(struct perf_event *event)
{
struct phytium_ddr_pmu *ddr_pmu = to_phytium_ddr_pmu(event->pmu);
struct hw_perf_event *hwc = &event->hw;
Expand All @@ -365,15 +365,15 @@ void phytium_ddr_pmu_event_update(struct perf_event *event)
local64_add(delta, &event->count);
}

void phytium_ddr_pmu_event_start(struct perf_event *event, int flags)
static void phytium_ddr_pmu_event_start(struct perf_event *event, int flags)
{
struct hw_perf_event *hwc = &event->hw;

hwc->state = 0;
perf_event_update_userpage(event);
}

void phytium_ddr_pmu_event_stop(struct perf_event *event, int flags)
static void phytium_ddr_pmu_event_stop(struct perf_event *event, int flags)
{
struct hw_perf_event *hwc = &event->hw;

Expand All @@ -383,7 +383,7 @@ void phytium_ddr_pmu_event_stop(struct perf_event *event, int flags)
phytium_ddr_pmu_event_update(event);
}

int phytium_ddr_pmu_event_add(struct perf_event *event, int flags)
static int phytium_ddr_pmu_event_add(struct perf_event *event, int flags)
{
struct phytium_ddr_pmu *ddr_pmu = to_phytium_ddr_pmu(event->pmu);
struct hw_perf_event *hwc = &event->hw;
Expand All @@ -401,7 +401,7 @@ int phytium_ddr_pmu_event_add(struct perf_event *event, int flags)
return 0;
}

void phytium_ddr_pmu_event_del(struct perf_event *event, int flags)
static void phytium_ddr_pmu_event_del(struct perf_event *event, int flags)
{
struct phytium_ddr_pmu *ddr_pmu = to_phytium_ddr_pmu(event->pmu);
struct hw_perf_event *hwc = &event->hw;
Expand All @@ -421,7 +421,7 @@ void phytium_ddr_pmu_event_del(struct perf_event *event, int flags)
ddr_pmu->pmu_events.hw_events[hwc->idx] = NULL;
}

void phytium_ddr_pmu_enable(struct pmu *pmu)
static void phytium_ddr_pmu_enable(struct pmu *pmu)
{
struct phytium_ddr_pmu *ddr_pmu = to_phytium_ddr_pmu(pmu);
int event_added = bitmap_weight(ddr_pmu->pmu_events.used_mask,
Expand All @@ -433,7 +433,7 @@ void phytium_ddr_pmu_enable(struct pmu *pmu)
}
}

void phytium_ddr_pmu_disable(struct pmu *pmu)
static void phytium_ddr_pmu_disable(struct pmu *pmu)
{
struct phytium_ddr_pmu *ddr_pmu = to_phytium_ddr_pmu(pmu);
int event_added = bitmap_weight(ddr_pmu->pmu_events.used_mask,
Expand Down Expand Up @@ -666,7 +666,7 @@ static struct platform_driver phytium_ddr_pmu_driver = {
.remove = phytium_ddr_pmu_remove,
};

int phytium_ddr_pmu_offline_cpu(unsigned int cpu, struct hlist_node *node)
static int phytium_ddr_pmu_offline_cpu(unsigned int cpu, struct hlist_node *node)
{
struct phytium_ddr_pmu *ddr_pmu =
hlist_entry_safe(node, struct phytium_ddr_pmu, node);
Expand Down

0 comments on commit 9c0eae9

Please sign in to comment.