[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6e78c52e-c02b-dea2-c5a5-7acf4c9b9fb1@gmail.com>
Date: Sun, 8 Mar 2020 09:08:58 +0700
From: Phong Tran <tranmanphong@...il.com>
To: Bart Van Assche <bvanassche@....org>, aacraid@...rosemi.com,
jejb@...ux.ibm.com, martin.petersen@...cle.com
Cc: tranmanphong@...il.com, linux-scsi@...r.kernel.org,
linux-kernel@...r.kernel.org, keescook@...omium.org
Subject: Re: [PATCH] scsi: aacraid: fix -Wcast-function-type
On 3/7/20 11:35 PM, Bart Van Assche wrote:
> On 2020-03-07 05:21, Phong Tran wrote:
>> correct usage prototype of callback scsi_cmnd.scsi_done()
>> Report by: https://github.com/KSPP/linux/issues/20
>>
>> Signed-off-by: Phong Tran <tranmanphong@...il.com>
>> ---
>> drivers/scsi/aacraid/aachba.c | 7 ++++++-
>> 1 file changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
>> index 33dbc051bff9..92a1058df3f5 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 = (void (*)(struct scsi_cmnd *))aac_probe_container_scsi_done;
>>
>> scsicmd->device = scsidev;
>> scsidev->sdev_state = 0;
>>
>
> Since the above cast is not necessary, please remove it.
>
yes, sent v2.
Regards,
Phong.
> Thanks,
>
> Bart.
>
Powered by blists - more mailing lists