Date: Wed, 5 Nov 2008 01:45:38 -0200 From: "Carlos A. M. dos Santos" <unixmania@gmail.com> To: "Joerg Sonnenberger" <joerg@britannica.bec.de> Cc: svn-src-all@freebsd.org Subject: Re: svn commit: r184605 - head/sys/dev/usb Message-ID: <e71790db0811041945w5e10163bs1236879f7b2bce3@mail.gmail.com> In-Reply-To: <20081103225453.GA1509@britannica.bec.de> References: <200811032209.mA3M9RhK077380@svn.freebsd.org> <490F800E.9080201@gmx.de> <20081103225453.GA1509@britannica.bec.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Nov 3, 2008 at 8:54 PM, Joerg Sonnenberger <joerg@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?e71790db0811041945w5e10163bs1236879f7b2bce3>