Commit 779dfcf6 authored by Phong Tran's avatar Phong Tran Committed by Martin K. Petersen

scsi: aacraid: clean up warning cast-function-type

Make the aacraid driver -Wcast-function-type clean

Report by: https://github.com/KSPP/linux/issues/20

drivers/scsi/aacraid/aachba.c:813:23:
warning: cast between incompatible function types from
'int (*)(struct scsi_cmnd *)' to 'void (*)(struct scsi_cmnd *)'
[-Wcast-function-type]

Link: https://lore.kernel.org/r/20200309155319.12658-1-tranmanphong@gmail.comReviewed-by: default avatarBart van Assche <bvanassche@acm.org>
Reviewed-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarPhong Tran <tranmanphong@gmail.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 47d05458
...@@ -798,6 +798,11 @@ static int aac_probe_container_callback1(struct scsi_cmnd * scsicmd) ...@@ -798,6 +798,11 @@ static int aac_probe_container_callback1(struct scsi_cmnd * scsicmd)
return 0; return 0;
} }
static void aac_probe_container_scsi_done(struct scsi_cmnd *scsi_cmnd)
{
aac_probe_container_callback1(scsi_cmnd);
}
int aac_probe_container(struct aac_dev *dev, int cid) int aac_probe_container(struct aac_dev *dev, int cid)
{ {
struct scsi_cmnd *scsicmd = kmalloc(sizeof(*scsicmd), GFP_KERNEL); struct scsi_cmnd *scsicmd = kmalloc(sizeof(*scsicmd), GFP_KERNEL);
...@@ -810,7 +815,7 @@ int aac_probe_container(struct aac_dev *dev, int cid) ...@@ -810,7 +815,7 @@ int aac_probe_container(struct aac_dev *dev, int cid)
return -ENOMEM; return -ENOMEM;
} }
scsicmd->list.next = NULL; scsicmd->list.next = NULL;
scsicmd->scsi_done = (void (*)(struct scsi_cmnd*))aac_probe_container_callback1; scsicmd->scsi_done = aac_probe_container_scsi_done;
scsicmd->device = scsidev; scsicmd->device = scsidev;
scsidev->sdev_state = 0; scsidev->sdev_state = 0;
......
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