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  linux-cve-announce  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]
Message-ID: <20220310095852.GA1699@willie-the-truck>
Date:   Thu, 10 Mar 2022 09:58:52 +0000
From:   Will Deacon <will@...nel.org>
To:     YueHaibing <yuehaibing@...wei.com>
Cc:     mark.rutland@....com, bbhushan2@...vell.com,
        bbudiredla@...vell.com, arnd@...db.de,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 -next] perf/marvell: cn10k Fix build error without
 CONFIG_OF

On Thu, Mar 10, 2022 at 02:50:45PM +0800, YueHaibing wrote:
> drivers/perf/marvell_cn10k_ddr_pmu.c:723:21: error: ‘cn10k_ddr_pmu_of_match’ undeclared here (not in a function); did you mean ‘cn10k_ddr_pmu_driver’?
>     	 .of_match_table = cn10k_ddr_pmu_of_match,
>       	                   ^~~~~~~~~~~~~~~~~~~~~~
> 
> Remove the #ifdef around the match table, because CONFIG_OF is always enabled on arm64.
> 
> Fixes: 7cf83e222bce ("perf/marvell: CN10k DDR performance monitor support")
> Signed-off-by: YueHaibing <yuehaibing@...wei.com>
> ---
> v2: Remove the #ifdef macro as Arnd suggested
> ---
>  drivers/perf/marvell_cn10k_ddr_pmu.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/perf/marvell_cn10k_ddr_pmu.c b/drivers/perf/marvell_cn10k_ddr_pmu.c
> index 7f3146e71f99..bef0cee3a46a 100644
> --- a/drivers/perf/marvell_cn10k_ddr_pmu.c
> +++ b/drivers/perf/marvell_cn10k_ddr_pmu.c
> @@ -709,13 +709,11 @@ static int cn10k_ddr_perf_remove(struct platform_device *pdev)
>  	return 0;
>  }
>  
> -#ifdef CONFIG_OF
>  static const struct of_device_id cn10k_ddr_pmu_of_match[] = {
>  	{ .compatible = "marvell,cn10k-ddr-pmu", },
>  	{ },
>  };
>  MODULE_DEVICE_TABLE(of, cn10k_ddr_pmu_of_match);
> -#endif

Ah, sorry, I already fixed this when the conflict was first reported:

https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/commit/?h=for-next/perf&id=6676a42f1e4f1b8ec166b723a3801b7113c25a0e

However, I thought this driver could be compile-tested on architectures
without OF and then we'd get some report from that? At least, I'm certain
I've _added_ these ifdefs to other PMU drivers in the past.

Will

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ