[PATCH] Remove the unneeded zero initialization for skb buff

YanBo dreamfly281 at gmail.com
Thu May 23 12:20:38 EDT 2013


On Fri, May 24, 2013 at 12:15 AM, Eugene Krasnikov <k.eugene.e at gmail.com> wrote:
> Will memory contain some garbage if we do not do that?
>
Each skb operation will do under the skb data length, if we set the
length correctly, there will no any uninitialized  skb buffer content
be introduced in.

BR /Yanbo

> 2013/5/23 YanBo <dreamfly281 at gmail.com>:
>> If this memset has not used for debug, i think it can remove to avoid
>> unneeded  operation in the data path
>>
>> BR /Yanbo
>> Signed-off-by: Yanbo Li <yanbol at qti.qualcomm.com>
>> ---
>>  dxe.c |    1 -
>>  1 file changed, 1 deletion(-)
>>
>> diff --git a/dxe.c b/dxe.c
>> index 70dd603..d972a56 100644
>> --- a/dxe.c
>> +++ b/dxe.c
>> @@ -243,7 +243,6 @@ static int wcn36xx_dxe_ch_alloc_skb(struct wcn36xx
>> *wcn, struct wcn36xx_dxe_ch *
>>                         cur_dxe_ctl->skb->data,
>>                         cur_dxe_ctl->skb->len,
>>                         DMA_FROM_DEVICE);
>> -               memset(cur_dxe_ctl->skb->data, 0, cur_dxe_ctl->skb->len);
>>                 cur_dxe_ctl = cur_dxe_ctl->next;
>>         }
>>         return 0;
>> --
>> 1.7.9.5
>>
>> _______________________________________________
>> wcn36xx mailing list
>> wcn36xx at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/wcn36xx
>
>
>
> --
> Best regards,
> Eugene



More information about the wcn36xx mailing list