[PATCH 1/8] drivers/perf: hisi: Define a symbol namespace for HiSilicon Uncore PMUs

Jonathan Cameron Jonathan.Cameron at Huawei.com
Fri Oct 18 05:43:35 PDT 2024


> diff --git a/drivers/perf/hisilicon/hisi_uncore_pmu.h b/drivers/perf/hisilicon/hisi_uncore_pmu.h
> index 25b2d43b72bf..008f18bbef7e 100644
> --- a/drivers/perf/hisilicon/hisi_uncore_pmu.h
> +++ b/drivers/perf/hisilicon/hisi_uncore_pmu.h
> @@ -23,6 +23,8 @@
>  #undef pr_fmt
>  #define pr_fmt(fmt)     "hisi_pmu: " fmt
>  
> +MODULE_IMPORT_NS(HISI_PMU);
> +
Hi Yicong,

Put the module import in each module because then it is easy to see it
right next to the other MODULE_xxxx lines.

https://docs.kernel.org/core-api/symbol-namespaces.html#how-to-use-symbols-exported-in-namespaces

Otherwise patch looks good.

Jonathan


>  #define HISI_PMU_V2		0x30
>  #define HISI_MAX_COUNTERS 0x10
>  #define to_hisi_pmu(p)	(container_of(p, struct hisi_pmu, pmu))




More information about the linux-arm-kernel mailing list