[Deepin-Kernel-SIG] [linux 6.12.y] [Deepin] scsi: leapraid: correct LEAPRAID_REPLY_SIZE macro#1473
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideCorrects 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 correctionclassDiagram
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
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin inclusion category: other fix the typo. Fixes: e4adeea ("scsi: leapraid: supports LeapRaid controller") Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
d85cc87 to
47a8054
Compare
|
/approve |
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
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_SIEZtoLEAPRAID_REPLY_SIZEinleapraid_func.h. - Update all reply-buffer size uses in
leapraid_func.cto useLEAPRAID_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 useLEAPRAID_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.
deepin inclusion
category: other
fix the typo.
Fixes: e4adeea ("scsi: leapraid: supports LeapRaid controller")
Summary by Sourcery
Bug Fixes: