Skip to content

rockchip-current: rewrite kernel patches#9054

Merged
leggewie merged 1 commit intoarmbian:mainfrom
EvilOlaf:rewrite-rockchip-current
Dec 10, 2025
Merged

rockchip-current: rewrite kernel patches#9054
leggewie merged 1 commit intoarmbian:mainfrom
EvilOlaf:rewrite-rockchip-current

Conversation

@EvilOlaf
Copy link
Member

@EvilOlaf EvilOlaf commented Dec 10, 2025

Description

Found a minor line change in one of the rockchip current patches.

How Has This Been Tested?

  • rewrite only, no test

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

Summary by CodeRabbit

  • Chores
    • Exported a kernel symbol to make it available for use by loadable kernel modules.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 10, 2025

Walkthrough

A kernel patch file is modified to export the mm_trace_rss_stat symbol via EXPORT_SYMBOL(), making the function available to loadable kernel modules without altering its signature or implementation.

Changes

Cohort / File(s) Summary
Kernel Symbol Export
patch/kernel/archive/rockchip-6.12/patches.armbian/general-linux-export-mm-trace-rss-stats.patch
Added EXPORT_SYMBOL(mm_trace_rss_stat); after the mm_trace_rss_stat() function definition in mm/memory.c to expose the symbol for use by loadable kernel modules

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

  • Single-line addition to a patch file
  • No functional logic changes
  • No impact to existing code behavior

Suggested reviewers

  • paolosabatino
  • igorpecovnik
  • joekhoobyar
  • ColorfulRhino
  • pyavitz

Poem

🐰 A symbol hops into the light,
Now modules can see it, oh what a sight!
EXPORT_SYMBOL makes it all clear,
The kernel's helper is now everywhere! 📡

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'rockchip-current: rewrite kernel patches' is partially related to the changeset. While it mentions rewriting kernel patches and references rockchip-current, it is overly broad and does not specifically describe the main technical change: exporting the mm_trace_rss_stat symbol. Consider a more specific title that highlights the technical change, such as 'rockchip-current: export mm_trace_rss_stat symbol' or 'rockchip-current: add mm_trace_rss_stat export to kernel patch'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between fd0a6d7 and 5234d77.

📒 Files selected for processing (1)
  • patch/kernel/archive/rockchip-6.12/patches.armbian/general-linux-export-mm-trace-rss-stats.patch (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: EvilOlaf
Repo: armbian/build PR: 8968
File: patch/u-boot/u-boot-sunxi/arm64-dts-sun50i-h6-orangepi.dtsi-Rollback-r_rsb-to-r_i2c.patch:36-36
Timestamp: 2025-11-20T18:20:11.985Z
Learning: The rewrite-patches tool (REWRITE_PATCHES=yes) in the Armbian build system can inadvertently introduce semantic changes when the u-boot/kernel git base revision differs from expected state. The tool applies patches, commits them, and re-exports them using git format-patch, which can cause the re-exported patch to reflect the base revision's state rather than preserving the original patch intent. This is particularly problematic for device tree changes like interrupt specifications. The tool currently lacks validation mechanisms to detect such semantic drift, and affected patches must be manually corrected after rewriting.
Learnt from: rpardini
Repo: armbian/build PR: 8044
File: patch/u-boot/v2025.04/cmd-fileenv-read-string-from-file-into-env.patch:76-86
Timestamp: 2025-03-31T22:20:48.475Z
Learning: For the Armbian build project, maintaining consistency with existing patches across U-Boot versions (such as between 2025.01 and 2025.04) is prioritized over refactoring individual patches for code improvements.
Learnt from: rpardini
Repo: armbian/build PR: 8044
File: patch/u-boot/v2025.04/cmd-fileenv-read-string-from-file-into-env.patch:73-75
Timestamp: 2025-03-31T22:20:41.849Z
Learning: When porting patches between U-Boot versions (like from 2025.01 to 2025.04), rpardini prefers to maintain patches as-is rather than introducing refactoring changes, even when potential improvements are identified. This approach prioritizes consistency and reduces the risk of introducing new issues.
Learnt from: EvilOlaf
Repo: armbian/build PR: 8428
File: config/boards/lckfb-taishanpi.csc:5-9
Timestamp: 2025-07-25T03:51:50.830Z
Learning: When reviewing PRs in the Armbian build system, U-Boot defconfig files and patches may be added as part of the PR changes but might not be visible in the current repository clone state during review. It's important to check the actual PR file changes directly via GitHub API (https://api.github.com/repos/armbian/build/pulls/{pr_number}/files) to get the complete picture of what files are being added or modified, especially for U-Boot patches that will be applied during the build process.
Learnt from: EvilOlaf
Repo: armbian/build PR: 8428
File: config/boards/lckfb-taishanpi.csc:5-9
Timestamp: 2025-07-25T03:51:50.830Z
Learning: When reviewing PRs in the Armbian build system, U-Boot defconfig files and patches may be added as part of the PR changes but might not be visible in the current repository clone state during review. It's important to check the actual PR file changes directly via GitHub or the PR API to get the complete picture of what files are being added or modified.
Learnt from: leggewie
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-08-29T18:44:47.732Z
Learning: When creating GitHub issues for code improvements in the Armbian build project, include the relevant patches/diffs in the issue description or open a PR directly instead of just describing the changes. This makes it more efficient for the assignee to handle the improvements.
📚 Learning: 2025-11-20T18:20:11.985Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8968
File: patch/u-boot/u-boot-sunxi/arm64-dts-sun50i-h6-orangepi.dtsi-Rollback-r_rsb-to-r_i2c.patch:36-36
Timestamp: 2025-11-20T18:20:11.985Z
Learning: The rewrite-patches tool (REWRITE_PATCHES=yes) in the Armbian build system can inadvertently introduce semantic changes when the u-boot/kernel git base revision differs from expected state. The tool applies patches, commits them, and re-exports them using git format-patch, which can cause the re-exported patch to reflect the base revision's state rather than preserving the original patch intent. This is particularly problematic for device tree changes like interrupt specifications. The tool currently lacks validation mechanisms to detect such semantic drift, and affected patches must be manually corrected after rewriting.

Applied to files:

  • patch/kernel/archive/rockchip-6.12/patches.armbian/general-linux-export-mm-trace-rss-stats.patch
🔇 Additional comments (1)
patch/kernel/archive/rockchip-6.12/patches.armbian/general-linux-export-mm-trace-rss-stats.patch (1)

14-18: Symbol export looks correct; please confirm rewrite matches original patch intent

The added EXPORT_SYMBOL(mm_trace_rss_stat); directly after the function definition is syntactically and semantically correct and matches common kernel style for exporting functions. There are no in-tree behavior changes, only making the symbol available to modules.

Given this patch was rewritten with the Armbian tooling and prior issues with REWRITE_PATCHES introducing unintended drift, please double‑check that:

  • The function signature and body in mm/memory.c for 6.12 still match the original target of this patch.
  • A diff between the old patch and this rewritten one shows only context/metadata changes plus this same single export line.

If those checks pass and a quick build of the rockchip‑6.12 kernel with this patch succeeds, this hunk looks good to merge.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added 02 Milestone: First quarter release size/small PR with less then 50 lines Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... labels Dec 10, 2025
Copy link
Contributor

@leggewie leggewie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that looks innocent enough

@leggewie leggewie merged commit 83d0771 into armbian:main Dec 10, 2025
11 checks passed
@github-actions github-actions bot added the Ready to merge Reviewed, tested and ready for merge label Dec 10, 2025
@github-actions
Copy link
Contributor

✅ This PR has been reviewed and approved — all set for merge!

@github-actions github-actions bot removed the Needs review Seeking for review label Dec 10, 2025
@EvilOlaf EvilOlaf deleted the rewrite-rockchip-current branch January 15, 2026 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

02 Milestone: First quarter release Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... Ready to merge Reviewed, tested and ready for merge size/small PR with less then 50 lines

Development

Successfully merging this pull request may close these issues.

2 participants