Skip to content

[Deepin-Kernel-SIG] [linux 6.12.y] [Deepin] scsi: leapraid: correct LEAPRAID_REPLY_SIZE macro#1473

Open
opsiff wants to merge 1 commit intodeepin-community:linux-6.12.yfrom
opsiff:linux-6.12.y-leapraid-typo
Open

[Deepin-Kernel-SIG] [linux 6.12.y] [Deepin] scsi: leapraid: correct LEAPRAID_REPLY_SIZE macro#1473
opsiff wants to merge 1 commit intodeepin-community:linux-6.12.yfrom
opsiff:linux-6.12.y-leapraid-typo

Conversation

@opsiff
Copy link
Member

@opsiff opsiff commented Feb 3, 2026

deepin inclusion
category: other

fix the typo.

Fixes: e4adeea ("scsi: leapraid: supports LeapRaid controller")

Summary by Sourcery

Bug Fixes:

  • Fix incorrect use of the misspelled LEAPRAID_REPLY_SIEZ macro in leapraid reply buffer allocations and address calculations.

@sourcery-ai
Copy link

sourcery-ai bot commented Feb 3, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Corrects a misspelled LEAPRAID reply buffer size macro and updates all its call sites in the LeapRaid SCSI driver to use the consistent LEAPRAID_REPLY_SIZE name, ensuring coherent buffer sizing across allocation, free, range checks, and address initialization.

Class diagram for LEAPRAID_REPLY_SIZE usage after macro correction

classDiagram
    class LEAPRAID_CONSTANTS {
        <<macro>>
        LEAPRAID_REQUEST_SIZE : u32 = 128
        LEAPRAID_REPLY_SIZE : u32 = 128
        LEAPRAID_CHAIN_SEG_SIZE : u32 = 128
        LEAPRAID_MAX_SGES_IN_CHAIN : u32
        LEAPRAID_DEFAULT_CHAINS_PER_IO : u32
    }

    class leapraid_default_reply {
        +u8 pad[LEAPRAID_REPLY_SIZE]
    }

    class leapraid_adapter_attr {
        +u32 rep_msg_qd
    }

    class leapraid_mem_desc {
        +void* rep_msg
        +dma_addr_t rep_msg_dma
        +u32 rep_msg_addr[]
    }

    class leapraid_adapter {
        +leapraid_adapter_attr adapter_attr
        +leapraid_mem_desc mem_desc
    }

    LEAPRAID_CONSTANTS <.. leapraid_default_reply : uses
    LEAPRAID_CONSTANTS <.. leapraid_adapter : uses
    leapraid_adapter_attr <.. leapraid_adapter : contains
    leapraid_mem_desc <.. leapraid_adapter : contains
Loading

File-Level Changes

Change Details Files
Standardize the LeapRaid reply buffer size macro name and update all uses to avoid inconsistency and potential size mismatches.
  • Rename LEAPRAID_REPLY_SIEZ macro to LEAPRAID_REPLY_SIZE while keeping its value at 128.
  • Update reply DMA allocation and free paths to use LEAPRAID_REPLY_SIZE for buffer sizing.
  • Adjust reply buffer range checks and 4G segment checks to use LEAPRAID_REPLY_SIZE.
  • Update reply message address initialization loop and reply structure padding to reference LEAPRAID_REPLY_SIZE.
drivers/scsi/leapraid/leapraid_func.c
drivers/scsi/leapraid/leapraid_func.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

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 - 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.

deepin inclusion
category: other

fix the typo.

Fixes: e4adeea ("scsi: leapraid: supports LeapRaid controller")
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
@opsiff opsiff force-pushed the linux-6.12.y-leapraid-typo branch from d85cc87 to 47a8054 Compare February 3, 2026 05:22
@Avenger-285714
Copy link
Member

/approve

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Avenger-285714

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

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 corrects a typo in the LeapRAID SCSI driver’s reply-buffer macro name and updates all of its uses to the corrected identifier, without changing behavior or buffer sizing.

Changes:

  • Rename LEAPRAID_REPLY_SIEZ to LEAPRAID_REPLY_SIZE in leapraid_func.h.
  • Update all reply-buffer size uses in leapraid_func.c to use LEAPRAID_REPLY_SIZE (DMA allocation, free, bounds checks, and address stepping).
  • Update reply-buffer handling in leapraid_app.c (memset size and user copy size) to use LEAPRAID_REPLY_SIZE.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
drivers/scsi/leapraid/leapraid_func.h Fixes the reply size macro name and updates the default reply struct to use the corrected macro.
drivers/scsi/leapraid/leapraid_func.c Replaces all uses of the misspelled reply size macro in DMA allocation, free, range checking, and reply address initialization with the corrected macro.
drivers/scsi/leapraid/leapraid_app.c Uses the corrected reply size macro when zeroing the reply buffer and limiting the bytes copied back to userspace.

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

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