Re: [PATCH v1 1/2] perf: Add Raspberry Pi BCM2835 AXI PMU driver

Uwe Kleine-König <[email protected]>
Newsgroups org.kernel.vger.linux-perf-users,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel
Message-ID <ansxmIcZnC9G6QN8@monoceros>
Hello,

On Tue, Aug 11, 2026 at 01:38:26AM -0700, Ian Rogers wrote:
> +#include <linux/mod_devicetable.h>
> [...]
> +#include <linux/platform_device.h>

Please rely on <linux/platform_device.h> to provide the definition of
of_device_id and drop <linux/mod_devicetable.h>. The latter will go away
soon.

> +/* Devices matching this driver in Device Tree */
> +static const struct of_device_id rpi_axi_pmu_match[] = {
> +	{
> +		.compatible = "brcm,bcm2835-axiperf",
> +		.data = (void *)CHIP_BCM2835,
> +	},
> +	{
> +		.compatible = "brcm,bcm2711-axiperf",
> +		.data = (void *)CHIP_BCM2835,
> +	},
> +	{},

Please use

	{ }

as list terminator (that is, add a space and drop the comma).

Also if the data is the same for all variants, maybe better drop the
assigment to .data and hardcode the value accordingly.

> +};
> +
> +MODULE_DEVICE_TABLE(of, rpi_axi_pmu_match);

Usually there is no empty line between the device_id struct and the
MODULE_DEVICE_TABLE macro.
signature.asc (application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE-----

iQEzBAABCgAdFiEEP4GsaTp6HlmJrf7Tj4D7WH0S/k4FAmp7MnoACgkQj4D7WH0S
/k7XeggAsjqD6ZSGHh7fLT4aPVs7BB3P+0clSg1PcXCLwXSRHnoaYx6bqyH/8Qt0
7ijosmeazKiJosSTI0Y2Fcv9Q+Jh8Ea23UKmlrbEq7IQlFB6o48YchhKSW0vl/KQ
fHoXhe8mwuQyey/HX9NkiN0jysztfEaSW/w3XQYJ/68rZZbKqidb2LFM1CB4ZXkO
K0zPSSZztOuQnwef12ELvWi5J9pgBaeSuu/P5V8XSwLXLP2iYOU3kgyM6iHWKrQ7
5C4K9hBWBuX72UCoZQ6NlLPRVNpmRyC3Uf2YHFlqSwFgz+3p/cgGfAYkB6RsQ542
HJCKnzijvQbI1BVGQWwauSIZrUyLTw==
=6EO1
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.