Skip to content

fix: resolve Phytium stmmac compilation errors for kernel 6.19#9545

Merged
igorpecovnik merged 2 commits into
mainfrom
fix/phytium-stmmac-compilation-errors
Mar 16, 2026
Merged

fix: resolve Phytium stmmac compilation errors for kernel 6.19#9545
igorpecovnik merged 2 commits into
mainfrom
fix/phytium-stmmac-compilation-errors

Conversation

@igorpecovnik
Copy link
Copy Markdown
Member

@igorpecovnik igorpecovnik commented Mar 16, 2026

Summary

Fixes compilation warnings and errors in Phytium ethernet driver patches for kernel 6.19 by adding patch 1004.

Changes

  • Added new patch 1004-fix-stmmac-compilation-warnings.patch that resolves all compilation issues

Fixes Applied

In stmmac_platform.c:

  • Make fw_get_phy_mode() static to resolve missing prototype warning
  • Make stmmac_acpi_clock_setup() static to resolve missing prototype warning
  • Remove invalid stmmac_res->lpi_irq = -1; assignment (member doesn't exist in kernel 6.19)

In dwmac-phytium.c:

  • Make dwmac_phytium_get_resources() static to resolve missing prototype warning
  • Remove invalid stmmac_res->lpi_irq = -ENOENT; assignment (member doesn't exist in kernel 6.19)

Test Plan

  • Patches 1000-1004 apply cleanly in sequence
  • No compilation warnings or errors
  • All static function declarations properly scoped
  • Invalid struct member accesses removed

Context

The Phytium ethernet driver patches (1000-1003) were partially applying but had compilation issues due to:

  1. Functions declared without prototypes (should be static)
  2. Invalid lpi_irq member access in stmmac_resources struct (removed in kernel 6.19)

Patch 1004 should be applied after patches 1000-1003 to complete the Phytium ethernet support for kernel 6.19.


Summary by CodeRabbit

Release Notes

  • Bug Fixes

    • Resolved compilation warnings in network driver code
    • Removed invalid field assignments in platform resource handling
  • Chores

    • Code optimization and cleanup in network driver module

Add new patch (1004) to fix compilation warnings and errors in the
Phytium ethernet driver patches for kernel 6.19:

- Make fw_get_phy_mode() static to resolve missing prototype warning
- Make stmmac_acpi_clock_setup() static to resolve missing prototype warning
- Remove invalid stmmac_res->lpi_irq assignment (member doesn't exist)

This patch should be applied after patches 1000-1003 to complete
the Phytium ethernet driver support for kernel 6.19.
Update patch 1004 to also fix compilation issues in dwmac-phytium.c:
- Make dwmac_phytium_get_resources() static to resolve missing prototype warning
- Remove invalid stmmac_res->lpi_irq = -ENOENT assignment (member doesn't exist)

The patch now fixes all compilation issues across both files:
- stmmac_platform.c: fw_get_phy_mode(), stmmac_acpi_clock_setup(), lpi_irq
- dwmac-phytium.c: dwmac_phytium_get_resources(), lpi_irq

All Phytium ethernet driver patches (1000-1004) should now compile cleanly.
@igorpecovnik igorpecovnik requested a review from rpardini as a code owner March 16, 2026 09:18
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 16, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d68c5bd0-a805-4821-8b0f-6481dbbee9b0

📥 Commits

Reviewing files that changed from the base of the PR and between 70bdbce and 10f8676.

📒 Files selected for processing (1)
  • patch/kernel/archive/uefi-arm64-6.19/1004-fix-stmmac-compilation-warnings.patch

📝 Walkthrough

Walkthrough

A patch file is being added to fix stmmac driver compilation warnings by making three functions static to resolve missing prototype warnings and removing invalid lpi_irq field assignments across two source files.

Changes

Cohort / File(s) Summary
Static Function Declarations
patch/kernel/archive/uefi-arm64-6.19/1004-fix-stmmac-compilation-warnings.patch
Three functions marked as static to fix missing prototype compiler warnings: dwmac_phytium_get_resources(), fw_get_phy_mode(), and stmmac_acpi_clock_setup(). Removes redundant lpi_irq field assignments in dwmac-phytium.c and stmmac_platform.c that were invalid or non-functional.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A patch hops in, whiskers held high,
Static keywords make warnings goodbye,
Redundant fields fade without a sigh,
The stmmac driver cleaner, oh my oh my! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: resolving compilation errors in the Phytium stmmac driver for kernel 6.19 through marking functions as static and removing invalid assignments.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/phytium-stmmac-compilation-errors
📝 Coding Plan
  • Generate coding plan for human review comments

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 05 Milestone: Second quarter release size/medium PR with more then 50 and less then 250 lines Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... labels Mar 16, 2026
@igorpecovnik igorpecovnik merged commit a3f8d14 into main Mar 16, 2026
1 check was pending
@igorpecovnik igorpecovnik deleted the fix/phytium-stmmac-compilation-errors branch March 16, 2026 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

05 Milestone: Second quarter release Hardware Hardware related like kernel, U-Boot, ... Needs review Seeking for review Patches Patches related to kernel, U-Boot, ... size/medium PR with more then 50 and less then 250 lines

Development

Successfully merging this pull request may close these issues.

1 participant