Re: [PATCH v4 06/36] hwmon: drivetemp: Convert to scsi_exec_req

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/20/22 07:06, Bart Van Assche wrote:
> On 10/16/22 12:59, Mike Christie wrote:
>> scsi_execute* is going to be removed. Convert to scsi_exec_req so
>> we pass all args in a scsi_exec_args struct.
>>
>> Signed-off-by: Mike Christie <michael.christie@xxxxxxxxxx>
>> Reviewed-by: Martin Wilck <mwilck@xxxxxxxx>
>> ---
>>   drivers/hwmon/drivetemp.c | 11 ++++++++---
>>   1 file changed, 8 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/hwmon/drivetemp.c b/drivers/hwmon/drivetemp.c
>> index 5bac2b0fc7bb..ec208cac9c7f 100644
>> --- a/drivers/hwmon/drivetemp.c
>> +++ b/drivers/hwmon/drivetemp.c
>> @@ -192,9 +192,14 @@ static int drivetemp_scsi_command(struct drivetemp_data *st,
>>   	scsi_cmd[12] = lba_high;
>>   	scsi_cmd[14] = ata_command;
>>   
>> -	return scsi_execute_req(st->sdev, scsi_cmd, data_dir,
>> -				st->smartdata, ATA_SECT_SIZE, NULL, HZ, 5,
>> -				NULL);
>> +	return scsi_exec_req(((struct scsi_exec_args) {
>> +					.sdev = st->sdev,
>> +					.cmd = scsi_cmd,
>> +					.data_dir = data_dir,
>> +					.buf = st->smartdata,
>> +					.buf_len = ATA_SECT_SIZE,
>> +					.timeout = HZ,
>> +					.retries = 5 }));
>>   }
>>   
>>   static int drivetemp_ata_command(struct drivetemp_data *st, u8 feature,
> 
> Since Damien Le Moal is the ATA Maintainer, you may want to Cc him for 
> ATA patches. Anyway:
> 
> Reviewed-by: Bart Van Assche <bvanassche@xxxxxxx>

This is ATA related, but not ata code :)

Anyway, while not being a fan of the function call + struct initialization
all together, this looks correct to me.

Reviewed-by: Damien Le Moal <damien.lemoal@xxxxxxxxxxxxxxxxxx>

-- 
Damien Le Moal
Western Digital Research




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux