Skip to content

Commit e7b146a

Browse files
Kefeng Wangpalmer-dabbelt
authored andcommitted
riscv: perf_event: Make some funciton static
Fixes the following warning detected when running make with W=1, ../arch/riscv/kernel/perf_event.c:150:5: warning: no previous prototype for ‘riscv_map_cache_decode’ [-Wmissing-prototypes] int riscv_map_cache_decode(u64 config, unsigned int *type, ^~~~~~~~~~~~~~~~~~~~~~ ../arch/riscv/kernel/perf_event.c:345:13: warning: no previous prototype for ‘riscv_base_pmu_handle_irq’ [-Wmissing-prototypes] irqreturn_t riscv_base_pmu_handle_irq(int irq_num, void *dev) ^~~~~~~~~~~~~~~~~~~~~~~~~ ../arch/riscv/kernel/perf_event.c:364:6: warning: no previous prototype for ‘release_pmc_hardware’ [-Wmissing-prototypes] void release_pmc_hardware(void) ^~~~~~~~~~~~~~~~~~~~ ../arch/riscv/kernel/perf_event.c:467:12: warning: no previous prototype for ‘init_hw_perf_events’ [-Wmissing-prototypes] int __init init_hw_perf_events(void) ^~~~~~~~~~~~~~~~~~~ Signed-off-by: Kefeng Wang <[email protected]> Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 2ef96a5 commit e7b146a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

arch/riscv/kernel/perf_event.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ static int riscv_map_hw_event(u64 config)
147147
return riscv_pmu->hw_events[config];
148148
}
149149

150-
int riscv_map_cache_decode(u64 config, unsigned int *type,
150+
static int riscv_map_cache_decode(u64 config, unsigned int *type,
151151
unsigned int *op, unsigned int *result)
152152
{
153153
return -ENOENT;
@@ -342,7 +342,7 @@ static void riscv_pmu_del(struct perf_event *event, int flags)
342342

343343
static DEFINE_MUTEX(pmc_reserve_mutex);
344344

345-
irqreturn_t riscv_base_pmu_handle_irq(int irq_num, void *dev)
345+
static irqreturn_t riscv_base_pmu_handle_irq(int irq_num, void *dev)
346346
{
347347
return IRQ_NONE;
348348
}
@@ -361,7 +361,7 @@ static int reserve_pmc_hardware(void)
361361
return err;
362362
}
363363

364-
void release_pmc_hardware(void)
364+
static void release_pmc_hardware(void)
365365
{
366366
mutex_lock(&pmc_reserve_mutex);
367367
if (riscv_pmu->irq >= 0)
@@ -464,7 +464,7 @@ static const struct of_device_id riscv_pmu_of_ids[] = {
464464
{ /* sentinel value */ }
465465
};
466466

467-
int __init init_hw_perf_events(void)
467+
static int __init init_hw_perf_events(void)
468468
{
469469
struct device_node *node = of_find_node_by_type(NULL, "pmu");
470470
const struct of_device_id *of_id;

0 commit comments

Comments
 (0)