Re: [PATCH 2/4] dpt_i2o: make adpt_i2o_to_scsi() a void function

Hannes Reinecke
2019-11-15T09:24:14Z

On 11/15/19 9:51 AM, Christoph Hellwig wrote:
> On Fri, Nov 15, 2019 at 09:05:53AM +0100, Hannes Reinecke wrote:
>> The return value is never used anywhere, and returning it
>> risks a use-after-free crash.
>
> The function is also badly misnamed. Can you renamed it to
> adpt_i2o_complete_cmd or something that actually describes
> the function if you touch it?
>
Sure.

>> -static s32 adpt_i2o_to_scsi(void __iomem *reply, struct scsi_cmnd* cmd)
>> +static void adpt_i2o_to_scsi(void __iomem *reply, struct scsi_cmnd* cmd)
>> {
>> adpt_hba* pHba;
>> u32 hba_status;
>
> And fix the * placement at least in the actual line you touch anyway?
>
Will do for the next round.

Cheers,

Hannes
--
Dr. Hannes Reinecke Teamlead Storage & Networking
hare@suse.de +49 911 74053 688
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 247165 (AG München), GF: Felix Imendörffer