Re: [PATCH] USB: dummy-hcd: Fix uninitialized array use in init()

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

 



Vào Th 6, 4 thg 12, 2020 vào lúc 23:12 Alan Stern
<stern@xxxxxxxxxxxxxxxxxxx> đã viết:
> Does this initialization end up using less memory than an explicit
> memset() call?

You mean speed? In my opinion, there is no difference in speed between 2 ways.
When I compile this array initialization using gcc 5.4.0,  this
initialization becomes
mov instructions when MAX_NUM_UDC=2 and becomes rep stos when
MAX_NUM_UDC=32. I think it makes no difference when comparing with memset()

Thanks,
Quang Minh




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux