On 3/16/22 4:02 AM, Wenchao Hao wrote:
> cc [email protected] [email protected]
> 
> On 2022/3/17 6:09, Wenchao Hao wrote:
>> iscsi_cls_conn is alloced by kzalloc(), the whole iscsi_cls_conn is
>> zero filled already including the dd_data. So it is unnecessary to
>> call memset again.
>>
>> Signed-off-by: Wenchao Hao <[email protected]>
>> Reviewed-by: Wu Bo <[email protected]>
>> ---
>>   drivers/scsi/libiscsi.c | 1 -
>>   1 file changed, 1 deletion(-)
>>
>> diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
>> index d09926e6c8a8..cf4211c6500d 100644
>> --- a/drivers/scsi/libiscsi.c
>> +++ b/drivers/scsi/libiscsi.c
>> @@ -3045,7 +3045,6 @@ iscsi_conn_setup(struct iscsi_cls_session 
>> *cls_session, int dd_size,
>>       if (!cls_conn)
>>           return NULL;
>>       conn = cls_conn->dd_data;
>> -    memset(conn, 0, sizeof(*conn) + dd_size);
>>         conn->dd_data = cls_conn->dd_data + sizeof(*conn);
>>       conn->session = session;
>>
> 

The removal of the memset is ok, but you should resend the original
to the list because the formatting got messed up, and I think Martin
can't track this (The patch doesn't show up in patchwork/lore type of
things).

-- 
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/7ac617f1-0187-c296-bc5a-f3e26ef21488%40oracle.com.

Reply via email to