From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: perf/core: out-of-line and export perf_allow_cpu/tracepoint() Date: Mon, 25 May 2026 21:03:40 +1000 Message-ID: In-Reply-To: <20260521024904.331912-2-jhubbard@nvidia.com> References: <20260521024904.331912-1-jhubbard@nvidia.com> <20260521024904.331912-2-jhubbard@nvidia.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review **Correctness: Good.** The moved function bodies are exact copies of the original static inlines: ```c int perf_allow_cpu(void) { if (sysctl_perf_event_paranoid > 0 && !perfmon_capable()) return -EACCES; return security_perf_event_open(PERF_SECURITY_CPU); } EXPORT_SYMBOL_GPL(perf_allow_cpu); ``` This matches the original inline in the header byte-for-byte (minus `static inline`). Same for `perf_allow_tracepoint()`. **Placement:** The new functions are placed in `kernel/events/core.c` immediately after `perf_allow_kernel()` at line 14731, which is the right location. `EXPORT_SYMBOL_GPL` is the correct export type, matching `perf_allow_kernel()`. **Header update:** The declarations change from `static inline` with bodies to `extern int` declarations, placed alongside the existing `extern int perf_allow_kernel(void)`. Clean. **No issues found.** This patch is a mechanical, safe transformation. Existing built-in callers see no functional difference (the function call overhead for these permission checks is negligible). The commit message correctly references the precedent commit 5e9629d0ae97. --- Generated by Claude Code Patch Reviewer