Skip to content

[Deepin-Kernel-SIG] [linux 6.6.y] [Xlnid] net: xlnid: kcompat: Also probe for DEEPIN_KABI_CONST - #2080

Open
Avenger-285714 wants to merge 1 commit into
deepin-community:linux-6.6.yfrom
Avenger-285714:xlnid-kabi-const-6.6
Open

[Deepin-Kernel-SIG] [linux 6.6.y] [Xlnid] net: xlnid: kcompat: Also probe for DEEPIN_KABI_CONST#2080
Avenger-285714 wants to merge 1 commit into
deepin-community:linux-6.6.yfrom
Avenger-285714:xlnid-kabi-const-6.6

Conversation

@Avenger-285714

@Avenger-285714 Avenger-285714 commented Aug 12, 2026

Copy link
Copy Markdown
Member

The kcompat generator probes the kernel tree for a const-qualified dev_uevent() method, accepting either a plain const or RHEL's RH_KABI_CONST annotation. On deepin kernels the equivalent annotation is DEEPIN_KABI_CONST, which the probe does not recognize.

Extend the match expression with DEEPIN_KABI_CONST so the generator keeps producing correct results when it is re-run against a deepin kernel tree. Keep the RH_KABI_CONST branch: this SDK is cross-distro compatibility code and may still be built on RHEL kernels.

The pre-generated kcompat_generated_defs.h does not need to be regenerated: upstream 6.6 dev_uevent() is already const-qualified, so the plain const branch already matches.

Fixes: a1accf3 ("net: ethernet: xel: add XEL network driver support")
Assisted-by: Kimi Code:K3

Summary by Sourcery

Enhancements:

  • Broaden kcompat generator matching for dev_uevent() to include DEEPIN_KABI_CONST so SDK compatibility checks work correctly on Deepin kernels while retaining RHEL support.

The kcompat generator probes the kernel tree for a const-qualified
dev_uevent() method, accepting either a plain const or RHEL's
RH_KABI_CONST annotation.  On deepin kernels the equivalent annotation
is DEEPIN_KABI_CONST, which the probe does not recognize.

Extend the match expression with DEEPIN_KABI_CONST so the generator
keeps producing correct results when it is re-run against a deepin
kernel tree.  Keep the RH_KABI_CONST branch: this SDK is cross-distro
compatibility code and may still be built on RHEL kernels.

The pre-generated kcompat_generated_defs.h does not need to be
regenerated: upstream 6.6 dev_uevent() is already const-qualified, so
the plain const branch already matches.

Fixes: a1accf3 ("net: ethernet: xel: add XEL network driver support")
Assisted-by: Kimi Code:K3
Signed-off-by: WangYuli <wangyl5933@chinaunicom.cn>
@Avenger-285714
Avenger-285714 requested review from opsiff and a balanced review from Copilot August 12, 2026 09:08
@sourcery-ai

sourcery-ai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR updates the kcompat generator for the xlnid SDK so that its probe for a const-qualified dev_uevent() method also recognizes the DEEPIN_KABI_CONST annotation used by deepin kernels, while retaining compatibility with existing plain const and RH_KABI_CONST cases.

File-Level Changes

Change Details Files
Extend the kcompat generator’s dev_uevent() const-qualification probe to recognize the DEEPIN_KABI_CONST annotation used in deepin kernels.
  • Update the match expression for dev_uevent() to include DEEPIN_KABI_CONST alongside const and RH_KABI_CONST.
  • Ensure the generated HAVE_DEV_UEVENT_CONST capability remains correct across upstream, RHEL, and deepin kernel trees.
drivers/net/ethernet/xel/xlnid/sdk/kcompat-generator.sh

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from avenger-285714. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Avenger-285714 Avenger-285714 changed the title [Deepin-Kernel-SIG] [linux 6.6.y] net: xlnid: kcompat: Also probe for DEEPIN_KABI_CONST [Deepin-Kernel-SIG] [linux 6.6.y] [Xlnid] net: xlnid: kcompat: Also probe for DEEPIN_KABI_CONST Aug 12, 2026

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Extends xlnid’s compatibility probe to recognize Deepin’s const-preserving kABI annotation.

Changes:

  • Adds DEEPIN_KABI_CONST to the dev_uevent() match.
  • Retains plain const and RHEL compatibility.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants