diff options
author | Phong Tran <tranmanphong@gmail.com> | 2020-03-09 22:53:19 +0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2020-03-11 23:07:57 -0400 |
commit | 779dfcf6435b9ad612a630f0cae41adedbc0190b (patch) | |
tree | eb26aefd0d9ba50fd00f0a66db091374230cd066 | |
parent | 47d054580a75b7d14d275a76146ce2f41bc16a81 (diff) | |
download | linux-779dfcf6435b9ad612a630f0cae41adedbc0190b.tar.gz linux-779dfcf6435b9ad612a630f0cae41adedbc0190b.tar.bz2 linux-779dfcf6435b9ad612a630f0cae41adedbc0190b.zip |
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.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>
-rw-r--r-- | drivers/scsi/aacraid/aachba.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index 474d48eb1348..eb72ac8136c3 100644 --- a/drivers/scsi/aacraid/aachba.c +++ b/drivers/scsi/aacraid/aachba.c @@ -798,6 +798,11 @@ static int aac_probe_container_callback1(struct scsi_cmnd * scsicmd) 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) { struct scsi_cmnd *scsicmd = kmalloc(sizeof(*scsicmd), GFP_KERNEL); @@ -810,7 +815,7 @@ int aac_probe_container(struct aac_dev *dev, int cid) return -ENOMEM; } 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; scsidev->sdev_state = 0; |