Skip to content

[Deepin-Kernel-SIG] [linux 6.6-y] [Linkdata] scsi: linkdata ps3stor compilation problem solved #902

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 29, 2025

Conversation

Avenger-285714
Copy link
Collaborator

@Avenger-285714 Avenger-285714 commented Jun 27, 2025

Solve the compilation problem of turning on CPU_BIG_ENDIAN configuration

Link: https://gitee.com/OpenCloudOS/OpenCloudOS-Kernel/pulls/425

Summary by Sourcery

Bug Fixes:

  • Fix compilation error in Linkdata PS3 storage driver under CPU_BIG_ENDIAN by using cpu_to_le32 for dumpDmaBufLen instead of cpu_to_le64.

@Avenger-285714 Avenger-285714 requested a review from Copilot June 27, 2025 22:28
Copy link

sourcery-ai bot commented Jun 27, 2025

Reviewer's Guide

Adjust endianness conversion for dumpDmaBufLen to match its 32-bit field and resolve compilation break on CPU_BIG_ENDIAN.

Class diagram for updated endianness conversion in ps3_ioc_init_cmd_prepare

classDiagram
    class ps3_instance
    class dump_context {
        +u64 dump_dma_addr
    }
    class irq_context {
        +u32 dump_isrSN
    }
    class init_frame_msg {
        +u64 dumpDmaBufAddr
        +u32 dumpDmaBufLen
        +u32 dumpIsrSN
    }
    ps3_instance --> dump_context
    ps3_instance --> irq_context
    ps3_instance --> init_frame_msg
    %% Highlight the change: dumpDmaBufLen is now set with cpu_to_le32
    init_frame_msg : dumpDmaBufLen = cpu_to_le32(PS3_DUMP_DMA_BUF_SIZE)
Loading

File-Level Changes

Change Details Files
Use a 32-bit byte-order conversion for dumpDmaBufLen.
  • Replaced cpu_to_le64(PS3_DUMP_DMA_BUF_SIZE) with cpu_to_le32(PS3_DUMP_DMA_BUF_SIZE).
drivers/scsi/linkdata/ps3_ioc_manager.c

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

Copy link

@Copilot 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 resolves a compilation issue encountered when turning on the CPU_BIG_ENDIAN configuration by updating the DMA buffer length conversion.

  • Change the conversion function for dumpDmaBufLen from cpu_to_le64 to cpu_to_le32
  • Ensures the buffer length is correctly interpreted as a 32-bit value under the new configuration
Comments suppressed due to low confidence (1)

drivers/scsi/linkdata/ps3_ioc_manager.c:598

  • Changing the conversion from cpu_to_le64 to cpu_to_le32 indicates that dumpDmaBufLen is intended to be a 32-bit value. Please confirm that PS3_DUMP_DMA_BUF_SIZE and corresponding usage consistently align with a 32-bit representation.
	init_frame_msg->dumpDmaBufLen = cpu_to_le32(PS3_DUMP_DMA_BUF_SIZE);

@Avenger-285714 Avenger-285714 changed the title [Deepin-Kernel-SIG] [linux 6.6-y] [Linkdata] scsi: linkdata ps3stor compilation problem solved category: bugfix [Deepin-Kernel-SIG] [linux 6.6-y] [Linkdata] scsi: linkdata ps3stor compilation problem solved Jun 27, 2025
category: bugfix

Solve the compilation problem of turning on CPU_BIG_ENDIAN configuration

Link: https://gitee.com/OpenCloudOS/OpenCloudOS-Kernel/pulls/425
Signed-off-by: liujie_answer <[email protected]>
Signed-off-by: WangYuli <[email protected]>
@deepin-ci-robot
Copy link

deepin pr auto review

关键摘要:

  • 在修改dumpDmaBufLen字段的数据类型时,从cpu_to_le64更改为cpu_to_le32,需要确认是否所有相关的硬件和协议都支持32位长度。如果支持,则需要确保所有相关的数据结构和协议都进行了相应的调整。

是否建议立即修改:

  • 是,需要确保数据类型更改不会影响系统的稳定性和兼容性。如果更改是必要的,应该进行全面的测试来验证更改后的行为。

@Avenger-285714 Avenger-285714 requested a review from opsiff June 27, 2025 22:30
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 @Avenger-285714 - 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.

@opsiff opsiff merged commit 124fd14 into deepin-community:linux-6.6.y Jun 29, 2025
8 of 9 checks passed
@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

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

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