diff options
author | Kevin Barnett <kevin.barnett@microchip.com> | 2022-02-01 15:48:23 -0600 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2022-02-07 23:38:34 -0500 |
commit | 9e98e60bfca341f5f1bf425dbf68cb1a96b323c9 (patch) | |
tree | 321b07009ac1180cc6f81bd2b343d34587a463f0 /drivers/scsi/smartpqi | |
parent | b4dc06a9070e3ca9d18a33fe649df594832dde1a (diff) | |
download | linux-stable-9e98e60bfca341f5f1bf425dbf68cb1a96b323c9.tar.gz linux-stable-9e98e60bfca341f5f1bf425dbf68cb1a96b323c9.tar.bz2 linux-stable-9e98e60bfca341f5f1bf425dbf68cb1a96b323c9.zip |
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.net
Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com>
Reviewed-by: Scott Teel <scott.teel@microchip.com>
Signed-off-by: Kevin Barnett <kevin.barnett@microchip.com>
Signed-off-by: Don Brace <don.brace@microchip.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/smartpqi')
-rw-r--r-- | drivers/scsi/smartpqi/smartpqi_init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c index 8ff38e3ecd09..075e41b5ceaa 100644 --- a/drivers/scsi/smartpqi/smartpqi_init.c +++ b/drivers/scsi/smartpqi/smartpqi_init.c @@ -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); |