From owner-svn-src-user@FreeBSD.ORG Fri Nov 12 21:47:36 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77E551065695; Fri, 12 Nov 2010 21:47:36 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6663C8FC14; Fri, 12 Nov 2010 21:47:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oACLlakb024532; Fri, 12 Nov 2010 21:47:36 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oACLla6a024530; Fri, 12 Nov 2010 21:47:36 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <201011122147.oACLla6a024530@svn.freebsd.org> From: Weongyo Jeong Date: Fri, 12 Nov 2010 21:47:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215206 - user/weongyo/usb/sys/dev/usb X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Nov 2010 21:47:36 -0000 Author: weongyo Date: Fri Nov 12 21:47:36 2010 New Revision: 215206 URL: http://svn.freebsd.org/changeset/base/215206 Log: Adds a XXX comment to avoid useless operations that for example, no need to copy whole data into a buffer if there's no consumers. Modified: user/weongyo/usb/sys/dev/usb/usb_pf.c Modified: user/weongyo/usb/sys/dev/usb/usb_pf.c ============================================================================== --- user/weongyo/usb/sys/dev/usb/usb_pf.c Fri Nov 12 21:46:58 2010 (r215205) +++ user/weongyo/usb/sys/dev/usb/usb_pf.c Fri Nov 12 21:47:36 2010 (r215206) @@ -1677,6 +1677,11 @@ usbpf_xfertap(struct usb_xfer *xfer, int char *buf, *ptr, *end; /* + * XXX check first whether there are any descriptors waiting. If no + * we don't need to handle this xfer. + */ + + /* * XXX TODO * Allocating the buffer here causes copy operations twice what's * really inefficient. Copying usbpf_pkthdr and data is for USB packet