Skip to content

Conversation

@Cryolitia
Copy link
Member

@Cryolitia Cryolitia commented Dec 16, 2025

Summary by Sourcery

Enhancements:

  • Comment out the original Arise DRM driver version block and replace it with a reduced dummy version identifier that will not clash with DKMS builds.

@sourcery-ai
Copy link

sourcery-ai bot commented Dec 16, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Replaces the Arise DRM driver’s in-tree version metadata with a “dummy” version to avoid conflicting with DKMS, while preserving the original version block in a comment for reference.

File-Level Changes

Change Details Files
Comment out the original version block and introduce a new dummy version definition for the Arise DRM driver.
  • Wrap the existing DRIVER_* and related version macros in a C comment labeled as the original version.
  • Add a new block of DRIVER_* macros representing a dummy version (major 0x20, minor 0x00, patch 0x46) and recomputed DRIVER_VERSION/DRIVER_VERSION_CHAR.
  • Retain OS/CC/LD version macros as empty strings, matching the previous structure.
drivers/gpu/drm/arise/gf_version.h

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

deepin pr auto review

我来对这个diff进行审查:

  1. 语法逻辑:
  • 代码语法正确,宏定义格式符合C语言规范
  • 版本号的定义结构清晰,使用了位运算来组合版本号
  • 注释的使用合理,清楚地说明了修改的目的
  1. 代码质量:
  • 优点:
    • 保留了原始版本作为注释,便于追溯
    • 使用了有意义的宏名称,提高了可读性
    • 版本号的定义方式统一,便于管理
  • 可改进之处:
    • DRIVER_NAME 宏定义缺少引号,应该是 "arise" 而不是 arise
    • 可以考虑添加版本号的校验宏,确保版本号在合理范围内
  1. 代码性能:
  • 这段代码主要是宏定义,不会影响运行时性能
  • DRIVER_VERSION 使用位运算计算,这是高效的实现方式
  1. 代码安全:
  • 基本安全,但建议:
    • DRIVER_LICENSE 应该使用标准的开源许可证标识,而不是自定义的 "Glenfly"
    • 可以考虑添加编译时检查,确保版本号的各个字段不会溢出

改进建议:

/* Original version
...
*/

/* Dummy version to avoid conflicting with DKMS */
#define DRIVER_DATE                 "05/19/2025"
#define DRIVER_MAJOR                0x20
#define DRIVER_MINOR                0x00
#define DRIVER_PATCHLEVEL           0x46
#define DRIVER_CLASS                ""
#define DRIVER_NAME                 "arise"  /* 添加引号 */
#define DRIVER_VENDOR               "Glenfly Tech Co., Ltd."
#define DRIVER_LICENSE              "GPL"  /* 使用标准许可证 */
#define DRIVER_VERSION              ((DRIVER_MAJOR<<24)|(DRIVER_MINOR<<16)|DRIVER_PATCHLEVEL)
#define DRIVER_VERSION_CHAR         "20.00.46"

/* 添加版本号范围检查 */
#if DRIVER_MAJOR > 255 || DRIVER_MINOR > 255 || DRIVER_PATCHLEVEL > 255
#error "Version numbers must be less than 256"
#endif

#define OS_VERSION                  ""
#define CC_VERSION                  ""
#define LD_VERSION                  ""

这些改进主要针对代码的规范性和安全性,不会影响功能,但能提高代码的可维护性和可靠性。

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes - here's some feedback:

  • The DRIVER_NAME macro in the dummy block is missing quotes (should likely be "arise"), otherwise it will not be a valid string literal where used.
  • Consider removing the large commented-out original version block or at least adding a brief explanation above it, as it may become stale and confuse future readers about which version values are authoritative.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The `DRIVER_NAME` macro in the dummy block is missing quotes (should likely be `"arise"`), otherwise it will not be a valid string literal where used.
- Consider removing the large commented-out original version block or at least adding a brief explanation above it, as it may become stale and confuse future readers about which version values are authoritative.

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.

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: opsiff

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

The pull request process is described 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

@opsiff opsiff merged commit 408fbf1 into deepin-community:linux-6.6.y Dec 17, 2025
12 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses a versioning conflict between the in-tree Arise DRM driver and DKMS (Dynamic Kernel Module Support) builds by replacing the production version with a reduced dummy version. The original version block (version 25.00.46, major 0x25) is commented out and replaced with a dummy version (version 20.00.46, major 0x20) to prevent conflicts when both the in-tree and DKMS versions of the driver are present on a system.

Key Changes:

  • Comment out the original version definitions (DRIVER_MAJOR 0x25, version "25.00.46")
  • Add new dummy version definitions with reduced version number (DRIVER_MAJOR 0x20, version "20.00.46") to avoid DKMS conflicts

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Cryolitia Cryolitia deleted the Cryolitia-patch-1 branch December 17, 2025 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants