Skip to content

Commit 779dfcf

Browse files
phongtmartinkpetersen
authored andcommitted
scsi: aacraid: clean up warning cast-function-type
Make the aacraid driver -Wcast-function-type clean Report by: KSPP/linux#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.com Reviewed-by: Bart van Assche <bvanassche@acm.org> Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Phong Tran <tranmanphong@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 47d0545 commit 779dfcf

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎drivers/scsi/aacraid/aachba.c‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,11 @@ static int aac_probe_container_callback1(struct scsi_cmnd * scsicmd)
798798
return 0;
799799
}
800800

801+
static void aac_probe_container_scsi_done(struct scsi_cmnd *scsi_cmnd)
802+
{
803+
aac_probe_container_callback1(scsi_cmnd);
804+
}
805+
801806
int aac_probe_container(struct aac_dev *dev, int cid)
802807
{
803808
struct scsi_cmnd *scsicmd = kmalloc(sizeof(*scsicmd), GFP_KERNEL);
@@ -810,7 +815,7 @@ int aac_probe_container(struct aac_dev *dev, int cid)
810815
return -ENOMEM;
811816
}
812817
scsicmd->list.next = NULL;
813-
scsicmd->scsi_done = (void (*)(struct scsi_cmnd*))aac_probe_container_callback1;
818+
scsicmd->scsi_done = aac_probe_container_scsi_done;
814819

815820
scsicmd->device = scsidev;
816821
scsidev->sdev_state = 0;

0 commit comments

Comments
 (0)