lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 08 May 2020 10:13:14 -0700 (PDT)
From:   Palmer Dabbelt <palmer@...belt.com>
To:     wangkefeng.wang@...wei.com
CC:     Paul Walmsley <paul.walmsley@...ive.com>,
        linux-kernel@...r.kernel.org, linux-riscv@...ts.infradead.org,
        wangkefeng.wang@...wei.com, alankao@...estech.com
Subject:     Re: [PATCH -next] riscv: perf_event: Make some funciton static

What's the "-next" for?  This seems appropriate for an RC to me, as it's a
build fix.

On Thu, 07 May 2020 08:04:44 PDT (-0700), wangkefeng.wang@...wei.com wrote:
> 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)
>             ^~~~~~~~~~~~~~~~~~~
>
> Cc: Alan Kao <alankao@...estech.com>
> Signed-off-by: Kefeng Wang <wangkefeng.wang@...wei.com>
> ---
>  arch/riscv/kernel/perf_event.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/riscv/kernel/perf_event.c b/arch/riscv/kernel/perf_event.c
> index 91626d9ae5f2..c835f0362d94 100644
> --- a/arch/riscv/kernel/perf_event.c
> +++ b/arch/riscv/kernel/perf_event.c
> @@ -147,7 +147,7 @@ static int riscv_map_hw_event(u64 config)
>  	return riscv_pmu->hw_events[config];
>  }
>
> -int riscv_map_cache_decode(u64 config, unsigned int *type,
> +static int riscv_map_cache_decode(u64 config, unsigned int *type,
>  			   unsigned int *op, unsigned int *result)
>  {
>  	return -ENOENT;
> @@ -342,7 +342,7 @@ static void riscv_pmu_del(struct perf_event *event, int flags)
>
>  static DEFINE_MUTEX(pmc_reserve_mutex);
>
> -irqreturn_t riscv_base_pmu_handle_irq(int irq_num, void *dev)
> +static irqreturn_t riscv_base_pmu_handle_irq(int irq_num, void *dev)
>  {
>  	return IRQ_NONE;
>  }
> @@ -361,7 +361,7 @@ static int reserve_pmc_hardware(void)
>  	return err;
>  }
>
> -void release_pmc_hardware(void)
> +static void release_pmc_hardware(void)
>  {
>  	mutex_lock(&pmc_reserve_mutex);
>  	if (riscv_pmu->irq >= 0)
> @@ -464,7 +464,7 @@ static const struct of_device_id riscv_pmu_of_ids[] = {
>  	{ /* sentinel value */ }
>  };
>
> -int __init init_hw_perf_events(void)
> +static int __init init_hw_perf_events(void)
>  {
>  	struct device_node *node = of_find_node_by_type(NULL, "pmu");
>  	const struct of_device_id *of_id;

Reviewed-by: Palmer Dabbelt <palmerdabbelt@...gle.com>

Powered by blists - more mailing lists