Commit 9e98e60b authored by Kevin Barnett's avatar Kevin Barnett Committed by Martin K. Petersen

scsi: smartpqi: Fix a typo in func pqi_aio_submit_io()

Use correct pqi_aio_path_request structure to calculate the offset to
sg_descriptors.

The function pqi_aio_submit_io() uses the pqi_raid_path_request structure
to calculate the offset of the structure member sg_descriptors.  This is
incorrect.  It should be using the pqi_aio_path_request structure instead.

This typo is benign because the offsets are the same in both structures.

Link: https://lore.kernel.org/r/164375210321.440833.2566086558909686629.stgit@brunhilda.pdev.netReviewed-by: default avatarMike McGowen <mike.mcgowen@microchip.com>
Reviewed-by: default avatarScott Teel <scott.teel@microchip.com>
Signed-off-by: default avatarKevin Barnett <kevin.barnett@microchip.com>
Signed-off-by: default avatarDon Brace <don.brace@microchip.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent b4dc06a9
......@@ -5641,7 +5641,7 @@ static int pqi_aio_submit_io(struct pqi_ctrl_info *ctrl_info,
io_request->raid_bypass = raid_bypass;
request = io_request->iu;
memset(request, 0, offsetof(struct pqi_raid_path_request, sg_descriptors));
memset(request, 0, offsetof(struct pqi_aio_path_request, sg_descriptors));
request->header.iu_type = PQI_REQUEST_IU_AIO_PATH_IO;
put_unaligned_le32(aio_handle, &request->nexus_id);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment