svn commit: r184605 - head/sys/dev/usb

Carlos A. M. dos Santos unixmania at gmail.com
Tue Nov 4 19:45:40 PST 2008


On Mon, Nov 3, 2008 at 8:54 PM, Joerg Sonnenberger
<joerg at britannica.bec.de> wrote:
> On Mon, Nov 03, 2008 at 11:49:50PM +0100, Christoph Mallon wrote:
>> You may want to make cmd[] static and/or const, so the compiler really
>> just puts the bytes in the data section instead of generating code,
>> which pretty much is the same as the assignments you just removed.
>
> I didn't make it const originally as I am not sure if the USB stack will
> never modify the buffer.

You may want to have a const array and memcpy it to cmd before calling
usbd_transfer(). This will be smaller, though not much faster.

-- 
cd /usr/ports/sysutils/life
make clean


More information about the svn-src-all mailing list