Skip to content

Commit ba3ca44

Browse files
committed
scsi: leapraid: correct LEAPRAID_REPLY_SIZE macro
deepin inclusion category: other fix the typo. Fixes: 08c6c3c ("scsi: leapraid: supports LeapRaid controller") Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
1 parent 1dbd3a4 commit ba3ca44

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

drivers/scsi/leapraid/leapraid_app.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ static long leapraid_ctl_do_command(struct leapraid_adapter *adapter,
305305

306306
adapter->driver_cmds.ctl_cmd.status = LEAPRAID_CMD_PENDING;
307307
memset((void *)(&adapter->driver_cmds.ctl_cmd.reply), 0,
308-
LEAPRAID_REPLY_SIEZ);
308+
LEAPRAID_REPLY_SIZE);
309309
ctl_sp_mpi_req = leapraid_get_task_desc(adapter, taskid);
310310
memset(ctl_sp_mpi_req, 0, LEAPRAID_REQUEST_SIZE);
311311
memcpy(ctl_sp_mpi_req,
@@ -428,7 +428,7 @@ static long leapraid_ctl_do_command(struct leapraid_adapter *adapter,
428428
}
429429
}
430430
if (karg->max_rep_bytes) {
431-
sz = min_t(u32, karg->max_rep_bytes, LEAPRAID_REPLY_SIEZ);
431+
sz = min_t(u32, karg->max_rep_bytes, LEAPRAID_REPLY_SIZE);
432432
if (copy_to_user(karg->rep_msg_buf_ptr,
433433
(void *)&adapter->driver_cmds.ctl_cmd.reply,
434434
sz)) {

drivers/scsi/leapraid/leapraid_func.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5347,7 +5347,7 @@ static void leapraid_request_descript_handler(struct leapraid_adapter *adapter,
53475347
case LEAPRAID_RPY_DESC_FLG_ADDRESS_REPLY:
53485348
rep = le32_to_cpu(rpf->addr_rep.rep_frame_addr);
53495349
if (rep > ((u32)adapter->mem_desc.rep_msg_dma +
5350-
adapter->adapter_attr.rep_msg_qd * LEAPRAID_REPLY_SIEZ) ||
5350+
adapter->adapter_attr.rep_msg_qd * LEAPRAID_REPLY_SIZE) ||
53515351
rep < ((u32)adapter->mem_desc.rep_msg_dma))
53525352
rep = 0;
53535353
if (taskid) {
@@ -7292,7 +7292,7 @@ static void leapraid_free_host_memory(struct leapraid_adapter *adapter)
72927292
if (adapter->mem_desc.rep_msg) {
72937293
dma_free_coherent(
72947294
&adapter->pdev->dev,
7295-
adapter->adapter_attr.rep_msg_qd * LEAPRAID_REPLY_SIEZ,
7295+
adapter->adapter_attr.rep_msg_qd * LEAPRAID_REPLY_SIZE,
72967296
adapter->mem_desc.rep_msg,
72977297
adapter->mem_desc.rep_msg_dma);
72987298
adapter->mem_desc.rep_msg = NULL;
@@ -7545,7 +7545,7 @@ static int leapraid_request_host_memory(struct leapraid_adapter *adapter)
75457545
adapter->mem_desc.rep_msg =
75467546
dma_alloc_coherent(&adapter->pdev->dev,
75477547
adapter->adapter_attr.rep_msg_qd *
7548-
LEAPRAID_REPLY_SIEZ,
7548+
LEAPRAID_REPLY_SIZE,
75497549
&adapter->mem_desc.rep_msg_dma,
75507550
GFP_KERNEL);
75517551
if (!adapter->mem_desc.rep_msg) {
@@ -7556,7 +7556,7 @@ static int leapraid_request_host_memory(struct leapraid_adapter *adapter)
75567556
}
75577557
if (!leapraid_is_in_same_4g_seg(adapter->mem_desc.rep_msg_dma,
75587558
adapter->adapter_attr.rep_msg_qd *
7559-
LEAPRAID_REPLY_SIEZ)) {
7559+
LEAPRAID_REPLY_SIZE)) {
75607560
dev_warn(&adapter->pdev->dev,
75617561
"use 32 bit dma due to rep msg is not in same 4g!\n");
75627562
rc = -EAGAIN;
@@ -8125,7 +8125,7 @@ static void leapraid_init_rep_msg_addr(struct leapraid_adapter *adapter)
81258125

81268126
for (i = 0, reply_address = (u32)adapter->mem_desc.rep_msg_dma;
81278127
i < adapter->adapter_attr.rep_msg_qd;
8128-
i++, reply_address += LEAPRAID_REPLY_SIEZ) {
8128+
i++, reply_address += LEAPRAID_REPLY_SIZE) {
81298129
adapter->mem_desc.rep_msg_addr[i] = cpu_to_le32(reply_address);
81308130
}
81318131
}

drivers/scsi/leapraid/leapraid_func.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
/* some requset and reply buffer size */
3131
#define LEAPRAID_REQUEST_SIZE 128
32-
#define LEAPRAID_REPLY_SIEZ 128
32+
#define LEAPRAID_REPLY_SIZE 128
3333
#define LEAPRAID_CHAIN_SEG_SIZE 128
3434
#define LEAPRAID_MAX_SGES_IN_CHAIN 7
3535
#define LEAPRAID_DEFAULT_CHAINS_PER_IO 19
@@ -425,7 +425,7 @@ enum LEAPRAID_CB_INDEX {
425425
};
426426

427427
struct leapraid_default_reply {
428-
u8 pad[LEAPRAID_REPLY_SIEZ];
428+
u8 pad[LEAPRAID_REPLY_SIZE];
429429
};
430430

431431
struct leapraid_sense_buffer {

0 commit comments

Comments
 (0)