mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
scsi: qla4xxx: Use correct variable in memset for clarity
Both mbox_cmd and mbox_sts have the same size, so using sizeof(mbox_cmd) when clearing mbox_sts did not cause any functional issue. However, it is misleading and reduces code readability. Update the memset() calls to use sizeof(mbox_sts) to make the intent clear Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com> Link: https://patch.msgid.link/20251021090354.1804327-1-alok.a.tiwari@oracle.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
committed by
Martin K. Petersen
parent
e414748b7e
commit
e9ff858c9a
@@ -1016,7 +1016,7 @@ void qla4xxx_get_crash_record(struct scsi_qla_host * ha)
|
||||
uint32_t crash_record_size = 0;
|
||||
|
||||
memset(&mbox_cmd, 0, sizeof(mbox_cmd));
|
||||
memset(&mbox_sts, 0, sizeof(mbox_cmd));
|
||||
memset(&mbox_sts, 0, sizeof(mbox_sts));
|
||||
|
||||
/* Get size of crash record. */
|
||||
mbox_cmd[0] = MBOX_CMD_GET_CRASH_RECORD;
|
||||
@@ -1099,7 +1099,7 @@ void qla4xxx_get_conn_event_log(struct scsi_qla_host * ha)
|
||||
|
||||
/* Get Crash Record. */
|
||||
memset(&mbox_cmd, 0, sizeof(mbox_cmd));
|
||||
memset(&mbox_sts, 0, sizeof(mbox_cmd));
|
||||
memset(&mbox_sts, 0, sizeof(mbox_sts));
|
||||
|
||||
mbox_cmd[0] = MBOX_CMD_GET_CONN_EVENT_LOG;
|
||||
mbox_cmd[2] = LSDW(event_log_dma);
|
||||
|
||||
Reference in New Issue
Block a user