Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The patch includes out-of-tree `#if LINUX_VERSION_CODE` compatibility macros which violate upstream kernel contribution guidelines.
--
--- Patch [2]: [PATCH v12 2/3] perf: Add Raspberry Pi BCM2835 AXI PMU driver ---
commit 26b0420ae938eb90972f1d893f5dc06525dcd8ac
Author: Ian Rogers <[email protected]>
perf: Add Raspberry Pi BCM2835 AXI PMU driver
This commit adds a new performance monitoring driver for the Raspberry Pi
AXI bus (BCM2835/2711), exposing system-level and VideoCore PMU hardware to
the Linux perf subsystem natively via the VideoCore mailbox interface.
> Note on out-of-tree macro compatibility:
> The inclusion of #if LINUX_VERSION_CODE < KERNEL_VERSION(6, 13, 0)
> surrounding hrtimer_setup is intentionally maintained alongside
> this patch to guarantee seamless out-of-tree compilation fallback
> compatibility for Raspberry Pi Long Term Support (LTS) kernel variants.
[Severity: Low]
Is it acceptable to include out-of-tree compatibility notes and macros in a
mainline submission? The Linux kernel typically requires code submitted for
mainline inclusion to be written exclusively against the current kernel API.
> diff --git a/drivers/perf/rpi_axi_pmu.c b/drivers/perf/rpi_axi_pmu.c
> new file mode 100644
> index 0000000000000..eda831d66056f
> --- /dev/null
> +++ b/drivers/perf/rpi_axi_pmu.c
[ ... ]
> +#include <linux/version.h>
> +
> +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 13, 0)
> +static inline void rpi_hrtimer_setup(struct hrtimer *timer,
> + enum hrtimer_restart (*function)(struct hrtimer *),
> + clockid_t clock_id, enum hrtimer_mode mode)
> +{
> + hrtimer_init(timer, clock_id, mode);
> + timer->function = function;
> +}
> +#define hrtimer_setup rpi_hrtimer_setup
> +#endif
[Severity: Low]
While the commit message notes this is intentional, does this align with
upstream coding style guidelines? Leaving LINUX_VERSION_CODE fallback wrappers
like rpi_hrtimer_setup in the driver may lead to upstream rejection due to
mainline coding policy violations.
--
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
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.